Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 ?

share|improve this question
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. wiki.videolan.org/Raw . If size is the issue most, MP3 looks like one of the options. –  Psycogeek Apr 11 '12 at 17:21
    
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 Apr 11 '12 at 20:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.