Skip to content

Commit

Permalink
Change the final pixel format to yuv420p to make video recognizable for
Browse files Browse the repository at this point in the history
browsers


Former-commit-id: 71422e2
Former-commit-id: 475d9eb
  • Loading branch information
pannapudi committed Feb 20, 2021
1 parent 4dea389 commit e5e7ecb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/recorder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ pub fn new_ffmpeg_command(width: u32, height: u32, filename: &str) -> Result<Chi
#[rustfmt::skip]
let args = [
"-framerate", "60",
"-f", "rawvideo",
"-pix_fmt", "rgba",
"-f", "rawvideo",
"-i", "pipe:",
"-c:v", "libx264",
"-crf", "15",
Expand All @@ -78,6 +78,7 @@ pub fn new_ffmpeg_command(width: u32, height: u32, filename: &str) -> Result<Chi
"-colorspace", "bt709",
"-color_range", "tv",
"-chroma_sample_location", "center",
"-pix_fmt", "yuv420p",
"-movflags", "+faststart",
"-y",
];
Expand Down

0 comments on commit e5e7ecb

Please sign in to comment.