On 2016-03-11 18:19, David Haller wrote:
Have you tried yet with mkvmerge?
Not yet, no. I got a working solution yesterday evening with ffmpeg and the -copyts parameter. :-)) For removing commercials in the middle, I could use ffmpeg to extract up to the first commercial, and another run starting at the end of the commercial, then use mkvmerge to join the sections.
mkvmerge --split parts:+00:20:00.00-00:25:00.00 -o output.mkv input.mpeg
Just leave out the cropping for now.
Or try mencoder, I'm not quite sure about the '-map' parameter of ffmpeg, but this should be a first try (including cropping):
I had a look at mencoder and several web pages, and found the methodology and syntax very complex. That's why I haven't tried yet. ffmpeg I more or less understand, but this one, no.
mencoder -ss 00:20:00.00 -endpos 5:00.00 -oac copy \ -ovc x264 -x264encopts crf=23:trellis=1 \ -vf crop=1920:804:0:138 -o output.avi input.mpeg
(-x264encopts crf=23 is rather high quality, can be adjusted)
This copies just the first audio-track, but more can be done seperately, e.g.
mencoder -ss 00:20:00.00 -endpos 5:00.00 -oac copy -aid 129 \ -ovc frameno -o output_aid129.avi input.mpeg
(mux with mkvmerge -o output.mkv output.avi -D output_aid129.avi)
This is more meant as a test.
I'm running it now. But it appears it is producing a different section at 00:20:00 than ffmpeg. :-? Yes, the above command "-ss 00:20:00.00" appears to start coding at timestamp 11:00 in the input stream, so the 5 minute section does not contain the bad part. I'll try with -ss 00:40:00.00 Ok, done. The audio is out of sync to the video by several minutes. :-(
PS: no comments on my previous mails?
Huh, because I'm running tests, and each one may take hours :-) -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)