Hello,
I'm trying to write application for my website which will convert videos, uploaded to my site, to FLV1 format for using in YouTube. My server is a Linux server.
I need to:
- scale (not just resize) uploaded video to 448x336. Mencoder can do that, but it seems FFMPEG can't.
- add watermark. FFmpeg can do that, but Mencoder can't.
- add another video and encode to FLV. Mencoder can do that, FFmpeg can't (it creates broken videos when I join few files).
Of course, I could run process 3 times, but I guess it will kill my Celeron server.
I wonder, is there any way to add watermark (logo) with Mencoder OR is there any way to scale video with FFmpeg, so I could use 2 processes instead of 3.
+ Reply to Thread
Results 1 to 17 of 17
-
-
Originally Posted by ApplePro
I suppose you like the calculating features.
mencoder can add image with
-vf bomvl
which is said to be crap though, not as good as vhook.
somewhere out there is an old hacked version of bmovl to increase it's capabilities
gl -
Originally Posted by guns1inger
Avisynth needs Wine to run on Linux to emulate windows enviroment. It's too complicated for me.
Originally Posted by 45tripp
mencoder can add image with
-vf bomvl
which is said to be crap though, not as good as vhook.
somewhere out there is an old hacked version of bmovl to increase it's capabilities
gl -
For resizing; is there no way to get the dimensions of the original video, and then calculate what to resize to, with ffmpeg, without distorting the AR?
As a principle, I'd agree on there's a difference between resizing and scaling. The former may change AR while the latter wont.
/Mats -
mencoder can add image with
-vf bomvl
which is said to be crap though, not as good as vhook.
somewhere out there is an old hacked version of bmovl to increase it's capabilities -
Ok, I'm trying to use bmovl, but I can't understand how does it work.
I've read mencoder's manual (for bmovl) and also found few usage examples.
I've created bitmap image with this:
convert logo.gif logo.rgb
Then I need to do something like this to use logo in mencoder:
mkfifo logo
echo "RGB24 120 20 0 0 0 0" > logo
cat logo.rgb > logo
But when I'm running 2nd command (echo....) or 3rd (cat....), it countinues running and doesn't return anything. I can only interrupt it by Ctrl + C.
What am I doing wrong? -
Originally Posted by ApplePro
I've never worked linux, or bmovl before so I actually have no idea,
but where's the mencoder command?
convert logo.gif logo.rgb
mkfifo logo
mencoder -vf bmovl=0:1:./logo .....
echo "RGB24 120 20 0 0 0 0" > logo
cat logo.rgb > logo
here's the hacked version of bmovl btw
http://sault.org/mebox/downloads.php
gl -
Originally Posted by 45tripp
Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 23.98 (24000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'testbig.mov':
Duration: 00:02:30.1, start: 0.000000, bitrate: 3371 kb/s
Stream #0.0(eng): Video: mpeg4, yuv420p, 720x480 [PAR 1:1 DAR 3:2], 23.98 fps(r)
Command line:
mencoder -vf scale=448:-3,expand=448:336 -sws 9 -of lavf -ovc lavc -lavcopts vcodec=flv:vbitrate=400 -frames 200 -ofps 15 -nososund -o test2.flv testbig.mov
ffmpeg -i testbig.mov -vcodec flv -r 15 -b 320k -s 448x336 -g 160 -cmp 3 -subcmp 3 -mbd 2 -flags aic+cbp+mv0+mv4+trell -acodec libmp3lame -ab 128k -y test1.flvI've never worked linux, or bmovl before so I actually have no idea,
but where's the mencoder command?
mencoder -vf scale=448:-3,expand=448:336,bmovl=0:0:logo -sws 9 -of lavf -ovc lavc -lavcopts vcodec=flv:vbitrate=400 -frames 200 -ofps 15 -o test2.flv testbig.movconvert logo.gif logo.rgb
mkfifo logo
mencoder -vf bmovl=0:1:./logo .....
echo "RGB24 120 20 0 0 0 0" > logo
cat logo.rgb > logo
I've tried to run it, but I get movie in 2-3 seconds. Movie is without logo.
Also, if I get it correctly, it's same as bmovl, but with features that I don't really need (all I need is to put logo to a video). -
I really doubt it's 3:2,
probably previously botched. (or just ffmpeg misreporting, certainly possible with mov container)
I knew it was the autoscaling you were referring to
this should give the same as mencoder (assuming mencoder sees what ffmpeg sees):
Code:ffmpeg -i testbig.mov -vframes 200 -vcodec flv -r 15 -b 320k -s 448x304 -padtop 16 -padbottom 16 -g 160 -cmp 3 -subcmp 3 -mbd 2 -flags aic+cbp+mv0+mv4+trell -acodec libmp3lame -ab 128k -y test1.flv
Code:ffmpeg -i testbig.mov -vframes 200 -vcodec flv -r 15 -b 320k -s 448x256 -padtop 40 -padbottom 40 -g 160 -cmp 3 -subcmp 3 -mbd 2 -flags aic+cbp+mv0+mv4+trell -acodec libmp3lame -ab 128k -y test1.flv
Originally Posted by ApplePro
I don't know though.
Maybe try running mencoder from a second console.
You'll have to search around or find someone who has actually used it.
Originally Posted by ApplePro
but you never know.
gl -
Originally Posted by 45tripp
I saw it somewhere.
I don't know though.
Maybe try running mencoder from a second console.
You'll have to search around or find someone who has actually used it.Thanks for advices anyway.
2all
Maybe someone used mencoder to add logo to a video? -
I have tried another source (DV 16:9 exported from iMovie 08) with FFmpeg. Still, picture resized incorrectly (faces are too long):
ffmpeg -i testbig.avi -r 15 -vcodec huffyuv -s 448x336 -acodec pcm_s16le -y -sameq temp2.avi
FFmpeg version SVN-r11000, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-libxvid --enable-libmp3lame --enable-gpl --enable-libx264 --enable-static --enable-gpl
libavutil version: 49.5.0
libavcodec version: 51.48.0
libavformat version: 51.19.0
built on Nov 11 2007 06:24:49, gcc: 4.1.2 20070626 (Red Hat 4.1.2-13)
Input #0, avi, from 'testbig.avi':
Duration: 00:00:15.6, start: 0.000000, bitrate: 35978 kb/s
Stream #0.0: Video: dvvideo, yuv420p, 720x576 [PAR 0:1 DAR 0:1], 30.00 fps(r)
Stream #0.1: Audio: pcm_s16le, 44100 Hz, stereo, 1411 kb/s
PIX_FMT_YUV420P will be used as an intermediate format for rescaling
Output #0, avi, to 'temp2.avi':
Stream #0.0: Video: huffyuv, yuv422p, 448x336 [PAR 0:1 DAR 0:1], q=2-31, 200 kb/s, 15.00 fps(c)
Stream #0.1: Audio: pcm_s16le, 44100 Hz, stereo, 1411 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
[huffyuv @ 0xae2320]using huffyuv 2.2.0 or newer interlacing flag
Press [q] to stop encoding
frame= 237 fps= 19 q=0.0 Lsize= 41887kB time=15.6 bitrate=21927.4kbits/s
video:38923kB audio:2696kB global headers:0kB muxing overhead 0.644667% -
Originally Posted by 45tripp
I'm askingthis because I need to create script that will resize movies automatically. -
Originally Posted by ApplePro
you'll have to get the values with some app (ffprobe ,mplayer) and create your own script to
autocalculate the correct values.
check this maybe for an idea
http://www.xs4all.nl/~carlo17/howto/encode.html
I do things manually...
gl
p.s
ffprobe
http://sourceforge.net/projects/ffprobe -
Thanks.
But I can't find whereto download ffprobe and installation info for it. It seems it's very rare software. -
you need to checkout through svn,
then compile
You also need gnu autotools.
No I've not compiled it myself,
and I don't know how good it is.
By the way, mplayers autoscale is not magic,
mplayer doesn't always correctly detect aspect ratio.
mediainfo is probably the best you can do,
(doesn't always detect correctly either)
http://linux.softpedia.com/get/Multimedia/Video/MediaInfo-31053.shtml
I suppose you'll have to check against your input sources.
gl
Similar Threads
-
The easiest and faster way to add a watermark in my video
By morsino in forum Video ConversionReplies: 9Last Post: 10th Jul 2010, 08:51 -
Video Capture with Mplayer, Mencoder or ffmpeg under Winxp. Is it possible?
By gll99 in forum Capturing and VCRReplies: 0Last Post: 11th Sep 2008, 18:00 -
QT movie with 2 video tracks to FLV with mencoder or ffmpeg
By bluehz in forum Video ConversionReplies: 0Last Post: 26th Mar 2008, 15:39 -
Add Watermark To Video?
By johngomez0468 in forum SubtitleReplies: 5Last Post: 29th Jan 2008, 16:48 -
How to Add a Watermark to the whole video file?
By mbextreme in forum Authoring (DVD)Replies: 12Last Post: 14th Oct 2007, 15:21