Re: [FFmpeg-devel] [PATCH] lavf/utils: Fix DTS for short H264 streams.

2016-03-12 Thread Michael Niedermayer
On Sat, Mar 12, 2016 at 02:40:25AM -0800, Sasi Inguva wrote: > Fill DTS if all packets have been read in avformat_find_stream_info, and still > has_decode_delay_been_guessed returns false. > > Signed-off-by: Sasi Inguva > --- > libavformat/utils.c | 77 ++--- > t

Re: [FFmpeg-devel] [PATCH] lavf/utils: Fix DTS for short H264 streams.

2016-03-12 Thread Sasi Inguva
Sent the patch with modifications, and also added a fate test. Please use this file https://drive.google.com/file/d/0Bz6XfEJZ-9N3cy1nYnRweHRFRjQ/view?usp=sharing for the fate test . framecrc muxer is giving valid DTS with/without this patch so I used probeframes for the test. On Fri, Mar 11, 2016

[FFmpeg-devel] [PATCH] lavf/utils: Fix DTS for short H264 streams.

2016-03-12 Thread Sasi Inguva
Fill DTS if all packets have been read in avformat_find_stream_info, and still has_decode_delay_been_guessed returns false. Signed-off-by: Sasi Inguva --- libavformat/utils.c | 77 ++--- tests/fate/h264.mak | 3 + tests/ref/fate/h264-dts_5frames | 1

Re: [FFmpeg-devel] [PATCH] lavf/utils: Fix DTS for short H264 streams.

2016-03-11 Thread Michael Niedermayer
On Fri, Mar 11, 2016 at 01:54:07PM -0800, Sasi Inguva wrote: > For testing , a link to one such failing video > https://drive.google.com/file/d/0Bz6XfEJZ-9N3X0FSMWR6T3B3U28/view?usp=sharing > . Without this patch, can we include this video in the fate samples for adding a fate test? [...] -- Mi

Re: [FFmpeg-devel] [PATCH] lavf/utils: Fix DTS for short H264 streams.

2016-03-11 Thread Michael Niedermayer
On Fri, Mar 11, 2016 at 12:34:19PM -0800, Sasi Inguva wrote: > Fill DTS if all packets have been read in avformat_find_stream_info, and still > has_decode_delay_been_guessed returns false. > > Signed-off-by: Sasi Inguva > --- > libavformat/utils.c | 37 + > 1

Re: [FFmpeg-devel] [PATCH] lavf/utils: Fix DTS for short H264 streams.

2016-03-11 Thread Sasi Inguva
We get significant uploads of short timelapse videos which are of very low frame rate very short length videos, and contain 5-6 frames. We also have lot of teams using very small test-files, so that they can test their pipeline very fast. Sorry for the unintended space insertion. I couldn't figur

Re: [FFmpeg-devel] [PATCH] lavf/utils: Fix DTS for short H264 streams.

2016-03-11 Thread Carl Eugen Hoyos
Sasi Inguva ffmpeg.org> writes: > Fill DTS if all packets have been read in > avformat_find_stream_info, and still > has_decode_delay_been_guessed returns false. Could you explain your use-case? Are streams with less than seven frames frequent? > return 1; > #endif > + No unrelated

Re: [FFmpeg-devel] [PATCH] lavf/utils: Fix DTS for short H264 streams.

2016-03-11 Thread Sasi Inguva
For testing , a link to one such failing video https://drive.google.com/file/d/0Bz6XfEJZ-9N3X0FSMWR6T3B3U28/view?usp=sharing . Without this patch, ffprobe -show_frames -print_format compact | grep media_type=video - shows dts=N/A On Fri, Mar 11, 2016 at 12:39 PM, Sasi Inguva wrote: > With th

Re: [FFmpeg-devel] [PATCH] lavf/utils: Fix DTS for short H264 streams.

2016-03-11 Thread Sasi Inguva
Having another go at this. My goal is to fix DTS of H264 videos which are shorter than 7 frames and don't have B-frames. Currently ffmpeg will output DTS=N/A for such frames. On Fri, Mar 11, 2016 at 12:34 PM, Sasi Inguva wrote: > Fill DTS if all packets have been read in avformat_find_stream_inf

Re: [FFmpeg-devel] [PATCH] lavf/utils: Fix DTS for short H264 streams.

2016-03-11 Thread Sasi Inguva
With this patch it doesn't produce invalid DTS for the file you mentioned tickets/1242/sample.mkv ./ffmpeg -i sample.mkv -c:v copy -an -t 1 -f framecrc - On Fri, Mar 11, 2016 at 12:36 PM, Sasi Inguva wrote: > Having another go at this. My goal is to fix DTS of H264 videos which are > shorter tha

[FFmpeg-devel] [PATCH] lavf/utils: Fix DTS for short H264 streams.

2016-03-11 Thread Sasi Inguva
Fill DTS if all packets have been read in avformat_find_stream_info, and still has_decode_delay_been_guessed returns false. Signed-off-by: Sasi Inguva --- libavformat/utils.c | 37 + 1 file changed, 37 insertions(+) diff --git a/libavformat/utils.c b/libavfor