Re: [FFmpeg-devel] [PATCH] lavf/mov.c: Use the correct timescale when seeking for audio.
On 11/1/2016 5:01 PM, Sasi Inguva wrote: > When we add up (last pts + 0.023 ) it amounts to that . We fix the last > packet duration according to edit list segment duration in our edit list > patch. Here last pts = 1324.652 . I figured this was the case. IIRC, the OGG code works like this too. Thanks, - Derek ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavf/mov.c: Use the correct timescale when seeking for audio.
Yes. This is expected. The audio has an edit list with duration 7294805 which at a timescale of 600 means 1324.675 . Entry[0].SegmentDuration 794805 Entry[0].MediaTime 2048 ~/ffmpeg_new/ffprobe -show_frames -print_format compact -select_streams 1 ~/Downloads/edit_list_sample.mp4 When we add up (last pts + 0.023 ) it amounts to that . We fix the last packet duration according to edit list segment duration in our edit list patch. Here last pts = 1324.652 . diff <(~/ffmpeg_old/ffprobe -show_frames -print_format compact -select_streams 1 ~/Downloads/edit_list_sample.mp4 ) <(~/ffmpeg_new/ffprobe -show_frames -print_format compact -select_streams 1 ~/Downloads/edit_list_sample.mp4 ) < frame|media_type=audio|stream_index=1|key_frame=1|pkt_pts= 58417152|pkt_pts_time=1324.651973|pkt_dts=58417152|pkt_ dts_time=1324.651973|best_effort_timestamp=58417152| best_effort_timestamp_time=1324.651973|pkt_duration=3072| pkt_duration_time=0.069660|pkt_pos=217515035|pkt_size= 424|sample_fmt=fltp|nb_samples=1024|channels=2|channel_layout=stereo --- > frame|media_type=audio|stream_index=1|key_frame=1|pkt_pts= 58417152|pkt_pts_time=1324.651973|pkt_dts=58417152|pkt_ dts_time=1324.651973|best_effort_timestamp=58417152| best_effort_timestamp_time=1324.651973|pkt_duration=1016| pkt_duration_time=0.023039|pkt_pos=217515035|pkt_size= 424|sample_fmt=fltp|nb_samples=1024|channels=2|channel_layout=stereo On Tue, Nov 1, 2016 at 7:01 AM, Derek Buitenhuiswrote: > On 10/31/2016 1:48 PM, Rostislav Pehlivanov wrote: > > The tests pass on my machine, pushed after Derek said it looks correct. > > Hi Sasi, > > I notice there's still one difference after this patch. Could you > explain if this is intended: > > -"duration": 3072, > -"duration_time": "0.069660", > +"duration": 1016, > +"duration_time": "0.023039", > > This is on the very last packet of the file (the same file I sent you > before). > > Cheers, > - Derek > > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavf/mov.c: Use the correct timescale when seeking for audio.
On 10/31/2016 1:48 PM, Rostislav Pehlivanov wrote: > The tests pass on my machine, pushed after Derek said it looks correct. Hi Sasi, I notice there's still one difference after this patch. Could you explain if this is intended: -"duration": 3072, -"duration_time": "0.069660", +"duration": 1016, +"duration_time": "0.023039", This is on the very last packet of the file (the same file I sent you before). Cheers, - Derek ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavf/mov.c: Use the correct timescale when seeking for audio.
On Mon, Oct 31, 2016 at 01:48:26PM +, Rostislav Pehlivanov wrote: > On 31 October 2016 at 13:13, Derek Buitenhuis> wrote: > > > On 10/27/2016 10:48 PM, Sasi Inguva wrote: > > > gentle ping. > > > > > > Thanks! > > > > A ping from me, too. > > > > - Derek > > ___ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > The tests pass on my machine, pushed after Derek said it looks correct. thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Avoid a single point of failure, be that a person or equipment. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavf/mov.c: Use the correct timescale when seeking for audio.
On 31 October 2016 at 13:13, Derek Buitenhuiswrote: > On 10/27/2016 10:48 PM, Sasi Inguva wrote: > > gentle ping. > > > > Thanks! > > A ping from me, too. > > - Derek > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > The tests pass on my machine, pushed after Derek said it looks correct. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavf/mov.c: Use the correct timescale when seeking for audio.
On 10/27/2016 10:48 PM, Sasi Inguva wrote: > gentle ping. > > Thanks! A ping from me, too. - Derek ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavf/mov.c: Use the correct timescale when seeking for audio.
gentle ping. Thanks! On Mon, Oct 24, 2016 at 4:20 PM, Michael Niedermayerwrote: > On Sun, Oct 23, 2016 at 10:41:52PM -0700, Sasi Inguva wrote: > > Attaching the fate sample. > > uploaded > > thx > > [...] > > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > If you drop bombs on a foreign country and kill a hundred thousand > innocent people, expect your government to call the consequence > "unprovoked inhuman terrorist attacks" and use it to justify dropping > more bombs and killing more people. The technology changed, the idea is > old. > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavf/mov.c: Use the correct timescale when seeking for audio.
On Sun, Oct 23, 2016 at 10:41:52PM -0700, Sasi Inguva wrote: > Attaching the fate sample. uploaded thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If you drop bombs on a foreign country and kill a hundred thousand innocent people, expect your government to call the consequence "unprovoked inhuman terrorist attacks" and use it to justify dropping more bombs and killing more people. The technology changed, the idea is old. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavf/mov.c: Use the correct timescale when seeking for audio.
Attaching the fate sample. 2016-10-23 22:37 GMT-07:00 Sasi Inguva: > Signed-off-by: Sasi Inguva > --- > libavformat/mov.c | 2 +- > tests/fate/mov.mak | 6 +- > tests/ref/fate/mov-aac-2048-priming | 217 ++ > ++ > 3 files changed, 223 insertions(+), 2 deletions(-) > create mode 100644 tests/ref/fate/mov-aac-2048-priming > > diff --git a/libavformat/mov.c b/libavformat/mov.c > index dada1e0..5df13f1 100644 > --- a/libavformat/mov.c > +++ b/libavformat/mov.c > @@ -3028,7 +3028,7 @@ static void mov_fix_index(MOVContext *mov, AVStream > *st) > // Audio decoders like AAC need need a decoder delay samples > previous to the current sample, > // to correctly decode this frame. Hence for audio we seek to > a frame 1 sec. before the > // edit_list_media_time to cover the decoder delay. > -search_timestamp = FFMAX(search_timestamp - mov->time_scale, > e_old[0].timestamp); > +search_timestamp = FFMAX(search_timestamp - msc->time_scale, > e_old[0].timestamp); > } > > index = find_prev_closest_keyframe_index(st, e_old, nb_old, > search_timestamp, 0); > diff --git a/tests/fate/mov.mak b/tests/fate/mov.mak > index 4b5885b..6b79832 100644 > --- a/tests/fate/mov.mak > +++ b/tests/fate/mov.mak > @@ -4,7 +4,8 @@ FATE_MOV = fate-mov-3elist \ > fate-mov-1elist-noctts \ > fate-mov-elist-starts-ctts-2ndsample \ > fate-mov-1elist-ends-last-bframe \ > - fate-mov-2elist-elist1-ends-bframe > + fate-mov-2elist-elist1-ends-bframe \ > + fate-mov-aac-2048-priming > > FATE_SAMPLES_AVCONV += $(FATE_MOV) > > @@ -26,3 +27,6 @@ fate-mov-1elist-ends-last-bframe: CMD = framemd5 -i > $(TARGET_SAMPLES)/mov/mov-1e > > # Makes sure that we handle timestamps of packets in case of multiple > edit lists with one of them ending on a B-frame correctly. > fate-mov-2elist-elist1-ends-bframe: CMD = framemd5 -i > $(TARGET_SAMPLES)/mov/mov-2elist-elist1-ends-bframe.mov > + > +fate-mov-aac-2048-priming: ffprobe$(PROGSSUF)$(EXESUF) > +fate-mov-aac-2048-priming: CMD = run ffprobe$(PROGSSUF)$(EXESUF) > -show_packets -print_format compact $(TARGET_SAMPLES)/mov/aac-2048 > -priming.mov > diff --git a/tests/ref/fate/mov-aac-2048-priming > b/tests/ref/fate/mov-aac-2048-priming > new file mode 100644 > index 000..d5ae31e > --- /dev/null > +++ b/tests/ref/fate/mov-aac-2048-priming > @@ -0,0 +1,217 @@ > +packet|codec_type=audio|stream_index=0|pts=-2048|pts_time=- > 0.046440|dts=-2048|dts_time=-0.046440|duration=1024|duratio > n_time=0.023220|convergence_duration=N/A|convergence_ > duration_time=N/A|size=281|pos=36|flags=KD > +packet|codec_type=audio|stream_index=0|pts=-1024|pts_time=- > 0.023220|dts=-1024|dts_time=-0.023220|duration=1024|duratio > n_time=0.023220|convergence_duration=N/A|convergence_ > duration_time=N/A|size=258|pos=294|flags=KD > +packet|codec_type=audio|stream_index=0|pts=0|pts_time=0. > 00|dts=0|dts_time=0.00|duration=1024|duration_time= > 0.023220|convergence_duration=N/A|convergence_duration_time= > N/A|size=146|pos=552|flags=K_ > +packet|codec_type=audio|stream_index=0|pts=1024|pts_time=0. > 023220|dts=1024|dts_time=0.023220|duration=1024|duration_ > time=0.023220|convergence_duration=N/A|convergence_ > duration_time=N/A|size=186|pos=698|flags=K_ > +packet|codec_type=audio|stream_index=0|pts=2048|pts_time=0. > 046440|dts=2048|dts_time=0.046440|duration=1024|duration_ > time=0.023220|convergence_duration=N/A|convergence_ > duration_time=N/A|size=222|pos=884|flags=K_ > +packet|codec_type=audio|stream_index=0|pts=3072|pts_time=0. > 069660|dts=3072|dts_time=0.069660|duration=1024|duration_ > time=0.023220|convergence_duration=N/A|convergence_ > duration_time=N/A|size=186|pos=1106|flags=K_ > +packet|codec_type=audio|stream_index=0|pts=4096|pts_time=0. > 092880|dts=4096|dts_time=0.092880|duration=1024|duration_ > time=0.023220|convergence_duration=N/A|convergence_ > duration_time=N/A|size=206|pos=1292|flags=K_ > +packet|codec_type=audio|stream_index=0|pts=5120|pts_time=0. > 116100|dts=5120|dts_time=0.116100|duration=1024|duration_ > time=0.023220|convergence_duration=N/A|convergence_ > duration_time=N/A|size=199|pos=1498|flags=K_ > +packet|codec_type=audio|stream_index=0|pts=6144|pts_time=0. > 139320|dts=6144|dts_time=0.139320|duration=1024|duration_ > time=0.023220|convergence_duration=N/A|convergence_ > duration_time=N/A|size=236|pos=1697|flags=K_ > +packet|codec_type=audio|stream_index=0|pts=7168|pts_time=0. > 162540|dts=7168|dts_time=0.162540|duration=1024|duration_ > time=0.023220|convergence_duration=N/A|convergence_ > duration_time=N/A|size=208|pos=1933|flags=K_ > +packet|codec_type=audio|stream_index=0|pts=8192|pts_time=0. > 185760|dts=8192|dts_time=0.185760|duration=1024|duration_ > time=0.023220|convergence_duration=N/A|convergence_ >