Adding logo after rescaling video (how?)

About encoding, codec settings, muxers and filter usage
PureVirtual
Blank Cone
Blank Cone
Posts: 14
Joined: 26 Apr 2008 01:51

Adding logo after rescaling video (how?)

Postby PureVirtual » 10 May 2008 18:50

I need to prepare video files for streaming by transcoding audio/video to lower bitrate and adding logo. The next command line basically does the thing...

Code: Select all

vlc some.avi --sout #transcode{vcodec=h264,vb=256,fps=25,maxwidth=320,maxheight=240,canvas-width=320,canvas-height=240,canvas-aspect=4:3,sfilter=logo,acodec=mp3,ab=128,channels=2}:std{access=file,mux=mp4,dst=some.mp4} --logo-file logo.png
...but the logo gets smaller and stretched out verticaly. I thought that happened because the logo was added before rescaling of the video (the source avi file resolution is 720x400 (16:9) and I need just 320x240 (4:3), so I rescale it and add margins as you may see from command line above). Is there any way to make rescaling first and add logo after that?

-- later --

But on the other hand logo is displayed on the bottom margin that didn't exist before rescaling, and the picture itself keeps the initial aspect ratio (only convas changes), but the logo is stratched somehow.. hmm.. don't know what to think. Any guesses why does it happen and what can be done?

Image
Sample picture. The wheel on the logo should be round (equal height and width) and the logo should be 54x54px (64x64px including transparent margins).

P.S.: I've tested the same command line with the 704x528 (4:3) input file, the logo now remains its initial proportions but keeps getting significantly smaller.

Image

What am I doing wrong?..

-- added later --

For now I use something like this:

Code: Select all

vlc some.avi --sout #transcode{vcodec=h264,vb=512,maxwidth=320,maxheight=240,canvas-width=320,canvas-height=240,canvas-aspect=4:3}:transcode{vcodec=h264,vb=256,fps=25,sfilter=logo,acodec=mp3,ab=128,channels=2}:std{access=file,mux=mp4,dst=some.mp4} --logo-file logo.png
...but that's obviously no good to do extra transcoding. Maybe there's a way to make some changes to the picture without actualy encoding it before all manipulations are done?..

-- added more then half a year later --

Thanks to everyone for helpfull answers. I'm still looking for help if anybody cares.

Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 8 guests