Hi, did you find a solution to this? i have 20gb .ts files, around 30 in a go and i wish to take a screen shot at 90 seconds in, i also wish to do this as a batch
I have the most up to date FFmeg a the time of this post,
my code is
IF EXIST "%~d1%~p1%#n1.jpg" GOTO exit
ffmpeg.exe -itsoffset -90 -i "%~d1%~p1%#n1.ts" -vcodec mjpeg -vframes 1 -an -f rawvideo -s 640x360 "%~d1%~p1%#n1.jpg"
:exit
i know this is prob very wrong.. can any one help?
thanks.
UPDATE:
To work with the bigger files you need to have -ss before the -i, this stops it trying to cache the media before your time point and it just skips it and goes direct.
My code (which now works) is:
FILEPUSH.BAT (this pushes the files with .ts extension to the FFMPEG batch)
FOR %%i IN (*.ts) DO (FFMpegBatch_V1.0.bat "%%i")
FFMpegBatch_V1.0.BAT
IF EXIST "%~d1%~p1%~n1.jpg" GOTO exit
@echo ————————— >> “%~d1%~p1%convert.log”
@echo Conversion for %1 started on %DATE% %TIME% >> “%~d1%~p1%convert.log”
ffmpeg.exe -ss 45 -i "%~d1%~p1%~n1.ts" -vcodec mjpeg -vframes 1 -an -f rawvideo -s 640x360 "%~d1%~p1%~n1.jpg"
@echo ————– DONE – SUCCESS ———————- >> “%~d1%~p1%convert.log”
:exit
@echo ——————————– >> “%~d1%~p1%convert.log”
@echo “%~d1%~p1%~n1.mpg” already exists >> “%~d1%~p1%convert.log”
You dont really need all the log stuff, just the line with ffmpeg.exe (you only need the .exe if in xp) you also dont need the %~d1%~p1 as this is only for the log, but you will need %~n1 as this creates the jpeg in the same name as the video file.
All this is run in the same folder as the videos, saves having to write about paths etc.. and you need to make sure that ffmpeg.exe is in the same folder as the video and these 2 batch files.
Thanks
PS worked on 50x20gb+ .ts files in about 40seconds