From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 1/1] avformat/demux: Fix accurate probing of durations in mpegts/ps
Date: Thu, 14 Mar 2024 23:41:16 +0100
Message-ID: <20240314224116.GD6420@pb2> (raw)
In-Reply-To: <20240314175739.1499196-2-nicolas.gaullier@cji.paris>
[-- Attachment #1.1: Type: text/plain, Size: 2269 bytes --]
On Thu, Mar 14, 2024 at 06:57:39PM +0100, Nicolas Gaullier wrote:
> Two issues affect accuracy of duration in estimate_timings_from_pts():
> - pkt->duration typically reports the duration of a single audio frame,
> whereas a pes often contain several audio frames
> - for video, compute_frame_duration() use r_frame_rate which is not
> reliable; typically, it is the duration of a single field for an
> interlaced video using two field pictures.
>
> Packet splitting/parsing is required to get accurate durations, so this
> patch replaces ff_read_packet() calls by av_read_frame() calls.
>
> Note that concatdec makes use of avformat_find_stream_info() to stitch
> correctly the files, so it benefits from this patch (typically, overlap
> is avoided).
> e.g. in fate/concat-demuxer-simple2-lavf-ts: the input audio stream
> duration is now longer than that of the video, which results in
> concatdec joining on audio after the patch instead of joining on video
> before that.
>
> Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris>
> ---
> libavformat/demux.c | 30 +---
> tests/ref/fate/concat-demuxer-simple2-lavf-ts | 170 +++++++++---------
> tests/ref/fate/ts-opus-demux | 4 +-
> 3 files changed, 93 insertions(+), 111 deletions(-)
for some reason this seems to loose a resolution of some subtitle stream when probing:
make -j32 && ./ffprobe -v 99 -analyzeduration 2G -probesize 2G -i tickets/2471/part.ts 2>&1 | grep dvb_teletext
Stream #0:2[0x240](eng), 1020, 1/90000: Subtitle: dvb_teletext (libzvbi_teletextdec) ([6][0][0][0] / 0x0006), 492x250
Stream #0:4[0x247](eng), 1902, 1/90000: Subtitle: dvb_teletext (libzvbi_teletextdec) ([6][0][0][0] / 0x0006), 492x250
vs.
Stream #0:2[0x240](eng), 1020, 1/90000: Subtitle: dvb_teletext (libzvbi_teletextdec) ([6][0][0][0] / 0x0006), 492x250
Stream #0:4[0x247](eng), 1902, 1/90000: Subtitle: dvb_teletext (libzvbi_teletextdec) ([6][0][0][0] / 0x0006)
ive not looked at this so i have no idea this is a bug, just wanted to report it
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I have often repented speaking, but never of holding my tongue.
-- Xenocrates
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
prev parent reply other threads:[~2024-03-14 22:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-14 17:57 [FFmpeg-devel] [PATCH 0/1] " Nicolas Gaullier
2024-03-14 17:57 ` [FFmpeg-devel] [PATCH 1/1] " Nicolas Gaullier
2024-03-14 22:41 ` Michael Niedermayer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240314224116.GD6420@pb2 \
--to=michael@niedermayer.cc \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git