Ask Your Question
3

What is the procedure for using ffmpeg to directly convert H264 raw stream into an mp4 file?

asked 2021-11-07 11:00:00 +0000

devzero gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-04-11 06:00:00 +0000

ladyg gravatar image

The command to use ffmpeg to directly convert H264 raw stream into an mp4 file is:

ffmpeg -f h264 -i input.h264 -c copy output.mp4

This command assumes that the input file is named "input.h264" and is located in the current working directory. The output file will be named "output.mp4" and will also be created in the current directory.

The "-f h264" option specifies the input format as H264, while the "-c copy" option specifies that the video and audio streams should be copied directly from the input file to the output file without any transcoding.

Note that if the input h264 raw stream does not contain audio, then the "-c copy" option can be omitted. Also, if the input file has a different format other than h264, then the "-f" option should be changed accordingly.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-11-07 11:00:00 +0000

Seen: 22 times

Last updated: Apr 11 '21