Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#4255 closed defect (invalid)

[avi @ 03098a20] H.264 bitstream malformed, no startcode found, use the video bitstream filter 'h264_mp4toannexb'

Reported by: csosog Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


From a US DVD, using Handbrake 0.9.9 32 bits, I created the test1.mkv file (1 video track x264 Main@L3.0 decomb CFR RF=20, 1 audio track AAC, nothing else).

I tried to change the container to .avi with
ffmpeg -y -hide_banner -i test1.mkv -vcodec copy -acodec copy test2.avi
(using ffmpeg version N-66860-g5552594 on Windows XP SP3) and received the following message :
[avi @ 03098a20] H.264 bitstream malformed, no startcode found, use the video bitstream filter 'h264_mp4toannexb' to fix it ('-bsf:v h264_mp4toannexb' option with ffmpeg)
av_interleaved_write_frame(): Invalid data found when processing input

My first idea was that the x264 track was too complex for the .avi container but I tried to change the container using Avidemux 2.6.8 (32-bit) ... and I succeeded !!!

I can visualise the (with Avidemux converted) test3.avi file with VLC and, using Mediainfo, the description of the 2 tracks is the same in test1.mkv and test3.avi (not a surprise, the run of was too fast for a codec conversion; check with Videoinspector is also OK).

My knowledge of English (and of ffmpeg) is too weak to understand the error message but, because it says that I have to use a filter, it implies a 'codec run' that is IMHO not necessary.

Help is welcome.


Change History (3)

comment:1 by csosog, 8 years ago

OK, solved ! The "video bitstream filter 'h264_mp4toannexb'" is not a video filter !
So, there is no 'codec run' for the video. explains the use of the h264_mp4toannexb filter.

It remains surprising to me that a mp4 filter is necessary to convert from .mkv to .avi container but ffmpeg makes the job.

Congratulation to the developers.


comment:2 by csosog, 8 years ago

Resolution: fixed
Status: newclosed

comment:3 by Carl Eugen Hoyos, 8 years ago

Resolution: fixedinvalid
Note: See TracTickets for help on using tickets.