Mp4 file extraction details H.264 and MP3 files

Extract Mp4 files to H.264 and MP3 files

To separate a video into H.264 (video encoding) and MP3 (audio encoding) files, you can use FFmpeg. Here are example command line operations to separate video and audio from one video file and save as H.264 and MP3 files:
FFmpeg installation

Extract video to H.264:

ffmpeg -i input.mp4 -c:v libx264 -an output_video.mp4

This command will extract the video stream input.mp4from and encode it to H.264 and save it as output_video.mp4. -c:v libx264option specifies to use the H.264 video encoder.

You have to wait for a while, the video extraction efficiency is a bit low.

Extract audio to MP3:

ffmpeg -i input.mp4 -c:a libmp3lame -vn output_audio.mp3

This command will extract the audio stream input.mp4from and encode it to MP3 and save it as output_audio.mp3. -c:a libmp3lameoption specifies to use the LAME MP3 audio encoder.

By running the above two commands, you can separate the video and audio and save them as H.264 and MP3 files respectively. You can choose other video and audio encoders as needed to meet your needs. Make sure your FFmpeg version supports the selected encoder, otherwise you need to install the relevant encoder plug-in first.

Audio extraction efficiency is okay.

Like, collect and follow, don’t get lost in the pursuit of technology! ! ! Welcome to interact in the comment area.

Guess you like

Origin blog.csdn.net/qq_45865950/article/details/132735119