First off, VLC rocks. I'm using it to transcode some 720x406 1000kb/s WMV3 25fps video/wma2 44100Hz 16-bit audio streams into mobile format (288x216 x264/mp4a ~160kb/s total) on my Windows machine running Darwin Stream Server. For the most part, this works amazingly well for free software... except for the resulting audio quality. No matter what options I choose, the audio sounds pretty miserable. Warbling, underwater, distorted, call it what you want. Here's my successful transcoding command lines:
Using VLC 1.0.5:
Code: Select all
"C:\Program Files\VideoLAN\VLC\vlc.exe" -vvv -I dummy "http://streamsourceurl" --sout "#transcode{width=288,canvas-height=216,venc=x264{profile=baseline,level=3.0,nocabac,nobframes,ref=1},vcodec=x264,vb=120,scale=1,audio-sync,acodec=mp4a,samplerate=32000,ab=36,channels=1}:rtp{mp4a-latm,dst=127.0.0.1,port-video=1040,port-audio=1042,sdp="file://C:/streams/output.sdp"}" --repeat
(Explanation... using this in a command line window, it runs verbose, without an interface GUI, transcoding to a smaller, non-stretched resolution mobile-compatible baseline profile. The video looks very acceptable like this! The audio should be all right at these settings- heck, I've tried changing the samplerate and bitrate significantly, but with little to no improvement. Even an mp3 stream should sound somewhat acceptable with these settings though; unfortunately, the x264/mp3 combo (acodec=mp3) isn't compatible with my receiving device.)
Using VLC 1.1.3:
Code: Select all
"C:\Program Files\VideoLAN\VLC113\vlc.exe" -vvv -I dummy "http://streamsourceurl" --sout="#transcode{width=288,canvas-height=216,venc=x264
{profile=baseline,level=3.0,nocabac,nobframes,keyint=60,idrint=2},vcodec=x264,vb=120,scale=1,acodec=mp4a,ab=48,channels=2,samplerate=44100}:rtp{dst=127.0.0.1,port=1234,sdp=file:///C:\streams\output.sdp}"
(Not much difference here. I tried upping the settings, but the audio stays pretty rough. I removed the "repeat" trigger while testing this, as it's just used so that if the source stream ever disconnects, it will reconnect by itself. v1.1.4 isn't worth mentioning, as the audio becomes so totally broken it isn't worth trying to mess with. I've also tried the latest 1.2 beta, but that just crashes immediately.)
Can anyone offer any insight? I don't need CD-quality- this is a mobile device, after all- but the high-pitched distortion is rather annoying. Is it a known bug without a fix, or has anyone figured out a workaround? Thanks very much in advance!