backyard Posted August 26, 2009 Share Posted August 26, 2009 I'm have a video script and I'd like to add a watermark to the video using vhook. The problem I have is the exec command isn't properly handling the ' in the ffmpeg command. ffmpeg -i test.mp4 -vhook '/usr/lib/watermark.so -f /home/images/image.png' output.flv I found someone that had the exact same problem and they said they figured a workaround but the didn't post it. https://lists.mplayerhq.hu/pipermail/ffmpeg-user/2008-June/015818.html Quote Link to comment Share on other sites More sharing options...
redarrow Posted August 26, 2009 Share Posted August 26, 2009 are u using the program on a windows server if so read this bad notice mate. http://ffmpeg.arrozcru.org/wiki/index.php?title=Building_VHooks forum said this How to deal with apache or php are well outside the scope of this website. Quote Link to comment Share on other sites More sharing options...
redarrow Posted August 26, 2009 Share Posted August 26, 2009 read this please, looks like php or something changes the lines off code http://www.bigresource.com/PHP-FFMPEG-Watermarking-with-drawtext-so-iWKMJAyr.html common problem. Quote Link to comment Share on other sites More sharing options...
backyard Posted August 26, 2009 Author Share Posted August 26, 2009 Actually the server is Centos 5.2. I've tried everything I could think of. I thought maybe I could use escapeshellarg to add the ' ' around the statements but this didn't work. Quote Link to comment Share on other sites More sharing options...
redarrow Posted August 26, 2009 Share Posted August 26, 2009 so what you got so far then, maybe there a regexp to add the '' Quote Link to comment Share on other sites More sharing options...
backyard Posted August 26, 2009 Author Share Posted August 26, 2009 I can add the ' without a problem just by $vhook = "\'/usr/lib/watermark.so -f /home/images/image.png\'"; The problem is it doesn't get parsed properly thus I get an error saying '/usr/lib/watermark.so not found. Emphasis with the ' Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.