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

Måns Rullgård mru
Fri Jan 20 15:08:03 CET 2006

Luca Abeni said:
> Hi M?ns,
> On Fri, 2006-01-20 at 11:32 +0000, M?ns Rullg?rd wrote:
> [...]
>> A couple of days ago I corrected the frame rate encoding in x264 to match
>> the standard (several vendors misread those specs, so we're in good
>> company).
>> I made the corresponding change to lavc, with a workaround for streams
>> encoded with old x264 versions.  Old lavc versions will get the framerate
>> from new x264 wrong, but on second thoughts it would report twice the
>> correct
>> rate, not half as you are seeing.  Could you try it with raw H.264 files?
> I just tried:
> ./output_example source.avi
> mkfifo pipe.h264
> ./ffmpeg -y -i source.avi pipe.h264
> in a second window: ./ffmpeg -i pipe.h264
> and in the second window I get
> FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
>   configuration:  --enable-gpl --enable-x264 --extra-cflags=-I /tmp/x264
> --extra-ldflags=-L /tmp/x264
>   libavcodec version: 51.1.0
>   libavformat version: 50.0.0
>   built on Jan 20 2006 18:09:35, gcc: 4.0.3 20060115 (prerelease) (Debian
> 4.0.2-7)
> Input #0, h264, from 'pipe.h264':
>   Duration: N/A, bitrate: N/A
>   Stream #0.0, 25.00 fps(r): Video: h264, yuv420p, 352x288
> So, raw H.264 seems to work ok... The problem is only if I use H.264 in
> MPEG2 TS from a pipe (BTW: I am realizing just now that my description
> might be confusing, because by pipe I mean a "named pipe". As far as I
> can see, ffmpeg treats named pipes as regular files... The only
> difference that I can see is that seek() always fails, and read() can
> return less bytes than requested).

Seeking capability should be irrelevant.  The TS demuxer doesn't use it, and
the h264 decoder certainly doesn't need it.

I can't reprocduce the problem.  Do you get the error if you encode to a file
and run "cat test.ts | ffmpeg -i -" ?  If you do, could you post the file
somewhere (or send it to me privately)?

Are you certain that you have a clean build of both ffmpeg and x264?

M?ns Rullg?rd
mru at inprovide.com

More information about the ffmpeg-devel mailing list