How to generate a 8 bit per sample wav audio file in VLC

1

I'm using the following vlc command line to extract first 5 minutes of audio from video file

"-I dummy -vvv --no-sout-video --sout-audio --no-sout-rtp-sap --no-sout-standard-sap --ttl=1 --sout-transcode-threads=5 --sout-transcode-high-priority --sout-keep --sout #transcode{acodec=s16l,channels=1,samplerate=8000,ab=64}:std{mux=wav,access=file,dst="c:\dest.wav"} "c:\originalvideo.mpg" --start-time=0 --stop-time=300 vlc://quit";

if ab=64 =>64 k bits per second and samples per second=8 k samples then bits per sample=64/8=8 bits per sample but the problem is that the output file always has samples of 16 bits per sample. I know that sample can contain bits from 8 , 16, 24 to 32 bits per sample. i want to get 8 bits per sample file how can this be done ?

ahmedsafan86

Posted 2012-04-10T15:47:57.080

Reputation: 113

1

did you know that the audiocodec you have there S16L stands for "signed 16-bit little endian" You want some kind of 8bit, it might be U8 (for unsigned) ? I didnt see where that was ever used, and some (other) conversions fail when attempting it. might be easier to extract it in a "best" format or unchanged stream, and convert it with an audio editor, and even add in a bit of smoothing to hide the lack of bits. http://wiki.videolan.org/Raw . If size is the issue most, MP3 looks like one of the options.

– Psycogeek – 2012-04-11T17:21:46.153

thank you very much about that the link was useful i'll try the u8 or s8 to see. I want it to be done by vlc as i do it using programming and its my only tool to be used. i save the audio as a temporary file o need to decrease the size but i still need it to be wav my classes can only parse the wav files – ahmedsafan86 – 2012-04-11T20:42:10.983

No answers