Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Zhao Zhili <quinkblack@foxmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [FEATURE] Cut a video (-ss) with timings non-aligned on keyframes, with minimal re-encoding
Date: Wed, 14 Aug 2024 19:42:53 +0800
Message-ID: <tencent_3769C261B75C695E007D6ABE7E3AACCE3A0A@qq.com> (raw)
In-Reply-To: <e3963811-e6a4-4a20-ba6f-0670919b6ab5@mtasv.net>



> On Aug 14, 2024, at 18:05, basj@gget.it wrote:
> 
> 
>>> Do you think it would be worth developing a command-line option so that exact cutting with minimal re-encoding would be easier?
>> 
>> How do you plan to figure out the options needed to be passed to each
>> and every encoder, so that it'll produce compatible output to enable the
>> necessary concatenation of old and new encoded data?
>> 
>> That's by far the biggest roadblock I see with this.
> 
> I see. You're right, then this technique is probably a dead-end...
> 
> More generally, which is the recommanded way to cut a video with a specific starting point and specific length, with minimal re-encoding?
> Millions of hours of CPU-time are probably wasted to reencode already-perfectly-encoded content, just for cutting ;)

Only do remux without transcoding, and let mp4 muxer use editlist to strip the timeline from IDR to the requested start time.
The preroll at the beginning can be slow when playback, but seeking also has the same preroll

Other choice is use multiple groups of SPS/PPS in mp4 sample description. We have that support in mp4 demuxer, but not
in muxer. It’s standard in specification but not widely supported. So if we add support to muxer and it works with our own 
demuxer, it’s not surprise to experience a lot of compatibility issues with other software.

> 
> Are there already promising dev attempts in the direction of a feature able to cut with minimal re-encoding?
> _______________________________________________
> 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".

_______________________________________________
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-08-14 11:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-14 10:05 basj
2024-08-14 11:42 ` Zhao Zhili [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-13  7:35 basj
2024-08-13  8:55 ` Timo Rothenpieler
2024-08-05 19:45 basj

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=tencent_3769C261B75C695E007D6ABE7E3AACCE3A0A@qq.com \
    --to=quinkblack@foxmail.com \
    --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