Using Hauppague PCIe TV Tuner card - Need Timestamp on Marque

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Using Hauppague PCIe TV Tuner card - Need Timestamp on Marque

Byron J
Hello all!

I have been searching for a way to add a running date/time stamp in a
marquee in videos recorded from a Huappauge Quad TV Tuner card. I have
something kind of working that post processes the recorded .TS video files
and adds a timestamp but the time is tied to the frame rate instead of the
PC clock.

Any ideas? Can I offer a reward for the solution?

Here is the .bat file with the FFMPEG commands running the postprocessing.


setlocal
@echo off
set sourcefile=%~1
set destfile=%~2
shift
shift
REM Variables
set sourcefile=%sourcefile%
set destfile=%destfile%
set tempfile=%sourcefile:~0,-3%_tmp.mp4
set logofile=C:\Users\Public\WinTV\fox49-logo-header-v2.png
set hour=%sourcefile:~-7,2%
set min=%sourcefile:~-5,2%
set year=%date:~10,4%
set month=%date:~4,2%
set day=%date:~7,2%
set dts=%year%_%month%_%day%
echo WinTV8 Post processing log. > postprocess.log
echo sourcefile = %sourcefile%  >> postprocess.log
echo destfile = %destfile% >> postprocess.log
echo tempfile = %tempfile% >> postprocess.log
echo logofile = %logofile% >> postprocess.log
echo hour = %hour% >> postprocess.log
echo min = %min% >> postprocess.log
echo dts = %dts% >> postprocess.log
REM Video Processing
echo Starting timecode overlay... >> postprocess.log
ffmpeg -y -i %sourcefile% -b:v 1M -vcodec libx264 -preset ultrafast -s
480X360 -vf drawtext="text='%dts%\ \ \ \
':timecode='%hour%\:%min%\:00\:00': rate=25:
fontfile=C\\:\\Windows\\Fonts\\Ariel.ttf: x=400: y=h-lh-1:
fontcolor=white:shadowcolor=black:shadowx=1:shadowy=1:fontsize=72:box=1:boxcolor=black@0.5:boxborderw=5:"
%tempfile%
echo End timecode overlay. >> postprocess.log
echo Starting image overlay... >> postprocess.log
ffmpeg -y -i %tempfile% -i %logofile% -filter_complex
"[1:v]format=argb,geq=r='r(X,Y)':a='0.5*alpha(X,Y)'[image];
[0:v][image]overlay=(main_w-overlay_w-0):(main_h-overlay_h-2)" %destfile%
echo End image overlay. >> postprocess.log
REM Validate file exsists and cleanup
if exist "%destfile%" (
    del %tempfile% >> postprocess.log
del %sourcefile% >> postprocess.log
) else (
    echo Error processing file %sourcefile%. >> postprocessing.log
)
echo End post processing. >> postprocess.log
endlocal
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".