Ffmpeg-python: video pad filter support?

Created on 12 Dec 2018  路  3Comments  路  Source: kkroening/ffmpeg-python

Hi,
please mark this issue as Question (appologies, i don't know, how to do it)

1- is this filter supported.?
2- can you please provide a simple textdraw example using python for command line
huge thanks,haseeb

Most helpful comment

just noticed, replacing 'main_w' with 'iw' and 'main_h' with 'ih+100' works perfectly, huge thanks again for support , its awesome..

All 3 comments

1 - All ffmpeg filters can be called using the filter (or filter_) method: https://github.com/kkroening/ffmpeg-python/blob/master/ffmpeg/_filters.py#L28
2 - Here is an example of how I use textdraw to add 'watermarks' to videos: https://github.com/153957/time-lapse/blob/master/time_lapse/watermark.py

thanks, this is great example, it also shows, how to load fonts relative locations, grateful again.
i tried following, but wasn't able to successfully accomplish

data = "somevideo.mp4"
in_file = ffmpeg.input(data)
PAD_OPTIONS = {
    'width':'main_w',
    'height':'main_h+100',
    'x':'0',
    'y':'0',
    'color': 'Olive'
}
po =  ffmpeg.filter_(in_file,"pad",**PAD_OPTIONS)
po.output("padded_video.mp4").run()

output log something like this..
[Parsed_pad_0 @ 0000000005792da0] [Eval @ 00000000030feba0] Undefined constant or missing '(' in 'main_w'
[Parsed_pad_0 @ 0000000005792da0] [Eval @ 00000000030feba0] Undefined constant or missing '(' in 'main_h+100'

any ideas?, thanks again.

just noticed, replacing 'main_w' with 'iw' and 'main_h' with 'ih+100' works perfectly, huge thanks again for support , its awesome..

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kishaningithub picture kishaningithub  路  5Comments

ghost picture ghost  路  3Comments

nathanaelneveux picture nathanaelneveux  路  4Comments

Sangkwun picture Sangkwun  路  4Comments

Woolwit picture Woolwit  路  4Comments