[FFmpeg-user] R: Question: how i can overlay an input with current date and time?

Leo Butler leo.butler81 at googlemail.com
Wed Oct 12 16:23:14 EEST 2022


On Tue, Oct 11 2022, <info at mbsoft.biz> wrote:

> It's a mess the way ffmpeg handle the paths on windows ... for inputs it use
> the standard way drive:\folder\file but for filters it use that
> drive:\\:/folder/file .... it's illogical to me!

The syntax is drive\\:/path/to/file, not what you have written.

Why?

The colon (:) needs to be escaped for ffmpeg, since the colon is used to
separate options to the same command (see the drawtext example), but in
this specific case you want it to be read as part of the path to the
file. That means ffmpeg needs to be passed backslash-colon (\:). To do
that from most shells, the backslash needs to be escaped. Hence
backslash-backslash-colon (\\:).

Perfectly logical, and comprehensible, if you take into account the many
moving parts.

>
> At least documentation should be more specific for windows users that are
> the majority

I would think windows-related stuff would be suitable for a page on the ffmpeg wiki.

https://trac.ffmpeg.org/wiki

Leo

>
> -----Messaggio originale-----
> Da: ffmpeg-user <ffmpeg-user-bounces at ffmpeg.org> Per conto di William C
> Bonner
> Inviato: martedì 11 ottobre 2022 00:05
> A: FFmpeg user questions <ffmpeg-user at ffmpeg.org>
> Oggetto: Re: [FFmpeg-user] Question: how i can overlay an input with current
> date and time?
>
> On Sun, Oct 9, 2022 at 12:59 PM <info at mbsoft.biz> wrote:
>
>> how i can overlay an input with current date and time?
>>
>>
> I use drawtext when I create videos from time lapse photos using this
> command:
>
> ffmpeg.exe -hide_banner -r 30 -i
> C:\Users\Wim\Videos\20221009-PSSC\Wim%05d.JPG -vf
> crop=in_w:9/16*in_w,drawtext=fontfile=C\\:/WINDOWS/Fonts/consola.ttf:fontcol
> or=white:fontsize=main_h/16:y=main_h-text_h-50:x=main_w-text_w-50:text=WimsW
> orld,drawtext=fontfile=C\\:/WINDOWS/Fonts/consola.ttf:fontcolor=white:fontsi
> ze=main_h/16:y=main_h-text_h-50:x=50:text=%{metadata\\:DateTimeOriginal}
> -c:v libx265 -crf 23 -preset veryfast -s 3840x2160 -movflags +faststart -bf
> 2 -g 15 -pix_fmt yuv420p -n
> C:\Users\Wim\Videos\20221009-PSSC-2160p30-cropped.mp4
>
> It puts the date of the original photo in the bottom left of the video as a
> running time code.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email ffmpeg-user-request at ffmpeg.org
> with subject "unsubscribe".
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list