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 Link to comment https://forums.phpfreaks.com/topic/171879-ffmpeg-exec-and-vhook/ 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. Link to comment https://forums.phpfreaks.com/topic/171879-ffmpeg-exec-and-vhook/#findComment-906333 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. Link to comment https://forums.phpfreaks.com/topic/171879-ffmpeg-exec-and-vhook/#findComment-906338 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. Link to comment https://forums.phpfreaks.com/topic/171879-ffmpeg-exec-and-vhook/#findComment-906352 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 '' Link to comment https://forums.phpfreaks.com/topic/171879-ffmpeg-exec-and-vhook/#findComment-906354 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 ' Link to comment https://forums.phpfreaks.com/topic/171879-ffmpeg-exec-and-vhook/#findComment-906370 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.