User:Buzz/Foss Video

From NURDspace
< User:Buzz
Revision as of 21:34, 15 November 2013 by Buzz (talk | contribs)

Playing with Video on FOSS

So, you want to play with video inputs/outputs/files without cardboard boxed software? Great!

fix b0rked v4l

You can 'fix' weird pixel formats, programs that dont properly work with your v4l device with these funky preloads;

LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so

_or_

LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l2convert.so

Both have their purpose, but I can't keep them apart, just try each ;)

convert, encode stuff

Just some handy copypastes.

Replace the INPUT and OUTPUT, also some codecs support multiple passes, so, pass=1, pass=2, pass=3 etc ... lame presets are just the default commandline lame presets


mencoder INPUT -o OUTPUT -ovc xvid -xvidencopts bitrate=1200:pass=1:turbo:threads=2 -oac mp3lame -lameopts preset=medium

mencoder INPUT -aspect 16:9 -o OUTPUT -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1200:vpass=1:turbo:threads=2 -oac mp3lame -lameopts preset=medium

mencoder INPUT -o OUTPUT -ovc lavc -lavcopts vbitrate=1800:vcodec=mjpeg -nosound

ffmpeg -i INPUT(.avi) -vcodec copy OUTPUT(.mov)

mencoder INPUT -o OUTPUT -ovc lavc -lavcopts vbitrate=1800:vcodec=mjpeg -nosound -vf scale=640:480,pp7 -fps 25


ultratux cvlc http stream

21:33:16 <@ultratux> cvlc v4l2:///dev/video0 :v4l2-standard= :i:live-caching=300 :sout="#transcode{vcodec=WMV2,vb=2800,scale=1,acodec=wma2,ab=128,channels=2,samplerate=100}:http{dst=:5757/delta.wmv}"