VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Member
    Join Date
    Jul 2020
    Location
    Sweden
    Search PM
    Hey!

    New to ffmpeg but this should be possible. Basically what I want is to have a script that is able to in bulk cut out the first 10 seconds of every video then add my intro.mp4 15 seconds into the video. The same intro.mp4 file should also be added at the end of the video.

    At the moment I'm using this code which I found somewhere... It's a good foundation but I need to add the intro.mp4 15 seconds into the video and I need to cut of the first 10 seconds of the video. Oh and i'd also like to add a watermark (overlay.png) in the corner of the video. (Something like this: -i "%%a" -i overlay.png -filter_complex "overlay = 20:20"). I'd really appreciate any help as I'm very new to FFmpeg

    SET RESOLUTION="1280:720"
    SET INPUT_FOLDER="input"
    SET INTRO="intro.mp4"
    SET OUTPUT_FOLDER="output"

    for %%a in ("%INPUT_FOLDER%\*.*") do ffmpeg -i %INTRO% -i "%%a" -filter_complex "[0:v]scale=%RESOLUTION%:force_original_aspect_ratio=1,p ad=%RESOLUTION%ow-iw)/2oh-ih)/2[v0]; [1:v]scale=%RESOLUTION%:force_original_aspect_ratio=1,p ad=%RESOLUTION%ow-iw)/2oh-ih)/2[v1]; [v0][0:a][v1][1:a]concat=n=2:v=1:a=1[v][a]" -map [v] -map [a] "%OUTPUT_FOLDER%\%%~na.mp4"
    Quote Quote  
  2. adding a watermark means re-encode (not lossless).
    Quote Quote  
  3. Member
    Join Date
    Jul 2020
    Location
    Sweden
    Search PM
    Originally Posted by butterw View Post
    adding a watermark means re-encode (not lossless).
    Well, that's what I need. I've succeeded to add a watermark in a separate script but I don't know how to put it all together in one script and make it work.
    Quote Quote  



Similar Threads