I've switched from FFmpeg version 1.2. to the last 2.5 release. After changing all deprecated methods I ran into a problem with a drawbox filter. In version 1.2 I could define a filled box with the following settings (see FFmpeg Filter Documentation):
strFilterDesc += "drawbox=x=0:y="+height+":w="+width+":h=50:[email protected]:t=max,
When I start the application, I receive the following errors:
[Parsed_drawbox_2 @ 0x79e9a0] [Eval @ 0x7fffb57f8e70] Undefined constant or missing '(' in 'max'
[Parsed_drawbox_2 @ 0x75f0a0] Error when evaluating the expression 'max'.
[Parsed_drawtext_1 @ 0x759be0] Failed to configure input pad on Parsed_drawbox_2
Can someone give me a hint what I'm doing wrong here? Even with the example of the documentation the same error occurs. Is there an other way to create a filled box?
Edit:
Here's the content of stfFilterDesc:
drawtext=fontfile=./fonts/truetype/freefont/HelveticaNeue.ttf: text='foo': x=5: y=5: shadowx=0: shadowy=0: fontsize=12: [email protected]: box=0: [email protected], drawbox=x=0:y=490:w=960:h=50:[email protected]:t=max, drawtext=fontfile=./fonts/truetype/freefont/HelveticaNeue.ttf: text='foo': x=32:y=(h-text_h-25): fontsize=16: [email protected]: box=0: [email protected], drawtext=fontfile=./fonts/truetype/freefont/HelveticaNeue.ttf: text='foo': x=32:y=(h-text_h-10): fontsize=14: [email protected]: box=0: [email protected]
strFilterDescso we see the actual value given to FFMPEG ? - Thomas Ayoub