Skip to content

Saving the audio recording is easy, but what about video? #61

Answered by Charles92011
Charles92011 asked this question in Q&A
Discussion options

You must be logged in to vote

I found examples of android applications that write the video to a file, but none of them demonstrated the formatting of the output buffer, so I just experimented until I was able to figure it out.

	@Override
	public void onVideoFrame(VideoFrame frame) {

		if (!infoWritten)				
			writeInfo("");

		try {
			videoFileRenderer.queue(frame);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
public class VideoFileRenderer implements Runnable {

	private final Queue<VideoFrame> frameQueue = new ConcurrentLinkedQueue<VideoFrame>();
	private final File file;
	private Thread thread = null;
	
	private int outputFileWidth;
	private int outputFileHeig…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Charles92011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant