Printable Version of Topic
Click here to view this topic in its original format
Unofficial VirtualDub Support Forums > Testing / Bug Reports > Extracting Audio Wma V2


Posted by: trodas Mar 14 2013, 09:06 PM
I would like to point out something at least odd, but maybe it is a bug. Usually, I need to export audio from many videos (to normalize it, etc.). Usualy works the Save WAV to save, well, not a WAV, yet a decodable data, witch using FFmpeg can be comverted to WAV and worked with later.
In some cases I used the Export raw audio option, but usually everything works. Untill this video:
http://www.moonfaker.com/videos4mirror/Re_Moon_Hoax_Not.wmv.zip

When I saved the audio (raw as x.bit, "Save WAV" as x.wma) using VirtualDub, I cannot decode it using FFmpeg (latest):

QUOTE
D:\Tools\Lame>ffmpeg -i x.wma -vn -f wav x.wav
ffmpeg version N-50880-gc3bb2f7 Copyright © 2000-2013 the FFmpeg developers
  built on Mar 13 2013 17:56:41 with gcc 4.4.4 (GCC) (x86.generic.Komisar)
  configuration: --disable-w32threads
  libavutil      52. 19.100 / 52. 19.100
  libavcodec    55.  0.100 / 55.  0.100
  libavformat    55.  0.100 / 55.  0.100
  libavdevice    54.  4.100 / 54.  4.100
  libavfilter    3. 45.101 /  3. 45.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample  0. 17.102 /  0. 17.102
[wav @ 0191f380] no 'data' tag found
x.wma: Invalid data found when processing input

D:\Tools\Lame>ffmpeg -i x.bin -vn -f wav x.wav
ffmpeg version N-50880-gc3bb2f7 Copyright © 2000-2013 the FFmpeg developers
  built on Mar 13 2013 17:56:41 with gcc 4.4.4 (GCC) (x86.generic.Komisar)
  configuration: --disable-w32threads
  libavutil      52. 19.100 / 52. 19.100
  libavcodec    55.  0.100 / 55.  0.100
  libavformat    55.  0.100 / 55.  0.100
  libavdevice    54.  4.100 / 54.  4.100
  libavfilter    3. 45.101 /  3. 45.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample  0. 17.102 /  0. 17.102
[NULL @ 01946380] [IMGUTILS @ 0022f424] Picture size 1280x917072 is invalid
[NULL @ 01946380] Ignoring invalid width/height values
[bintext @ 01946380] Warning: not compiled with thread support, using thread emu
lation
[bintext @ 01946380] [IMGUTILS @ 0022f234] Picture size 0x0 is invalid
[bintext @ 01946380] video_get_buffer: image parameters invalid
[bintext @ 01946380] get_buffer() failed
[bin @ 0191f3a0] Stream #0: not enough frames to estimate rate; consider increas
ing probesize
[bin @ 0191f3a0] decoding for stream 0 failed
[bin @ 0191f3a0] Could not find codec parameters for stream 0 (Video: bintext, p
al8): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[bin @ 0191f3a0] Estimating duration from bitrate, this may be inaccurate
x.bin: could not find codec parameters


Of course, I can much easier extract the audio using FFmpeg completely:
ffmpeg -i x.wmv x.wav

...and it works just perfectly.

Cases in point
- exporting wma v2 audio somewhat not work at all.
- saving WAV never produce actually a WAV and also did not work correctly when using wma v2 audio


FFmpeg is open source and the code that save the audio well can be borrowed from it easily smile.gif


PS. I have a suggestion to make. After seeing some videos on YewTube, that emphasise choosing the setting "Video:Direct strem copy" - http://www.youtube.com/watch?v=lz8pZtk_ATE - how about to make this a default? Just for the simplier part of the users, lol. So that they not end up with crazy huge videos, so.... That should not hurt anyone?

Posted by: phaeron Mar 17 2013, 02:09 AM
Using the Save WAV command to produce a .wma file is bogus. WAV files can be compressed, and so that's what you're getting; however, not all programs can deal with this, and in your case you're likely relying on some scanning logic in FFMpeg that isn't guaranteed to be able to skip past the WAV header reliably. If what you want is an uncompressed PCM WAV file, change the audio mode. If you want raw data, use the Export Raw Audio command.

Posted by: Abrazo Mar 17 2013, 10:16 AM
@trodas

I do not know what your final goal may be, but I do not see any problem to export whatever audio from within VirtualDub directly to a WAV by this method:
> Set the Audio menu to Full processing mode
> Set Audio > Compression... to "<No compression (PCM)>"
> Set Audio > Conversion... > Sampling / Precision / Channels / High quality, to whatever you want
> File > Save WAV...

In this manner you can even transform or "convert" the audio directly into another codec-format, by:
> setting Audio > Compression... to for exemple MPEG Layer-3
> File > Save WAV...

I did a few tests with your sample video : no problem at all.

It is only when leaving Audio-menu to "Direct Stream Copy" that you extract the original audio out of the movie and that you will get an audio-file that you maybe cannot read with another program.

Posted by: trodas Mar 18 2013, 10:57 AM
phaeron - you are right, usually it works, but not all the time, sadly sad.gif I have to pay more attention to the VirtualDub settings.


Abrazo - thanks a lot for the explaination. I never come to realize, that what I choose VirtualDub to do in the Audio menu settings does apply to even the Save WAV function, witch I - to this day - seen as independent function that have really no connection to anything... I was dead wrong. And now I feel ashamed that I did not come to this conclusion sooner. In fact, I did not need FFmpeg now at all, since VirtualDub can and do save WAV perfectly... tongue.gif wub.gif

Mea culpa.

Powered by Invision Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)