Mailinglist Archive: opensuse (2803 mails)

< Previous Next >
Re: [opensuse] A question for the BASH gurus
  • From: Rodney Baker <rodney.baker@xxxxxxxxxxxx>
  • Date: Tue, 22 Jul 2008 18:45:50 +0930
  • Message-id: <200807221845.50862.rodney.baker@xxxxxxxxxxxx>
On Tue, 22 Jul 2008 09:04:04 David Bolt wrote:
<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.

My experience doing it manually has been that ffmpeg has detected the input
file type from the stream header. I've not had to specify the input format to
get it to work.

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].


Thanks - I'm aware of the command line parameters to do that. I just need to
experiment with the best way to implement them as optional parameters to the
script (in other words, if they're specified, use them, otherwise use
sensible defaults).

I know how to do that - I've written other scripts that do similar things for
audio and video file format conversion (before I found SoundKonverter).

Thanks again for your help; one of the best things about this list is how much
one can learn if one is prepared to ask the right questions (and listen to
the answers) ;-).

Regards,

--
===================================================
Rodney Baker VK5ZTV
rodney.baker@xxxxxxxxxxxx
===================================================

Experience varies directly with equipment ruined.
< Previous Next >