Now I'm interested in donating in order to use Comskip but I have some questions.
My programming skills are dismal limited to simple bash shell scripts. Trying to understand ffmpeg is daunting. I muddle through these things the best that I can. I'm embarrassed to have anyone look at my code. It's that bad.
I found out how to identify commercials from some online searches. Using this ffmpeg command:
Code: Select all
ffmpeg -ss 20:45 -t 13 -i "INPUT.mp4" -map 0 -c copy -c:v libx264 -b:v 2400K -vf drawbox=x=740:y=962:w=416:h=44:c=red:t=1 "OUTPUT.mp4"
Code: Select all
Chapter #0:0: start 0.000000, end 10.382000
Metadata:
title : Advertisement
Chapter #0:1: start 10.382000, end 356.143000
Metadata:
title : Video
Chapter #0:2: start 356.143000, end 465.896000
Metadata:
title : Advertisement
Chapter #0:3: start 465.896000, end 885.507000
Metadata:
title : Video
Chapter #0:4: start 885.507000, end 965.477000
Metadata:
title : Advertisement
Chapter #0:5: start 965.477000, end 1648.772000
Metadata:
title : Video
Chapter #0:6: start 1648.772000, end 1736.859000
Metadata:
title : Advertisement
Chapter #0:7: start 1736.859000, end 2519.980000
Metadata:
title : Video
Chapter #0:8: start 2519.980000, end 2552.074000
Metadata:
What I would like to have is a script that takes these results and concatenates all the "title : Video" into a single .mp4 file, retaining the embeded subtitles if they exist and adjusting the subs timecode to reflect the new position of the video segments.
So far I'm able to extract the subtitles embeded in the mp4 container/stream to a separate .srt file. That makes it easier to edit the subs if I want to. Thus many of my .mp4 files no longer have the embeded subs but an associate .srt file for the video. But there are still ads in the .mp4 file...
So the script would need to be able to retain the embeded subs in the /mp4 container/stream OR use a separate .srt file so that when advertisements are "cut", the subs line up with the video.
Can Comskip do anything like this or do I have the usage of Comskip all wrong? If Comskip will do this then sign me up, and if not then would anyone know how to help me?
Thank you!
Edro