[MPlayer-users] a/v sync problem
Heitzso
heitzso at growthmodels.com
Tue May 31 19:35:32 CEST 2005
I'm downloading source now. Assuming 1.0pre7 source
(same as what I've been running on my gentoo box for
dev, though deploying and doing all of the actual compression
on ubuntu). Will apply your patch and test. Please let
me know if I should be patching a cvs snapshot. Thanks.
>>>I'm having an incredibly difficult time trying to compress
>>>these broken files because most tools assume the audio
>>>is to spec and is 48000. And they won't let you override
>>>the spec 48000 with 48008.
>>>
>>>
>>If you use mencoder to encode the video, adding the option
>>-srate 48000 should solve the problem. Have you tryed it?
>>(use it togheter with -af-adv force=1 and, may be, -af resample)
>>
>>Giacomo
>>
>>
>>
>
>his problem is in the *input* sampling rate, not the output.
>Second version of the patch, should work better :)
>
>
>
>
>------------------------------------------------------------------------
>
>Index: cfg-common.h
>===================================================================
>RCS file: /cvsroot/mplayer/main/cfg-common.h,v
>retrieving revision 1.145
>diff -u -r1.145 cfg-common.h
>--- cfg-common.h 13 May 2005 14:45:28 -0000 1.145
>+++ cfg-common.h 31 May 2005 14:37:07 -0000
>@@ -142,6 +142,7 @@
> // force video/audio rate:
> {"fps", &force_fps, CONF_TYPE_FLOAT, CONF_MIN, 0, 0, NULL},
> {"srate", &force_srate, CONF_TYPE_INT, CONF_RANGE, 1000, 8*48000, NULL},
>+ {"israte", &force_input_srate, CONF_TYPE_INT, CONF_RANGE, 1000, 8*48000, NULL},
> {"channels", &audio_output_channels, CONF_TYPE_INT, CONF_RANGE, 1, 6, NULL},
> {"format", &audio_output_format, CONF_TYPE_AFMT, 0, 0, 0, NULL},
> {"speed", &playback_speed, CONF_TYPE_FLOAT, CONF_RANGE, 0.01, 100.0, NULL},
>Index: mencoder.c
>===================================================================
>RCS file: /cvsroot/mplayer/main/mencoder.c,v
>retrieving revision 1.287
>diff -u -r1.287 mencoder.c
>--- mencoder.c 24 May 2005 19:46:44 -0000 1.287
>+++ mencoder.c 31 May 2005 14:37:07 -0000
>@@ -155,6 +155,7 @@
> float playback_speed=1.0;
>
> static int force_srate=0;
>+static int force_input_srate=0;
> static int audio_output_format=0;
>
> char *vobsub_out=NULL;
>@@ -571,6 +572,7 @@
> }
>
> if (sh_audio) {
>+ sh_audio->samplerate = force_input_srate ? force_input_srate : sh_audio->samplerate;
> new_srate = sh_audio->samplerate;
> if (playback_speed != 1.0) {
> new_srate *= playback_speed;
>Index: mplayer.c
>===================================================================
>RCS file: /cvsroot/mplayer/main/mplayer.c,v
>retrieving revision 1.844
>diff -u -r1.844 mplayer.c
>--- mplayer.c 29 Apr 2005 10:48:32 -0000 1.844
>+++ mplayer.c 31 May 2005 14:37:08 -0000
>@@ -284,6 +284,7 @@
>
> float force_fps=0;
> static int force_srate=0;
>+static int force_input_srate=0;
> static int audio_output_format=0;
> int frame_dropping=0; // option 0=no drop 1= drop vo 2= drop decode
> static int play_n_frames=-1;
>@@ -944,6 +945,7 @@
> mixer.afilter = NULL;
> return 0;
> }
>+ sh_audio->samplerate = force_input_srate ? force_input_srate : sh_audio->samplerate;
> new_srate = sh_audio->samplerate * playback_speed;
> if (new_srate != ao_data->samplerate) {
> // limits are taken from libaf/af_resample.c
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>MPlayer-users mailing list
>MPlayer-users at mplayerhq.hu
>http://mplayerhq.hu/mailman/listinfo/mplayer-users
>
>
More information about the MPlayer-users
mailing list