On Tue, 22 Jul 2008, Rodney Baker wrote:-
On Sun, 13 Jul 2008 04:11:50 David Bolt wrote:
<Snip>
# get a temporary filename # TEMPFILE=$(mktemp)
# and then use it to create named pipe # rm "${TEMPFILE}" mkfifo "${TEMPFILE}"
<Snip>
ffmpeg -f rm -i "${TEMPFILE}" -f mp3 -ab 160k "${OUTPUT}" </dev/null &
<Snip>
Thanks, David. ffmpeg doesn't actually need the -f parameter to set the output format - it will auto-detect from the output file extension (which means that the script can automatically handle video as well as audio-only streams).
That only works when ffmpeg recognizes the extension. However, since the temporary pipe doesn't have an extension it will recognize[0], you need to specify the format.
That being said, I might play with adding a couple of optional command line parameters to specify output format details if needed. That could make it easy to download and convert to pal dvd format in one step :-).
That's easy: ffmpeg -i "<input filename>" -target pal-dvd -y "<output filename>" or ffmpeg -i "<input filename>" -target pal-dvd -acodec mp2 -y "<output filename>" depending on what you want the audio stream type to be. The default is to use an AC3 audio stream, which supports 5 and 7 audio channels, as opposed to mp2 which only supports stereo[1]. In both cases, the input streams are transcoded to an MPEG2 stream with the audio stream is up-sampled to 48KHz if required. Also, if required, the video is transcoded with a 25fps frame-rate and/or re-sized to 720x576. The same is true for making NTSC compatible MPEG2 streams, where you'd use either: ffmpeg -i "<input filename>" -target ntsc-dvd -y "<output filename>" or ffmpeg -i "<input filename>" -target ntsc-dvd -acodec mp2 -y "<output filename>" In this case, if it's required, the video is transcoded with a 29.97fps frame-rate and/or re-sized to 720x480. [0] It's created in the format /tmp/tmp.xxxxxxxxxx where the 'xxxxxxxxxx' is made up of the process ID and random alphanumeric characters [1] it also supports mono, but you won't be using that with a stream to be used on a DVD. Regards, David Bolt -- Team Acorn: http://www.distributed.net/ OGR-P2 @ ~100Mnodes RC5-72 @ ~15Mkeys SUSE 10.1 32 | | openSUSE 10.3 32bit | openSUSE 11.0 32bit | openSUSE 10.2 64bit | openSUSE 10.3 64bit | openSUSE 11.0 64bit RISC OS 3.6 | TOS 4.02 | openSUSE 10.3 PPC | RISC OS 3.11 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org