ffmpeg-python icon indicating copy to clipboard operation
ffmpeg-python copied to clipboard

Add sub parameters syntaxe for filters

Open cmehay opened this issue 6 years ago • 3 comments

Some filters have sub parameters like subtitles.

subtitles=sub.srt:force_style='FontName=DejaVu Serif,PrimaryColour=&HCCFF0000'

Due to char escape policy in FilterNode, it's impossible to pass the full options like this:

filter('subtitles', force_style="FontName=DejaVu Serif,PrimaryColour=&HCCFF0000")

So I added the possibility to pass a dictionary to the kwarg argument on filter:

filter('subtitles', force_style={"FontName": "DejaVu Serif", "PrimaryColour": "&HCCFF0000"})

~But I made a hack to not escape coma when a dictionary is passed to a kward argument in filter.~

You can suggest me a better way to do this

cmehay avatar Mar 06 '20 22:03 cmehay

I updated the commit, I figured out that the coma escape has been required to work properly.

cmehay avatar Mar 10 '20 18:03 cmehay

This is a much-needed capability. If I'm not mistaken, there is no way to include sub-params today.

I hope it will be merged soon.

kellersefi avatar Sep 06 '21 12:09 kellersefi

any updates?

thanhtoan1196 avatar Mar 23 '23 09:03 thanhtoan1196