[vlc-devel] Slow audio when streaming flv

Dave Still dave at stilldesigning.com
Sat Jun 21 01:02:50 CEST 2008


So, I finally got VLC compiling for me again on my Mac (thanks,  
Pavlov!), and I'm back to revisit this audio bug.  I tried modifying  
"modules/codec/avcodec/encoder.c" line 578 from this:

         if ( p_enc->fmt_out.i_codec == VLC_FOURCC('m','p','4','a') )

to this:

         if ( p_enc->fmt_out.i_codec == VLC_FOURCC('m','p','4','a') ||  
p_enc->fmt_out.i_codec == VLC_FOURCC('m','p','3',' ') )

and then later to this:

         if ( p_enc->fmt_out.i_codec == VLC_FOURCC('m','p','4','a') ||  
p_enc->fmt_out.i_codec == VLC_FOURCC('m','p','g','a') )

I still get really slow-sounding audio as described below.  I'm using  
VLC as the streaming source for my slingbox-like application  
"TyStreamer". (Which the first revision of actually predates the  
founding of Sling Media! :D )  Everything works great except for this  
audio issue.  Since TyStreamer relies heavily on the 0.9.0 branch of  
VLC, I'm trying to coordinate a release candidate near the release  
test1, and obviously I'd like to have good audio for that release. :)

For the curious, the project is GPL and can be found at http://www.wiskars.com/tystreamer 
.  Latest SVN is recommended.

Thanks,
- Dave


On Apr 16, 2008, at 10:35 PM, Rafaël Carré wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Le Wed, 16 Apr 2008 17:59:30 -0700,
> Dave Still <dave at stilldesigning.com> a écrit :
>
>> I finally got VLC git to build on Mac OS X (Intel Leopard with
>> latest iPhone SDK), and everything works, but the audio is "slow".
>> Here's the command-line:
>>
>> '/Users/stealthdave/Movies/D061219_01/VIDEO_TS/VTS_01_1.VOB' --sout
>> "#transcode
>> {vcodec
>> =
>> FLV1
>> ,acodec
>> =
>> mp3
>> ,samplerate
>> = 
>> 44100,ab=128,vb=256,width=320,height=240}:std{access=http{mime=video/
>> x-flv},mux=ffmpeg{mux=flv},dst=0.0.0.0:8090/stream.flv}"
>>
>> The video plays at normal speed.  Rather than resampling the audio,
>> vlc is slowing down the audio to match the requested samplerate.  In
>> order to keep up with the video, vlc is dropping pieces of the
>> audio. This keeps the video and audio in sync (well done), but makes
>> videos of my wife sound like James Earl Jones (not so well
>> done ;) ).  The build was from git latest as of a couple of hours  
>> ago.
>
> Can you look in ffmpeg/codec/encoder.c line 571, there is a workaround
> for faac, could you try the same with acodec 'm','p','3',' ' ? (or
> maybe it is 'm','p','g','a' i'm not sure ..
>
> - --
> Rafaël Carré
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFIBuGJYWCeGMCv8Q8RAlkoAJ9F6cr0Em+P6LtQRgbqhMJmr7Q8WgCeL5/Q
> 21u7FldpajXjX+uTup9nlyM=
> =8BEb
> -----END PGP SIGNATURE-----
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel




More information about the vlc-devel mailing list