ffmpeg - Is it possibe to retain real timecodes using -copyts?

1

It's is a simple task. I want to make a converted clip of a video using -copyts to have it's real timecodes. For example, the converted clip of this command:

ffmpeg -hide_banner -ss 57:41.76 -i input.mp4 -copyts -fs 4085Ki -vf scale=1280:-1 -c:v libvpx -crf 10 -b:v 1000K -maxrate:v 1600K -bufsize 800Ki -threads 4 -quality good -cpu-used 5 -c:a libvorbis -b:a 64Ki -maxrate:a 128Ki input.webm

Has a 31 seconds duration, but:

frame=  938 fps=7.7 q=0.0 Lsize=    4089kB time=00:58:13.15 bitrate=   9.6kbits/s speed=28.8x

Says that it has 58:13.15 minutes.

I can achieve the normal duration by removing -copyts from the command code but the whole reason I'm using -copyts is to avoid having to calculate the next segments every time, since I can just set -ss to 58:13.15 and get going.

For the question, is there anyway to modify the converted files duration without re-converting it? Like modifying metadata?

I'm on Windows 7.

HASJ

Posted 2016-06-15T23:15:48.060

Reputation: 83

Answers

2

I just had to -c copy. Had forgotten about it:

Put all your new clips in a new folder (webm as a suggestion) and inside that folder, create another folder named new and do this

ffmpeg -i input.webm -c copy new\output.webm

For an automated process do this:

for %i in ("*.webm") do ffmpeg -i %i -c copy new\%~ni.webm

This will repeat the -c copy command to all the clips you converted.

HASJ

Posted 2016-06-15T23:15:48.060

Reputation: 83