I wish to transcode an AVI from 29fps to 15fps theora. I have tried many combinations. The nearest I have so far is to: 1) ffmpeg -i input.avi -f avi -vcodec rawvideo -acodec pcm_s16le -r 15 -ar 22050 -ac 1 intermediate.avi then 2) ./ffmpeg2theora-0.15.linux.bin -f avi -c1 -H 22050 -o out.ogg intermediate.avi This gives me an output I want, however, the intermediate uncompressed stage generates 36Mb/sec of data, which is impractical. So it would be better if I could send the uncompressed output of ffmpeg through a pipe into ffmpeg2theora like so: 3) ffmpeg -i input.avi -f avi -vcodec rawvideo -acodec pcm_s16le -r 15 -ar 22050 -ac 1 - | ./ffmpeg2theora-0.15.linux.bin -f avi -c1 -H 22050 -o out.ogg - This generates an ffmpeg2theora error; Unable to decode input The FFmpeg command appears to work OK. If I redirect the output to a file, then run command 2), ffmpeg encodes the file perfectly. If I then try cat intermediate.avi | ./ffmpeg2theora-0.15.linux.bin -f avi -c1 -H 22050 -o out.ogg - I get the error: Unable to decode input I tried using the DV and Mpeg containers, however, these do not support 15fps. So the problem could be characterised that ffmpeg2theora will not accept my AVI streams through a pipe. It will only accept it as a file. Is there a way to make ffmpeg2theora behave the same with pipes as it does with files, when using AVI?
Nick Hill
2005-Nov-07 03:48 UTC
Compile trouble was Re: [Theora] Piping AVI to ffmpeg2theora
Two people have tried to help by suggesting named pipes. But named pipes don't work either. I can't get ffmpeg2theora to accept avi files either through stdin or through a named pipe. I guess ffmpeg2theora seeks through an AVI input, which would break down on a pipe. If seeking is necessary, then internally buffering the seekable input could be made to work. I was going to look through the source to find a fix for this. However, I have tried compiling ffmpeg2theora from svn and from tarball source but have gone around in circles for 4 hours. The svn download has incomplete install instructions, where I assumed the ./configure script it was talking about must be in the ffmpeg directory after running the download-ffmpeg script.. (I built FFmpeg several times, which would not encode theora) I then determined on the IRC channel that I need to run ./autogen.sh to create the ./configure script which the INSTALL file was referring to, I then determined I needed automake and libtools. Only to find the version of automake on my system is incompatible. I previously overlooked the source tarball. I was directed to this through IRC. For the source tarball, I could not get the configure script to identify that I had run the script to download ffmpeg source. The compilation procedure for the ffmpeg2theora unwisely requires a download of whatever is the latest ffmpeg. I suspect ffmpeg has changed since the source tarball was made, making the ffmpeg2theora source tarball unbuildable. Perhaps it would be better to include the known working ffmpeg source with the ffmpeg2theora source. I have not been able to build ffmpeg2theora from source and after 4 hours of falling into traps, I don't now feel like looking at the source. I have submitted an updated INSTALL file so someone else who downloads from svn won't fall into the same trap and will hopefully feel like looking at the source after (hopefully) sucessfully compiling. Nick Hill wrote:> I wish to transcode an AVI from 29fps to 15fps theora. I have tried many > combinations.