[FFmpeg-devel] Audio Video Sync issue with dvr-ms files
Michael Niedermayer
michaelni
Fri May 11 15:23:20 CEST 2007
Hi
On Thu, May 10, 2007 at 05:28:52PM -0400, Jonathon Elwood wrote:
[...]
> >
> >
> >>
> >> Lastly, I have a problem where the first frame is "frozen" until the
> >> video gets to the first Key Frame (of course after that the AV is
> >> completly out of sync). I can fix this problem with the interpolation
> >> code as well, so maybe once I set the frame rate this problem will go
> >> away...
> >>
> >> >> + audio_video_type = get_byte(pb); //This value appears to
> >> >identify the type of audio and video.
> >> >
> >> >can this be used to identify ac3/mp3 properly?
> >> On 99% of my samples yes. However, I do have one sample where this
> >> value is very strange. Having said that, I'm not convinced this value
> >> is unreliable because something else is going on with this sample.
> >> The timestamps are all messed up as well (for example: the stamps will
> >> be 192467, 189164, 193264). Plus the Key Frame markers arn't there.
> >> I haven't look into this yet, but my guess is values have shifted in
> >> the header, so we are just looking in the wrong spot. Once I figure
> >> out what's going on with this sample I'll be able to say whether this
> >> value will reliably identify the audio and video. However, John
> >> Donaghy's code to probe for the audio type is working well for me so
> >> I'm not sure we even need this.
> >
> >i dont like the current probe hack ...
> >if we can detected the the audio codec from some field in the header this
> >would be greatly preferred
> >
> >
> >[...]
> >
> >> + if
> >(s->streams[asf->stream_index]->codec->codec_type == CODEC_TYPE_AUDIO) {
> >> + //only assign the timestamp to the first
> >segment in a multiple segment payload
> >> + if (ts0 != -1) {
> >> + if (asf->last_aud_seq ==
> >asf->packet_seq)
> >> + asf->packet_frag_timestamp =
> >AV_NOPTS_VALUE;
> >> + else
> >> + asf->packet_frag_timestamp=
> >ts0/10000;
> >
> >isnt a check based on packet_frag_offset possible and simpler?
> >
> >also tabs are forbidden in svn
> >
> Unfortunately, I'm stuck? With the attached patch the fps is now
> detected correctly on all samples. Also the AV sync is correct on 80%
> of my samples. This is a nice improvement, but I still have the
> problem where the video is "stuck" on the first frame (this accounts
> for the 20% where the AV sync is incorrect). Unfortunately, I don't
> know where to look. Any help or guidance would be greatly
> appreciated.
one thing which is interresting is that asf videos generated by ffmpeg
are also sometimes having "stuck" frames when played with some versions
of wmp, so finding the exact cause of this might help .asf muxing too
maybe ...
> If anyone would like to see a sample that exhibits the "stuck frame"
> problem, I uploaded the sample on April 3rd that demonstrated this
> issue. ftp://upload.mplayerhq.hu/MPlayer/incoming/ NBA
> Basketball_WPTA-DT_28_01_2007_14_59_45.dvr-ms. If this sample doesn't
> exist on the ftp site any longer, please let me know and I'll upload
> it again.
yes, please do, also upload a .txt file with the same name which says
what the sample does
[...]
> Index: asf.h
> ===================================================================
> --- asf.h (revision 8977)
> +++ asf.h (working copy)
> @@ -114,7 +114,10 @@
> int packet_time_delta;
> int packet_time_start;
> int64_t packet_pos;
> + int know_frame_time; //used for dvr-ms files
> + uint64_t avg_vid_frame_time; //used for dvr-ms files
unused
>
> +
cosmetic
but i guess the patch wasnt intended for svn anyway ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070511/98a83351/attachment.pgp>
More information about the ffmpeg-devel
mailing list