Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 02/18] fftools/ffmpeg_filter: refactor setting input timebase
Date: Mon, 11 Mar 2024 00:37:07 +0100
Message-ID: <20240310233707.GS6420@pb2> (raw)
In-Reply-To: <171011095238.7287.16406128798977096207@lain.khirnov.net>


[-- Attachment #1.1: Type: text/plain, Size: 3852 bytes --]

On Sun, Mar 10, 2024 at 11:49:12PM +0100, Anton Khirnov wrote:
> Quoting James Almer (2024-03-10 23:29:27)
> > On 3/10/2024 7:24 PM, Anton Khirnov wrote:
> > > Quoting Michael Niedermayer (2024-03-10 20:21:47)
> > >> On Sun, Mar 10, 2024 at 07:13:18AM +0100, Anton Khirnov wrote:
> > >>> Quoting Michael Niedermayer (2024-03-10 04:36:29)
> > >>>> On Fri, Mar 08, 2024 at 06:34:36AM +0100, Anton Khirnov wrote:
> > >>>>> Quoting Michael Niedermayer (2024-03-07 21:37:39)
> > >>>>>> On Wed, Mar 06, 2024 at 12:03:03PM +0100, Anton Khirnov wrote:
> > >>>>>>> Treat it analogously to stream parameters like format/dimensions/etc.
> > >>>>>>> This is functionally different from previous code in 2 ways:
> > >>>>>>> * for non-CFR video, the frame timebase (set by the decoder) is used
> > >>>>>>>    rather than the demuxer timebase
> > >>>>>>> * for sub2video, AV_TIME_BASE_Q is used, which is hardcoded by the
> > >>>>>>>    subtitle decoding API
> > >>>>>>>
> > >>>>>>> These changes should avoid unnecessary and potentially lossy timestamp
> > >>>>>>> conversions from decoder timebase into the demuxer one.
> > >>>>>>>
> > >>>>>>> Changes the timebases used in sub2video tests.
> > >>>>>>> ---
> > >>>>>>>   fftools/ffmpeg_filter.c               |  17 ++-
> > >>>>>>>   tests/ref/fate/sub2video_basic        | 182 +++++++++++++-------------
> > >>>>>>>   tests/ref/fate/sub2video_time_limited |   8 +-
> > >>>>>>>   3 files changed, 106 insertions(+), 101 deletions(-)
> > >>>>>>
> > >>>>>> breaks:
> > >>>>>>
> > >>>>>> ./ffmpeg -i \[a-s\]_full_metal_panic_fumoffu_-_01_-_the_man_from_the_south_-_a_hostage_with_no_compromises__rs2_\[1080p_bd-rip\]\[BBB48A25\].mkv  -filter_complex '[0:s:1]scale=800:600' -t 15 -qscale 2 -y a.avi
> > >>>>>>
> > >>>>>
> > >>>>> Use a constant framerate.
> > >>>>
> > >>>> why not automatically choose a supported timebase  ?
> > >>>>
> > >>>> "[mpeg4 @ 0x55973c869f00] timebase 1/1000000 not supported by MPEG 4 standard, the maximum admitted value for the timebase denominator is 65535"
> > >>>
> > >>> Because I don't want ffmpeg CLI to have codec-specific code for a codec
> > >>> that's been obsolete for 15+ years. One could also potentially do it
> > >>> inside the encoder itself, but it is nontrivial since the computations
> > >>> are spread across a number of places in mpeg4videoenc.c and
> > >>> mpegvideo_enc.c. And again, it seems like a waste of time - there is no
> > >>> reason to encode mpeg4 today.
> > >>
> > >> This is not mpeg4 specific, its just a new additional case that fails
> > > 
> > > The case you reported is mpeg4 specific.
> > > 
> > >> ./ffmpeg -i mm-small.mpg test.dv
> > >> [dvvideo @ 0x7f868800f100] Found no DV profile for 80x60 yuv420p video. Valid DV profiles are:
> > > 
> > > There is no mechanism for an encoder to export supported time bases.
> > 
> > Could it be added as an extension to AVProfile, or AVCodec?
> 
> The two cases are actually pretty different:
> * mpeg4 has a constraint on the range of timebases, and actually does
>   some perverted computations with the timestamps
> * DV just needs your video to be CFR, with a list of supported
>   framerates; dvenc should probably read AVCodecContext.framerate
>   instead of time_base
> 
> But most importantly, is there an actual current use case for either of
> those encoders? They have both been obsolete for close to two decades.
> It seems silly to add new API that won't actually be useful to anyone.

iam not sugesting to add API specific to mpeg4, rather that maybe
it can be done as part of some more generic solution

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato

[-- 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".

  reply	other threads:[~2024-03-10 23:37 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-06 11:03 [FFmpeg-devel] [PATCH 01/18] fftools/cmdutils: fix printing group name in split_commandline() Anton Khirnov
2024-03-06 11:03 ` [FFmpeg-devel] [PATCH 02/18] fftools/ffmpeg_filter: refactor setting input timebase Anton Khirnov
2024-03-07 20:37   ` Michael Niedermayer
2024-03-08  5:34     ` Anton Khirnov
2024-03-10  3:36       ` Michael Niedermayer
2024-03-10  6:13         ` Anton Khirnov
2024-03-10 19:21           ` Michael Niedermayer
2024-03-10 22:24             ` Anton Khirnov
2024-03-10 22:29               ` James Almer
2024-03-10 22:49                 ` Anton Khirnov
2024-03-10 23:37                   ` Michael Niedermayer [this message]
2024-03-11  6:03                     ` Anton Khirnov
2024-03-11 10:12                   ` Tobias Rapp
2024-03-11 12:23                     ` Anton Khirnov
2024-03-11 12:29                       ` Martin Storsjö
2024-03-11 13:28                         ` Anton Khirnov
2024-03-11 14:03                           ` Martin Storsjö via ffmpeg-devel
2024-03-11 14:32                             ` Anton Khirnov
2024-03-11 14:37                               ` Martin Storsjö
2024-03-11 14:31                           ` Tobias Rapp
2024-03-06 11:03 ` [FFmpeg-devel] [PATCH 03/18] fftools/ffmpeg_filter: drop unused InputFilterPriv.ist Anton Khirnov
2024-03-06 11:03 ` [FFmpeg-devel] [PATCH 04/18] fftools/ffmpeg_dec: move scheduler registration from dec_open() to dec_alloc() Anton Khirnov
2024-03-06 11:03 ` [FFmpeg-devel] [PATCH 05/18] fftools/ffmpeg_dec: factor opening the decoder out of dec_open() Anton Khirnov
2024-03-06 11:03 ` [FFmpeg-devel] [PATCH 06/18] fftools/ffmpeg_opt: merge init_complex_filters() and check_filter_outputs() Anton Khirnov
2024-03-06 11:03 ` [FFmpeg-devel] [PATCH 07/18] fftools/ffmpeg_filter: move filtergraph input type check to a better place Anton Khirnov
2024-03-06 11:03 ` [FFmpeg-devel] [PATCH 08/18] fftools/ffmpeg_filter: add logging for binding inputs to demuxer streams Anton Khirnov
2024-03-06 11:03 ` [FFmpeg-devel] [PATCH 09/18] fftools/ffmpeg: simplify propagating fallback parameters from decoders to filters Anton Khirnov
2024-03-06 11:03 ` [FFmpeg-devel] [PATCH 10/18] fftools/ffmpeg: remove unncessary casts for *_thread() return values Anton Khirnov
2024-03-06 11:03 ` [FFmpeg-devel] [PATCH 11/18] fftools/ffmpeg_enc: drop unnecessary parameter from forced_kf_apply() Anton Khirnov
2024-03-06 11:03 ` [FFmpeg-devel] [PATCH 12/18] fftools/ffmpeg_enc: merge do_{audio, video}_out into frame_encode() Anton Khirnov
2024-03-06 11:03 ` [FFmpeg-devel] [PATCH 13/18] fftools/ffmpeg_sched: allow encoders to send to multiple destinations Anton Khirnov
2024-03-06 11:03 ` [FFmpeg-devel] [PATCH 14/18] fftools/ffmpeg_sched: factor initializing nodes into separate function Anton Khirnov
2024-03-06 11:03 ` [FFmpeg-devel] [PATCH 15/18] fftools/ffmpeg_sched: allow connecting encoder output to decoders Anton Khirnov
2024-03-06 11:03 ` [FFmpeg-devel] [PATCH 16/18] fftools/ffmpeg: prepare FrameData for having allocated fields Anton Khirnov
2024-03-06 11:03 ` [FFmpeg-devel] [PATCH 17/18] fftools/ffmpeg: add loopback decoding Anton Khirnov
2024-03-07 14:42   ` [FFmpeg-devel] [PATCH v2 " Anton Khirnov
2024-03-06 11:03 ` [FFmpeg-devel] [PATCH 18/18] fftools/ffmpeg_enc: set AV_PKT_FLAG_TRUSTED on encoded packets Anton Khirnov
2024-03-09 19:08 ` [FFmpeg-devel] [PATCH 01/18] fftools/cmdutils: fix printing group name in split_commandline() Anton Khirnov

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=20240310233707.GS6420@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