[Ffmpeg-devel] Strange problem with H.264 video in MPEG2 TS...

Luca Abeni lucabe72
Fri Jan 20 11:48:58 CET 2006

Hi M?ns,

On Fri, 2006-01-20 at 10:10 +0000, M?ns Rullg?rd wrote:
> > So, summing up, it seems that the problem is limited to H.264 video in
> > MPEG2TS when the input is read from a pipe...
> > Any ideas?
> It looks like you are using the latest x264 version and a slightly older
> ffmpeg.  Update both to the very latest.
Thanks for the tip. However, I am already using ffmpeg from today's CVS.
I am using a 2-week old x264, so I'll try to update it.

However, I think the problem is somewhere else, since ffmpeg can
correctly parse MPEG2 TS containing H.264 video, if they are read from
file (and not from a pipe).

I am analysing the problem with the help of strace, and it seems that
the problem is due to the fact that sometimes read() from pipe returns
less bytes than the requested amount.
In other words, strace produces lines like
read(3, "\4oP\33\372\230\311#\30\26\243\207\340\2064\10\21\r\340"..., 8192) = 6660

I do not know why, but it seems that the mpeg1,2,4 decoders in ffmpeg
can correctly cope with this situation, but the h264 decoder cannot...
I am still investigating this stuff, so I might be wrong.

Copy this in your signature, if you think it is important:
                               N O    W A R ! ! !

 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 Web Marketing: impara tutti i segreti del Posizionamento sui Motori di
* Ricerca, Pubblicita' on-line, Email Marketing ?- clicca qui
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3213&d=20-1

More information about the ffmpeg-devel mailing list