se eu iniciar o código a seguir colando-o no cmd ou no powershell, ele funciona bem.
@echo off
C:\Users\sohba\Downloads\0ffmpeg\bin\ffmpeg -f dshow -i video="CC1" -vf "fps=0.5,drawtext=fontfile=/Windows/Fonts/Arial.ttf:text='%{localtime}':x=(w-tw)/2:y=h-(2*lh):fontcolor=white:box=1:boxcolor=0x00000000@1:fontsize=30" -q:v 2 -t 9 "C:\Users\sohba\Downloads\0ffmpeg\t1\frame%03d.jpg"
mas se eu fizer um arquivo em lote camera1.bat
ou camera1.cmd
clicar duas vezes nele, não funcionará, diz
[image2 @ 0000019fc1833c40] The specified filename 'C:\Users\sohba\Downloads\0ffmpeg\t1\frameC:\Users\sohba\Downloads\0ffmpeg\camera1.bat3d.jpg' does not contain an image sequence pattern or a pattern is invalid.
[image2 @ 0000019fc1833c40] Use a pattern such as %03d for an image sequence or use the -update option (with -frames:v 1 if needed) to write a single image.
[image2 @ 0000019fc1833c40] Could not open file : C:\Users\sohba\Downloads\0ffmpeg\t1\frameC:\Users\sohba\Downloads\0ffmpeg\camera1.bat3d.jpg
[vost#0:0/mjpeg @ 0000019fc1834580] Error submitting a packet to the muxer: I/O error
Last message repeated 1 times
[out#0/image2 @ 0000019fc1823840] Error muxing a packet
[out#0/image2 @ 0000019fc1823840] Task finished with error code: -5 (I/O error)
[out#0/image2 @ 0000019fc1823840] Terminating thread with return code -5 (I/O error)
Alguém sabe como consertar isso?
morcego atualizado
C:\Users\sohba\Downloads\0ffmpeg\bin\ffmpeg -f dshow -i video="CC!" -vf "fps=0.5,drawtext=fontfile=/Windows/Fonts/Arial.ttf:text='%%{localtime}':x=(w-tw)/2:y=h-(2*lh):fontcolor=white:box=1:boxcolor=0x00000000@1:fontsize=30" -q:v 2 -t 9 "C:\Users\sohba\Downloads\0ffmpeg\t1\frame%03d.jpg"
erro
[image2 @ 0000024031943cc0] The specified filename 'C:\Users\sohba\Downloads\0ffmpeg\t1\frameC:\Users\sohba\Downloads\0ffmpeg\camera1.bat3d.jpg' does not contain an image sequence pattern or a pattern is invalid.
[image2 @ 0000024031943cc0] Use a pattern such as %03d for an image sequence or use the -update option (with -frames:v 1 if needed) to write a single image.
[image2 @ 0000024031943cc0] Could not open file : C:\Users\sohba\Downloads\0ffmpeg\t1\frameC:\Users\sohba\Downloads\0ffmpeg\camera1.bat3d.jpg
[vost#0:0/mjpeg @ 0000024031944540] Error submitting a packet to the muxer: I/O error
Last message repeated 1 times
[out#0/image2 @ 0000024031943bc0] Error muxing a packet
[out#0/image2 @ 0000024031943bc0] Task finished with error code: -5 (I/O error)
[out#0/image2 @ 0000024031943bc0] Terminating thread with return code -5 (I/O error)
[out#0/image2 @ 0000024031943bc0] video:37KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown
frame= 1 fps=0.3 q=2.0 Lsize=N/A time=00:00:02.00 bitrate=N/A speed=0.592x
Conversion failed!