[FFmpeg-devel] [PATCH] Test pattern generator

Nicolas George nicolas.george
Thu Oct 18 11:17:16 CEST 2007


Le sextidi 26 vend?miaire, an CCXVI, Michael Niedermayer a ?crit?:
> avi

It does not appear to work perfectly. I try the following:

ffmpeg -t 5 -i ~/fichiers/video/TheChubChubs.avi \
  -f avi -acodec pcm_s16le -vcodec rawvideo - >| /tmp/t.avi

produce a perfectly valid t.avi with raw audio and video. ffmpeg can read
it, and convert it. But not with a pipe:

$ ffmpeg -y -i /tmp/t.avi /tmp/t.mpg
FFmpeg version SVN-r10758, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --prefix=/opt/ffmpeg-20071016 --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --enable-gpl --enable-libgsm --enable-libmp3lame --enable-libogg --enable-libvorbis --enable-libtheora --enable-libfaad --enable-libfaac --enable-libxvid --enable-libx264 --enable-liba52 --enable-x11grab --enable-libamr-nb --enable-libamr-wb --enable-swscaler --enable-pp --enable-shared --enable-pthreads
  libavutil version: 49.5.0
  libavcodec version: 51.46.0
  libavformat version: 51.15.0
  built on Oct 16 2007 23:25:56, gcc: 4.2.1 (Debian 4.2.1-4)
Input #0, avi, from '/tmp/t.avi':
  Duration: 11930:27:52.9, start: 0.000000, bitrate: 0 kb/s
  Stream #0.0: Video: rawvideo, yuv420p, 640x352, 25.00 fps(r)
  Stream #0.1: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
Output #0, mpeg, to '/tmp/t.mpg':
  Stream #0.0: Video: mpeg1video, yuv420p, 640x352, q=2-31, 200 kb/s, 25.00 fps(c)
  Stream #0.1: Audio: mp2, 48000 Hz, stereo, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
frame=  750 fps=427 q=31.0 Lsize=    1376kB time=30.0 bitrate= 376.2kbits/s    
video:1123kB audio:238kB global headers:0kB muxing overhead 1.156496%

$ cat /tmp/t.avi | ffmpeg -y -f avi -i - /tmp/t.mpg
FFmpeg version SVN-r10758, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --prefix=/opt/ffmpeg-20071016 --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --enable-gpl --enable-libgsm --enable-libmp3lame --enable-libogg --enable-libvorbis --enable-libtheora --enable-libfaad --enable-libfaac --enable-libxvid --enable-libx264 --enable-liba52 --enable-x11grab --enable-libamr-nb --enable-libamr-wb --enable-swscaler --enable-pp --enable-shared --enable-pthreads
  libavutil version: 49.5.0
  libavcodec version: 51.46.0
  libavformat version: 51.15.0
  built on Oct 16 2007 23:25:56, gcc: 4.2.1 (Debian 4.2.1-4)
[avi @ 0x2ae92662e040]Could not find codec parameters (Video: rawvideo, 640x352)
Input #0, avi, from 'pipe:':
  Duration: 11930:27:52.9, start: 0.000000, bitrate: N/A
  Stream #0.0: Video: rawvideo, 640x352, 25.00 fps(r)
  Stream #0.1: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
swScaler: Unknown format is not supported as input format
Cannot get resampling context
zsh: broken pipe  cat /tmp/t.avi | 
zsh: exit 1       ffmpeg -y -f avi -i - /tmp/t.mpg

Adding the -pix_fmt option does not change anything (and indeed, avidec does
not care about ap->pix_fmt).

It appears that AVI is not completely able to deal with pipes.

> no, and they shouldnt be in libavformat, we just lack of vounteer to
> add a new libavsomething and move them there

Ok. In that case, the politics is perfectly coherent. I will try to submit a
patch for a separate tool. And if one day there is a separate libavsource, I
will re-submit.

Regards,

-- 
  Nicolas George




More information about the ffmpeg-devel mailing list