- To extract the audio track from the source
ffmpeg -i input_file -vn output_file - To encode the raw PCM audio track split by FFmpeg: (use FAAC)
faac -m4 -b64 -r48000 -pLC input_file output_file # for older version
faac -m 4 -b 123 input_file output_file # for newer version - encoding to ISO MPEG-4 video (bitrate: 300 kbps):
- One pass
ffmpeg -i input_file -an -b 300 -vcodec mpeg4 output_file - first pass
ffmpeg -i input_file -an -pass 1 -passlogfile log_file -qscale 2 -vcodec mpeg4 output_file
second pass
ffmpeg -i input_file -an -pass 2 -passlogfile log_file -b 300 -vcodec mpeg4 output_file
- One pass
- Multiplexing: combining the Audio and Video (using MPEG4IP)
adding a video track
mp4creator -c myvideo.avi -hint mytest.mp4
adding a audio track, -interleave not needed for MP3
mp4creator -c myaudio.aac -hint -interleave mytest.mp4
optimize it
mp4creator -optimize mytest.mp4
Ref: Streaming MPEG-4 with Linux, 2003-03-13
No comments:
Post a Comment