[libav-bugs] [Bug 455] avconv always requires that output filename has a proper suffix while sometimes this shouldn't be needed

bugzilla-daemon at aruru.libav.org bugzilla-daemon at aruru.libav.org
Thu Feb 21 06:45:21 CET 2013


https://bugzilla.libav.org/show_bug.cgi?id=455

--- Comment #2 from y77y777 at tom.com 2013-02-21 06:45:21 CET ---
(In reply to comment #1)
> It's not really a matter of filename suffix, it's that there is no format
> specified. If you don't specify a format, it can use the suffix to guess what
> you want, but if you don't have either one there is no way for it to know that
> in this case you want the output to be in raw mp3 format.

Thanks for the quick reply.

I know that the suffix is used to determine the format usually, but it's not
the case here. It is not that I want to convert the audio to mp3. What I'm
really trying to do is to extract the audio stream from the video WITHOUT ANY
CONVERSION. That's why I use "-c:a copy" and the audio format can thus be
determined from the original video file.

In fact, what suffix I specify is not relevant here. Whether I specify a mp3 or
a wav as suffix, the resulting output file is always mp2, as "-c:a copy" is
used and the format of the original audio stream is mp2. That is, both of the
following commands will result in a mp2 format file with different names:

  avconv -i input.mpg -map 0:a -c:a copy output.mp3
  avconv -i input.mpg -map 0:a -c:a copy output.wav

To check that they are all mp2 files:

jesse2004 at MovingCastle:~$ avconv -i output.mp3 
avconv version 0.8.5-6:0.8.5-1~bpo60+1, Copyright (c) 2000-2012 the Libav
developers
  built on Jan 24 2013 20:38:51 with gcc 4.4.5
[mp3 @ 0x8ef0fe0] max_analyze_duration reached
Input #0, mp3, from 'output.mp3':
  Metadata:
    encoder         : Lavf53.21.1
  Duration: 00:02:19.41, start: 0.000000, bitrate: 224 kb/s
    Stream #0.0: Audio: mp2, 44100 Hz, stereo, s16, 224 kb/s
At least one output file must be specified

jesse2004 at MovingCastle:~$ avconv -i output.wav
avconv version 0.8.5-6:0.8.5-1~bpo60+1, Copyright (c) 2000-2012 the Libav
developers
  built on Jan 24 2013 20:38:51 with gcc 4.4.5
[wav @ 0x97abfe0] max_analyze_duration reached
Input #0, wav, from 'output.wav':
  Duration: 00:02:19.41, bitrate: 224 kb/s
    Stream #0.0: Audio: mp2, 44100 Hz, stereo, s16, 224 kb/s
At least one output file must be specified

So, the suffix isn't really used to determine the output format in this case.

-- 
Configure bugmail: https://bugzilla.libav.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the libav-bugs mailing list