[FFmpeg-devel] Problem when remuxing mpeg4 from mp4 container to ts container

Fredrik Persson fredrik.p.persson at gmail.com
Tue Nov 8 09:55:37 EET 2016


Hi!

(I recently posted this on -user, but as I fear this might be a bug, I
decided to also post here (-devel).)

I have a problem where the resulting file from the following commands
produce a transport stream file that does not display video.

wget http://www.sample-videos.com/video/mp4/480/big_buck_bunny_480p_1mb.mp4

(Any mp4 file will probably be fine, but I used that one.)

Reencode the h264 video into mpeg4:

ffmpeg -i big_buck_bunny_480p_1mb.mp4 -acodec copy -vcodec mpeg4
big-mpeg4.mp4

Then convert the container from mp4 to transport stream:

ffmpeg -i big-mpeg4.mp4 -codec copy big-mpeg4.ts

The resulting file "big-mpeg4.ts" cannot be played by ffplay. It prints
tons of logs, but this one seems most important.

[mpeg4 @ 0x7f9af80008c0] [IMGUTILS @ 0x7f9afe8bb420] Picture size 0x0 is
invalid

Please note that if the operations are done in one single step, like this:

ffmpeg -i ~/streams/big_buck_bunny_480p_1mb.mp4 -acodec copy -vcodec mpeg4
big-mpeg4-2.ts

... ffplay has no problem, video is shown.

This behaviour is the same on these two ffmpeg versions:

ffmpeg version 2.8.8-0ubuntu0.16.04.1 Copyright (c) 2000-2016 the FFmpeg
developers (ubuntu 16.04 standard)
ffmpeg version N-82217-gb642290 Copyright (c) 2000-2016 the FFmpeg
developers (built myself)

Any ideas what could be wrong here?

/Fredrik Persson


More information about the ffmpeg-devel mailing list