[FFmpeg-user] raw input from named pipes, order of frame delivery

Harald Jordan harald.jordan at redstream.at
Thu Jul 5 20:12:57 CEST 2012

Hm, meanwhile I googled out that it works somehow better when piping the
named pipe to stdin. There is only the problem that one cannot pipe audio
and video to stdin at the same time; so I also made my thoughts about muxing
the yuv and pcm into avi and then send it to stdin of ffmpeg... 
However, I the solution below is basically the way to go... so if anybody
has some idea, help is very appreciated!!

By the way, my program delivers first a buffer of 120mx audio to the audio
pipe, then 3 x 40ms video Frames sequencial but very fast to the video pipe,
then again audio....
Here comes a report that belongs to the original question (this is complete,
so the end of this log is really the end):

ffmpeg started on 2012-07-05 at 20:01:24
Report written to "ffmpeg-20120705-200124.log"
Command line:
"c:\\ffmpeg.exe" -f rawvideo -r 25 -pix_fmt yuyv422 -s 720x576 -r 25 -i
"\\\\.\\pipe\\video145879000" -ac 2 -ar 48000 -f s16le -i
"\\\\.\\pipe\\audio145879000" -strict experimental -vcodec libx264 -s
720x576 -b:v 6438912 -r 8 -acodec aac -b:a 128k -ar 32000 -y -report
ffmpeg version N-42016-gc103dc0 Copyright (c) 2000-2012 the FFmpeg
  built on Jun 28 2012 20:19:55 with gcc 4.7.1
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r
--enable-libass --enable-libcelt --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libfreetype --enable-libgsm
--enable-libmp3lame --enable-libnut --enable-libopenjpeg --enable-librtmp
--enable-libschroedinger --enable-libspeex --enable-libtheora
--enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs
--enable-libxvid --enable-zlib
  libavutil      51. 63.100 / 51. 63.100
  libavcodec     54. 29.101 / 54. 29.101
  libavformat    54. 11.100 / 54. 11.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     3.  0.100 /  3.  0.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[rawvideo @ 000000000271f920] File position before
avformat_find_stream_info() is 0
[rawvideo @ 000000000271f920] All info found
[rawvideo @ 000000000271f920] Estimating duration from bitrate, this may be
[rawvideo @ 000000000271f920] File position after
avformat_find_stream_info() is 829440
Input #0, rawvideo, from '\\.\pipe\video145879000':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0, 1, 1/25: Video: rawvideo (YUY2 / 0x32595559), yuyv422,
720x576, 25 tbr, 25 tbn, 25 tbc

-----Ursprüngliche Nachricht-----
Von: ffmpeg-user-bounces at ffmpeg.org [mailto:ffmpeg-user-bounces at ffmpeg.org]
Im Auftrag von Roger Pack
Gesendet: Donnerstag, 05. Juli 2012 19:01
An: FFmpeg user questions and RTFMs
Betreff: Re: [FFmpeg-user] raw input from named pipes, order of frame

On Mon, Jul 2, 2012 at 3:30 AM, <harald.jordan at redstream.at> wrote:

> I am writing a export Plugin for Rhozet Carboncoder that delivers 
> uncompressed YUV and PCM Frames to named pipes. There is one pipe for 
> the YUV data and one for the Audio.
> The problem is, that the delivery of the YUV and PCM Frames is async.
> CarbonCoder delivers first 1 Audio sample that covers the next 120ms, 
> then it delivers 3 video frames and so on....
> In a testprogram where i deliver 40ms video, then 40ms audio and so 
> on, everything works fine, but in the real program, ffmpeg blocks one 
> of the pipes after like 80ms of delivered Material.

Full uncut command line and console output please?
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org

More information about the ffmpeg-user mailing list