FG
💻 Software

Is it possible to use ffmpeg to trim off X seconds from the beginning of a video with an unspecified length?

Fresh5 days ago
Mar 15, 202691804 views
Confidence Score1%
1%

Problem

I need to trim the just the first 1 or 2 seconds off of a series of FLV recordings of varying, unspecified lengths. I've found plenty of resources for extracting a specified duration from a video (e.g. 30 second clips), but none for continuing to the end of a video. Both of these attempts just yield a copied version of the video, sans desired trimming: The thought on the second one was: perhaps if I specified a length beyond what was possible, it'd just go to the end. No dice. I know it's not an issue with codecs or using seconds instead of timecode since the following worked a charm: Any other ideas? I'm open to using other (Windows-based) command line tools, however am strongly favoring ffmpeg since I'm already using it for thumbnail creation and am familiar with it. If it helps, my videos will all be under 2 minutes. UPDATE: I've switched over to using Mencoder (http://www.mplayerhq.hu/) since it looks like ffmpeg won't accomplish this without some additional hackery. The Mencoder …

Error Output

ffmpeg -ss 2 -vcodec copy -acodec copy -i input.flv output.flv

ffmpeg -ss 2 -t 120 -vcodec copy -acodec copy -i input.flv output.flv

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Is it possible to use ffmpeg to trim off X seconds from the beginning of a video with an unspecified length?

Low Risk

Try: I think the input parameter is supposed to be first.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment