Hi,
I'm trying to trim 7 seconds from batch of files. but when I play the result of below code it starts the mkv with two seconds of black screen like the photo below.
[Attachment 54233 - Click to enlarge]
I'm using below script
Code:MD newfiles for %%a in ("*.mkv") do C:\ConvertDTStoAC3\ffmpeg\bin\ffmpeg.exe -i "%%a" -ss 00:00:07.100 -vcodec copy -acodec copy "newfiles\%%~na.mkv" pause
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 9 of 9
Thread
-
-
To get what (I'm guessing) you want isn't possible using -vcodec copy.
Here is what the documentation for ffmpeg says:
-ss position (input/output)
When used as an input option (before -i), seeks in this input file to position. Note that in most formats it is not possible to seek exactly, so ffmpeg will seek to the closest seek point before position. When transcoding and -accurate_seek is enabled (the default), this extra segment between the seek point and position will be decoded and discarded. When doing stream copy or when -noaccurate_seek is used, it will be preserved.
When used as an output option (before an output url), decodes but discards input until the timestamps reach position.
position must be a time duration specification, see (ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual. -
-
-
-
Is there a way to avoid re-encoding the video and keep the quality as is ?
-
-
mkv toolnix / mkvmerge , you need the segmented file option, there is a good help present in the programm, mind you , it only cuts on keyframes , so not exactly 7 secconds but close enough.
Similar Threads
-
avisynth: how to trim alwais the last 3 seconds of the source?
By marcorocchini in forum Newbie / General discussionsReplies: 4Last Post: 16th Jun 2020, 18:44 -
Vob file skips every 33 seconds. Please help!
By adhouse13972 in forum DVD RippingReplies: 4Last Post: 29th Mar 2018, 21:23 -
How the heck do I split an MKV file less than 13 seconds?
By yuppicide0138 in forum EditingReplies: 5Last Post: 14th Nov 2017, 04:23 -
[SOLVED] How to Convert and/or Trim 1080p 30GB MKV file?
By YasathDias in forum Newbie / General discussionsReplies: 7Last Post: 17th Nov 2016, 13:54 -
VLC waits 3 seconds before playing video bec. of subtitles (file attached)
By smellycat3 in forum SubtitleReplies: 8Last Post: 30th Dec 2015, 06:29