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 517D64C72B for ; Thu, 1 Aug 2024 16:50:49 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8AEA368D8A3; Thu, 1 Aug 2024 19:50:46 +0300 (EEST) Received: from sc-ord-mta126.mtasv.net (sc-ord-mta126.mtasv.net [50.31.156.126]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9FB6468D535 for ; Thu, 1 Aug 2024 19:50:39 +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=1722531044; x=1722617444; bh=AsU4LY9PYTbmFP0feeRKsQMPjpF/74i2VSC/shcpbuE=; b=rXnx5rtmextKLGzvmLuCZ8SLGE6ePeNCHzGcB6ggIKpvt/jvBiDfXeTSxfgtyIWivFWVRXnN6klM g0J+59ncf6V0oUlkDruc9LrxQWmyuLnEaCPNP4cQvPJNQvkLYxhZbKt0SdrPnu0eArgsmTLz250Z 2/o9vmw9V3LztvDxKYU= Received: by sc-ord-mta126.mtasv.net id hleuds3864ok for ; Thu, 1 Aug 2024 12:50:37 -0400 (envelope-from ) X-PM-IP: 50.31.156.126 X-IADB-IP: 50.31.156.126 X-IADB-IP-REVERSE: 126.156.31.50 DKIM-Signature: v=1; a=rsa-sha256; d=gget.it; s=20200311092113pm; c=relaxed/relaxed; i=basj@gget.it; t=1722531037; x=1722703837; 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=AsU4LY9PYTbmFP0feeRKsQMPjpF/74i2VSC/shcpbuE=; b=Ah5FlgmTp+akBfzwAvzBABmPozFSKS61VG3i2O1K7Bu02eDyTYa59bYQBs8SD4SKspsFy3UXvbj bXcbBCpWAzr16XvXh27s+IuAgPvs7b2YMjSBC8hNJ3NaMLSk2GQmaXxQ4hRlXsIqjMc+XDGMIDudL 4JNX4cdJVXBr2haOmQo= From: basj@gget.it Date: Thu, 01 Aug 2024 16:50:37 +0000 Message-Id: <23f407a6-901c-4a3c-9a7c-f8a93ed26374@mtasv.net> To: ffmpeg-devel@ffmpeg.org Feedback-ID: s5244416-_:s5244416:a182037:postmark X-Complaints-To: abuse@postmarkapp.com X-PM-Message-Id: 23f407a6-901c-4a3c-9a7c-f8a93ed26374 X-PM-RCPT: |bTF8MTgyMDM3fDUyNDQ0MTZ8ZmZtcGVnLWRldmVsQGZmbXBlZy5vcmc=| X-PM-Message-Options: v1; 1.WPWYQJskonKI1i4OCjtiyQ.Vp7uhBJxDnNb7xx2pUbofFGGhrGvPoODdI8bW6_FTS_5qzONxQi7gdq2vqF_0ZtBFtH4PhkP4KNW5w_FobksG70_CV0wuM6D6riho69az2jdVBS4IXwa3rhNG1t1-1Ju9iWjF2O4px6N-K7yluN7ybWTJP_wgRNRVfuOljteAPPSJbmfPzgQW-rfH7M5AJ6K MIME-Version: 1.0 X-PM-MTA-Pool: transactional-1 Subject: [FFmpeg-devel] Feature to 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: 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".