occivink / mpv-scripts

Various scripts for mpv
The Unlicense
417 stars 38 forks source link

[encode] -ss after input #41

Closed dalekesi closed 4 years ago

dalekesi commented 4 years ago

I’m trying to change the command of ffmpeg to put -ss after the input, because i’m getting weird extractions doing it without re-encoding. Doing directly in ffmpeg the command would be like:

ffmpeg -i input -ss 00:00:00 -to 00:00:00 -c copy output

I believe that the current script is doing something like:

ffmpeg -ss 00:00:00 -i input -to 0.000000 -c copy output

I only changed the order of the line ("-ss", start,) to be before of ("-i", input_path,) and it works sometimes. Doing that i believe i’m getting something like:

ffmpeg -i input -ss 00:00:00 to 0.000000 -c copy output

I believe the problem is related to the format of time duration, i need it to be like the format of the start duration, but i’m not able to do it. Sorry for bad explication, but i’m amateur and don't know anything about coding.