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

Måns Rullgård mru
Fri Jan 20 16:04:54 CET 2006


Luca Abeni said:
> Hi M?ns,
>
> On Fri, 2006-01-20 at 14:08 +0000, M?ns Rullg?rd wrote:
> [...]
>> Seeking capability should be irrelevant.  The TS demuxer doesn't use it, and
>> the h264 decoder certainly doesn't need it.
> Yes, you are right. I just discovered (see my last mail) that the
> problem is triggered by the fact that read returns less than the
> requested amount of bytes.
>
>> I can't reprocduce the problem.  Do you get the error if you encode to a
>> file
>> and run "cat test.ts | ffmpeg -i -" ?
> I just tried, and in this case the problem does not happen. By running
> "cat test.ts | strace ffmpeg -i -"
> I can see that all the read()s return the requested amount of bytes:
> read(0, "G@\21\21\0B\260%\0\1\301\0\0\0\1\377\0\1\374\200\24H\22"..., 32768) =
> 32768
> read(0, "\305\23\212\'\24O\324|~(\236\30\250\370\374Q8\242q\304"..., 32768) =
> 32768
> read(0, "\4\2P\376\16\0\4\200\0@\24\3108\0\22\0\1\0S?\t-\33\350"..., 32768) =
> 32768
> ...
> I think this happens because "cat" is writing in the pipe big amounts of
> data very fast (it does not have to transcode anything :), so when
> ffmpeg tried to read 32768 bytes they are already in the pipe buffer.
>
>
> If you, instead, run
> ./output_example source.avi
> ./ffmpeg -i source.avi -vcodec h264 -f mpegts - | ./ffmpeg -i -
> I'm pretty sure you'll see the problem too: I just did a cvs checkout
> from scratch, so I certainly use the latest version :)

I tried exactly that, and I still can't reproduce it.

> (if needed, I can publish "source.avi" somewhere, but it's easier to
> generate it with output_example... There is no .ts file to post, because
> the problem only occours when the TS is created "on the fly").

OK.

-- 
M?ns Rullg?rd
mru at inprovide.com





More information about the ffmpeg-devel mailing list