video – ffmpeg “Error initializing bitstream filter: h264_mp4toannexb”
I’m trying to combine two mp4 files using ffmpeg. As per the (rather abstruse) documentation, the following code should combine the files:
ffmpeg -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i input2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts" -c copy -bsf:a aac_adtstoasc output.mp4
When I use that code, I receive the following error from the first video:
[AVBSFContext @ 0x563bd6861980] Codec 'av1' (32797) is not supported by the bitstream filter 'h264_mp4toannexb'. Supported codecs are: h264 (27)
Error initializing bitstream filter: h264_mp4toannexb
Here’s the metadata from that video:
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf58.29.100
Duration: 00:00:05.30, start: 0.000000, bitrate: 651 kb/s
Stream #0:0(und): Video: av1 (Main) (av01 / 0x31307661), yuv420p(tv, bt709), 1280x720, 527 kb/s, 30.16 fps, 29.97 tbr, 30k tbn, 30k tbc (default)
Metadata:
handler_name : ISO Media file produced by Google Inc.
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
Metadata:
handler_name : ISO Media file produced by Google Inc.
Being completely unfamiliar with codecs and not really understanding the ffmpeg documentation altogether, I’m at a bit of a loss about where to go next. How do I troubleshoot this issue?
Read more here: Source link