VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or try DVDFab and copy, convert Blu-ray and DVDs! :)
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. Hello all,

    Is there a command line tool to extract wma from wmv without recoding/encoding? (ie., I don't want any processing and just need the original stream).

    I tried ffmpeg but it gave me this error.
    [NULL @ 00000000003fc880] Requested output format 'wma' is not a suitable output format
    audio.wma: Invalid argument

    Thank you in advance.
    Quote Quote  
  2. Should work with mka as output format. E.g.:

    Code:
    ffmpeg -i in.wmv -map 0:a:0 -c:a copy -y out.mka
    Quote Quote  
  3. Did you try "-f wma"? ffmpeg seems to expect "-f asf" instead. At least that's what ffmpeg choose if you omit the -f option completely and just name the output "whatever.wma". (Use -map and -c:a as shown by fornit.)

    But do you really need the original, compressed stream or do you want to work/edit further on it? Then choose a lossless output format like PCM/WAV.
    Quote Quote  
  4. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    Advanced Systems Format (asf) is the canonical container for Windows Media Audio.
    Quote Quote  
  5. Another option is the command line version of asfbin

    Assuming video is stream 1 (sometimes wmv stream numbering can be swapped; audio can be first as stream 1)
    Code:
    "asfbin" -i "input.wmv" -o "output.wma" -nostr 1
    Quote Quote  
  6. Originally Posted by sneaker View Post
    Did you try "-f wma"? ffmpeg seems to expect "-f asf" instead. At least that's what ffmpeg choose if you omit the -f option completely and just name the output "whatever.wma". (Use -map and -c:a as shown by fornit.)

    But do you really need the original, compressed stream or do you want to work/edit further on it? Then choose a lossless output format like PCM/WAV.
    You were right! Thank you for the pointer. I got rid of "-f wma" and ffmpeg produced the wma file just as what I wanted.

    However, the original audio stream was 96Kpbs (according to MediaInfo) and the output file is 128kbps so looks like ffmpeg did do some minor recoding. Is there any option to tell ffmpeg to preserve the original bitrate?
    Quote Quote  
  7. What does the ffmpeg log say? If it says it copied the track(*) then I would trust it and assume MediaInfo was working incorrectly. MediaInfo isn't always accurate with >1 tracks + variable bitrate when it comes to detecting the average bitrates.


    (*) I.e. you used -c:a copy or -c copy and the log shows something like:
    Code:
    Stream mapping:
       Stream #0:0 -> #0:0 (copy)
    Quote Quote  
  8. Originally Posted by sneaker View Post
    What does the ffmpeg log say? If it says it copied the track(*) then I would trust it and assume MediaInfo was working incorrectly. MediaInfo isn't always accurate with >1 tracks + variable bitrate when it comes to detecting the average bitrates.


    (*) I.e. you used -c:a copy or -c copy and the log shows something like:
    Code:
    Stream mapping:
       Stream #0:0 -> #0:0 (copy)
    Thanks, sneaker. I added "-c:a copy" and looks like it worked. Thank you!

    Code:
      Input #0, asf, from 'R:\hcm1m7cap011\M7VIREC01\VIREC165\ADNC0400V0096A\Vi0165201
    8\Vi0165201808\Vi016520180810\Vi016520180810111500112000000100.wmv':
      Metadata:
        WMFSDKNeeded    : 0.0.0.0000
        DeviceConformanceTemplate: MP@ML
        WMFSDKVersion   : 12.0.7601.17514
        IsVBR           : 0
      Duration: 00:05:00.11, start: 0.000000, bitrate: 497 kb/s
        Stream #0:0(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 48000 Hz, stereo, fltp
    , 96 kb/s
        Stream #0:1(eng): Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p, 384x288,
    400 kb/s, 25 fps, 25 tbr, 1k tbn, 1k tbc
    Output #0, asf, to 'D:\Dinh\MRL\AudioRefs\0165\20180810111500.wma':
      Metadata:
        WMFSDKNeeded    : 0.0.0.0000
        DeviceConformanceTemplate: MP@ML
        WMFSDKVersion   : 12.0.7601.17514
        IsVBR           : 0
        WM/EncodingSettings: Lavf58.17.101
        Stream #0:0(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 48000 Hz, stereo, fltp
    , 96 kb/s
    Stream mapping:
      Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    size=    2598kB time=00:02:21.52 bitrate= 150.4kbits/s speed= 160x
    video:0kB audio:1662kB subtitle:0kB other streams:0kB global headers:0kB muxing
    overhead: 56.301533%
    Exiting normally, received signal 2.
    Quote Quote  



Similar Threads