[FFmpeg-user] How to properly escape a literal comma ", " in drawtext filter text?
Steven Kan
steven at kan.org
Mon Dec 28 22:52:02 EET 2020
Thanks for the feedback. I should have specified that I’m using macOS 10.14.6.
Does anyone else have experience putting literal commas in their drawtext on macOS?
> On Dec 27, 2020, at 12:34 PM, pdr0 <pdr0 at shaw.ca> wrote:
>
>
> Not sure about other OS's - For Windows, you don't need to escape commas
> inside the text field; but the paths for fonts needs to be escaped
>
> These work ok in windows
>
> one comma
> ffmpeg -f lavfi -r 24 -i color=c=green:s=640x480 -vf
> drawtext="fontfile='C\:\\Windows\\Fonts\\Arial.ttf':text='Room Temp Water,
> No Heat Mat':fontcolor=white:fontsize=24:
> box=1:boxcolor=black at 0.5:boxborderw=5:x=(w-text_w)*0.05:y=(h-text_h)*0.05"
> -crf 20 -an -frames:v 120 test1.mp4 -y
>
> five commas
> ffmpeg -f lavfi -r 24 -i color=c=green:s=640x480 -vf
> drawtext="fontfile='C\:\\Windows\\Fonts\\Arial.ttf':text='Room Temp Water, ,
> , , , No Heat Mat':fontcolor=white:fontsize=24:
> box=1:boxcolor=black at 0.5:boxborderw=5:x=(w-text_w)*0.05:y=(h-text_h)*0.05"
> -crf 20 -an -frames:v 120 test2.mp4 -y
>
>
>
> --
> Sent from: http://www.ffmpeg-archive.org/
> _______________________________________________
> 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