Hi all i would just like to share a bash script i put together. It uses ffprobe to scan the file then encodes countdown timer and file name to the video. This can be easily edited to suit your needs. I couldn't find any other tool or solution to do this. Thanks all.
Code:#!/bin/bash for file in *.mp4 do cp -v "$file" input.mp4 done input=input.mp4 duration=$(ffprobe -loglevel error -show_entries format=duration -of default=nw=1:nk=1 "$input") ffmpeg -nostdin -i "$input" -vf "drawtext=fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf:text='%{eif\:trunc(mod((($duration-t)/3600),24))\:d\:2}\:%{eif\:trunc(mod((($duration-t)/60),60))\:d\:2}\:%{eif\:trunc(mod($duration-t\,60))\:d\:2}':fontcolor=yellow:fontsize=20:x=10:y=h-th-10,drawtext=fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf:text='${file/%.*}':fontcolor=yellow:fontsize=20:x=w-tw-10:y=h-th-10,format=yuv422p" output.mp4 ; mv output.mp4 /home/temp/"${file%.*}".mp4 && rm input.mp4;
+ Reply to Thread
Results 1 to 1 of 1
Similar Threads
-
Looking for a free software title that will split a very large video file
By snafoo in forum Newbie / General discussionsReplies: 9Last Post: 25th Dec 2024, 05:20 -
Burn-in reverse timecode (countdown)
By IxTab in forum EditingReplies: 2Last Post: 4th Sep 2022, 12:11 -
How to change MKV file comment and title using batch script?
By iKron in forum Newbie / General discussionsReplies: 1Last Post: 8th Jul 2021, 08:05 -
DVD Styler...title post command (play next title)
By Mikeymoo2351 in forum Authoring (DVD)Replies: 1Last Post: 20th Dec 2020, 11:33


Quote