[vlc-devel] wma1/wma2 encoding using ffmpeg module
Alex Antropoff
alant at transtelecom.md
Sat Sep 8 22:29:59 CEST 2007
On Fri, Sep 07, 2007 at 09:24:26PM +0300, Alex Antropoff wrote:
AA> Hello, currently ffmpeg can encode wma1/wma2 audio, but resulting avi/asf has
AA> noise instead of real sound. Encoding with ffmpeg command line works, I got avi/asf with
AA> good sound. I've tried to make mmsh stream without success:
AA> vlc -I dummy -vvv udp://@224.33.100.101:1234 --sout '#transcode{vcodec=DIV3,vb=128,width=320,height=240,acodec=wma1,samplerate=22050,ab=96,channels=2}:std{access=mmsh,mux=asfh,dst=:18080}'
I found a bug, wma1/2 (and probably other) encoders calculate block_align during
initializing, but vlc don't copy it to p_enc->fmt_out.audio.i_blockalign after
avcodec_open call.
Attached diff make it, please, check and commit.
--
Regards,
Alex Antropoff
-------------- next part --------------
diff -ru vlc-0.8.6c.orig/modules/codec/ffmpeg/encoder.c vlc-0.8.6c/modules/codec/ffmpeg/encoder.c
--- vlc-0.8.6c.orig/modules/codec/ffmpeg/encoder.c 2007-06-16 17:25:12.000000000 +0300
+++ vlc-0.8.6c/modules/codec/ffmpeg/encoder.c 2007-09-08 23:19:13.874799509 +0300
@@ -643,6 +643,7 @@
p_sys->p_buffer_out = malloc( 2 * AVCODEC_MAX_AUDIO_FRAME_SIZE );
p_sys->i_frame_size = p_context->frame_size * 2 * p_context->channels;
p_sys->p_buffer = malloc( p_sys->i_frame_size );
+ p_enc->fmt_out.audio.i_blockalign = p_context->block_align;
}
msg_Dbg( p_enc, "found encoder %s", psz_namecodec );
More information about the vlc-devel
mailing list