Hi
I've a problem getting multiple filters to work with ffmpeg. Either filter on its own works fine.
This filter adds static text to the videos right hand bottom and works fine-
ffmpeg -i "D:\fcp_source\PlasmaSrc1\palmbeach.mpg" -vf
drawtext="fontfile=arial.ttf:text='test_text':\ x=1250: y=700: fontsize=24:fontcolor=red" -b 6000k -s 1366x768 -vcodec wmv2 -an -y "D:\fcp_source\PlasmaSrc1\palmbeach.wmv"
This filter burns in a watermark image at the bottom left and also works perfectly-
ffmpeg -i "D:\fcp_source\PlasmaSrc1\palmbeach.mpg" -vf "movie=TWC_70x70.png:f=png [img]; [in] [img] overlay=17:H-h-19:1 [movie]; [movie] scale=1366:768"
-b 6000k -s 1366x768 -vcodec wmv2 -an -y "D:\fcp_source\PlasmaSrc1\palmbeach.wmv"
I've tried combining the filters with a comma like this-
ffmpeg -i "D:\fcp_source\PlasmaSrc1\palmbeach.mpg" -vf "
drawtext=fontfile=arial.ttf:text='test_text':\ x=1250: y=700: fontsize=24:fontcolor=red, movie=TWC_70x70.png:f=png [img]; [in] [img] overlay=17:H-h-19:1 [movie]; [movie] scale=1366:768" -b 6000k -s 1366x768 -vcodec wmv2 -an -y "D:\fcp_source\PlasmaSrc1\palmbeach.wmv"
but I receive an error of 'to many inputs specified for the movie filter'.
What am I doing wrong and how can I do this?
Trying to avoid two pases through ffmpeg.
Regards
+ Reply to Thread
Results 1 to 7 of 7
-
-
"movie" is a filter name, you don't need to create a movie label. Here's a basic example of a filter chain that you perhaps can adapt. I am on Windows so have to give full file paths.
Code:-vf "movie='f\:/x-test_videos/sting.pss':f=pss,scale=100:100 [img],[in]drawtext=fontfile='c\:/ttf-mgfx/adlibn.ttf':text='test_text':x=50:y=200:fontsize=48:fontcolor=red,[img] overlay=50:50,scale=720:576"
Hope this helps a bit. -
Thanks Chris
That clarified things a lot. I should have mentioned that I have little understanding of ffmpeg commands and was basically cutting and pasting other peoples solutions...
Anyway, with your guidance I have come up with the following command line which does what I want and may help someone else.
ffmpeg -i "source.mpg" -vf "movie=source.png:f=png [img], [in]drawtext=fontfile=arial.ttf:text='test_text'=1267:y=719:fontsize=14:fontcolor=yellow,[img] overlay=17:H-h-19:1" -b 6000k -s 1366x768 -vcodec wmv2 -an -y "destination.wmv"
This places a png image at the bottom left and some text at the bottom right. Screen reso is 1366x768.
Many thanks Chris
Appreciate your help. -
hello friends!!
I try the code and works perfect!
but I want to do this
ffmpeg.exe -threads 8 -async 2 -i 01.mpg -sws_flags area -vf yadif=0:-1,scale=0:0,crop=472:480:4:0,scale=480:272,setdar= 16:9 -vcodec libx264 -r 23.976 -vb 1000k -minrate 300k -maxrate 2500k -fpre "C:/FFmPeg/ffpresets/libx264-hq-pass2.ffpreset" -acodec libfaac -ab 64k -ar 48000 -ac 2 -pass 2 -passlogfile "C:/FFmPeg/log.log" -y teste.mp4
and later where I apply your great tip?
-vf "movie=logo.png:f=png [img], [in]drawtext=fontfile=arial.ttf:text='venda proibida documentário escolar!'=300:y=219:fontsize=14:fontcolor=yellow,[img] overlay=17:H-h-19:1"
Last edited by gugaoforums; 6th Sep 2011 at 13:33.
-
@Orinoco Womble
Thanks for posting your working example! Seems to be useful already :)
@gugaoforums
Probably the best to put your first filter chain directly after the [in] label.
yadif=0:-1,scale=0:0,crop=472:480:4:0,scale=480:272,setdar= 16:9
-vf "movie=logo.png:f=png [img], [in]yadif=0:-1,scale=0:0,crop=472:480:4:0,scale=480:272,setdar= 16:9,
drawtext=fontfile=arial.ttf:text='venda proibida documentário escolar!':x=300:y=219:fontsize=14:fontcolor=yellow , [img] overlay=17:H-h-19:1"
This way you first deinterlace, crop and scale the source and then draw the text on it and overlay it with the logo. -
Hello Chris!! thanks for share! works perfectly!!!
Have some way to show the logo.png for each 15minutes.. and disapear.. the logo comes again.. and disapear..
thanks for all!!Last edited by gugaoforums; 7th Sep 2011 at 01:07.
Similar Threads
-
How to create multiple tasks for FFMPEG?
By sandrushe in forum Video ConversionReplies: 3Last Post: 16th Dec 2011, 04:41 -
Encode with FFMPEG with multiple input files...
By RogerTango in forum Video ConversionReplies: 3Last Post: 20th Jun 2011, 01:12 -
Applying multiple filters at once with FFMPEG
By asterixvader in forum Video ConversionReplies: 3Last Post: 1st Jun 2011, 14:53 -
[ffmpeg] No such filter: 'pad=0:0:0:0:black'
By hzh003 in forum ProgrammingReplies: 10Last Post: 12th Dec 2010, 21:18 -
[FFMPEG] Known problem with "Frame size must be a multiple of 2"
By yamyam in forum Newbie / General discussionsReplies: 2Last Post: 18th Nov 2009, 12:52