天天看點

多媒體視訊開發_(17) FFMPEG從MP4中提取h264裸流

mp4 原始檔案 = 264裸流 + 音頻流 + metadata

ffmpeg -i test.mp4 -codec copy -bsf: h264_mp4toannexb -f h264 output.264

ffmpeg -y -i test.mp4 -vcodec copy -acodec copy -vbsf h264_mp4toannexb output.mp4
           

說明:

-i test.mp4: 輸入MP4檔案

-codec copy: 從MP4封裝中進行拷貝

-bsf:h264_mp4toannexb: 從MP4拷貝到annexB封裝

-f h264: 采用264格式

output.264: 輸出檔案名