Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Anton Khirnov <anton@khirnov.net>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [FFmpeg-cvslog] fftools/sync_queue: use timebase from input frames/packets
Date: Wed, 12 Apr 2023 12:26:20 +0200
Message-ID: <168129518072.27013.5339209048979875329@lain.khirnov.net> (raw)
In-Reply-To: <20230412084150.GA275832@pb2>

After some investigation, it seems that before this patch there was a
bug in the sync queue setup code that caused a wrong timebase to be used
for the audio stream. Because of that, many more audio frames were
output than should have been (116 frames/133632 samples/2.8 seconds).

After the patch, the correct timebase is used and only 9 audio frames
(10368 samples, 0.216 seconds) are encoded. This is much closer to the
3 video frames requested in your commandline and thus more correct.
As a result, the file is now much smaller and the
 if (lensum*9/10 > maxpos || lensum < maxpos*9/10)
check currently on line 476 of avidec.c triggers and stops bitrate
calculation. I cannot say whether that check is faulty, but this patch
seems like it's doing what it should.

-- 
Anton Khirnov
_______________________________________________
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".

      parent reply	other threads:[~2023-04-12 10:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230409135009.BE4F3410865@natalya.videolan.org>
2023-04-10 19:01 ` Michael Niedermayer
2023-04-12  8:06   ` Anton Khirnov
2023-04-12  8:41     ` Michael Niedermayer
2023-04-12  8:44       ` Michael Niedermayer
2023-04-12 10:26       ` Anton Khirnov [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=168129518072.27013.5339209048979875329@lain.khirnov.net \
    --to=anton@khirnov.net \
    --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