From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 541484A9D9 for ; Mon, 5 Aug 2024 19:45:37 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7358C68D9A9; Mon, 5 Aug 2024 22:45:34 +0300 (EEST) Received: from sc-ord-mta121.mtasv.net (sc-ord-mta121.mtasv.net [50.31.156.121]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 239FE68D789 for ; Mon, 5 Aug 2024 22:45:26 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=pm20231108; d=pm.mtasv.net; h=From:Date:Subject:Message-Id:To:MIME-Version:Content-Type: Content-Transfer-Encoding:Date:From:Message-ID:Reply-To:Sender:Subject:To:CC; t=1722887132; x=1722973532; bh=tOYXq+kKo1geEdyKtheoNXzvoUl0qj7Ols0KTfUOrJ4=; b=VpYmK69zpG/AAnvLccD2+yjP135K7ZFTNBpVZDdd3S4o7M4RdtTqaSO5fzK3VEo3LNExzQ4tH4k0 OVDzFaRA21wrK2HZ2r05J4MP7NQuLPhBxn5ca3Q4V2wbfFKwOIsIw1QYKOdDeP1LXCqt4Z+9zeH8 P/W4zkbS1haTbfBrqeE= Received: by sc-ord-mta121.mtasv.net id hm4lta3864og for ; Mon, 5 Aug 2024 15:45:25 -0400 (envelope-from ) X-PM-IP: 50.31.156.121 X-IADB-IP: 50.31.156.121 X-IADB-IP-REVERSE: 121.156.31.50 DKIM-Signature: v=1; a=rsa-sha256; d=gget.it; s=20200311092113pm; c=relaxed/relaxed; i=basj@gget.it; t=1722887124; x=1723059924; h=date:date:from:from:message-id:reply-to:sender:subject:subject:to:to:cc: feedback-id:mime-version:content-type:content-transfer-encoding; bh=tOYXq+kKo1geEdyKtheoNXzvoUl0qj7Ols0KTfUOrJ4=; b=Znm2kN4gNAolB6RFx5GuCg109eanuMoQW8gaC/y0aPqierIORqVIjOB8WY+yVHl7U26abCZ4Dxk EKQfMX4vJRN56umtZm8S11AOE4ZJlU1ibSNoG3mHJUABz9VnJv7ITMf7+hfY9EmA0gNgr1kCwG0m/ X1Y6amPIZ+1yeaflqFE= From: basj@gget.it Date: Mon, 05 Aug 2024 19:45:24 +0000 Message-Id: <2baccf0f-8973-4370-9fc0-9d4df8e45a18@mtasv.net> To: ffmpeg-devel@ffmpeg.org Feedback-ID: s5244416-_:s5244416:a182037:postmark X-Complaints-To: abuse@postmarkapp.com X-PM-Message-Id: 2baccf0f-8973-4370-9fc0-9d4df8e45a18 X-PM-RCPT: |bTB8MTgyMDM3fDUyNDQ0MTZ8ZmZtcGVnLWRldmVsQGZmbXBlZy5vcmc=| X-PM-Message-Options: v1; 1.VyFdAdY5yI84KJ9qrRIn4Q.P7J2eB6LMsAKcY-18MmLBypevP7Og4kYokCycGB4_cs7UIC-XZaLsB7Dl50JezvPjjZgqQdeIInrEsz-IoGMa5FWQwnQEvXW9twUbUd9uOojCQt9ygmuEXTLfodEkvDWbKzTe1DosTav8XED2ez2QcXP9QfCSRtnYyETDQlJYiKRnjpdGf9j8GfNSiatv_YE MIME-Version: 1.0 X-PM-MTA-Pool: transactional-1 Subject: [FFmpeg-devel] [FEATURE] Cut a video (-ss) with timings non-aligned on keyframes, with minimal re-encoding X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Hi, Before trying to develop a new feature, and diving in the code base, I wanted to know if it currently exists, or is already in a work-in-progress task: When cutting a video with no re-encoding: ffmpeg -ss 120 -t 60 -i input.mp4 -c copy output.mp4 the result is often choppy or non-smooth in the first seconds, because the cut point doesn't necessarily coincide with a keyframe, at least on some players (such as Media Player Classic, etc.). Some more complex solutions involve reencoding just the beginning until the next keyframe, and then use copy codec for the rest of the video, and then concatenating, all of this requiring multiple calls of ffmpeg. Is there a feature already in development that would allow to do this in one single pass of ffmpeg, without multiple calls and concatenation? Something like: ffmpeg -ss 120 -t 60 -i input.mp4 -c copy -reencodebeforekeyframe output.mp4 Thanks, Basj _______________________________________________ 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".