Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

"Deshaking" means fixing the video captured from camera hold in hands.

Is there open source video deshaker apart from y4mstabilizer from mjpegtools? Patch for mencoder is preferred.

My current command line for processing video looks like:

mplayer  video_from_camera.avi -nosound -vo yuv4mpeg:file=/dev/stdout -really-quiet | y4mstabilizer -n -a 0.8 -r 30 -s 100 | mplayer -cache 1000 /dev/stdin -noconsolecontrols -vf crop=500:380:70:50,denoise3d=3:3:5:5 -vo yuv4mpeg:file=temporary.yuv

y4mstabilizer is itself very unstable and often crashes (and it didn't work at all until I have patched memory allocation in it).

share|improve this question

Use transcode with "stabilize" and "transform" plugin pair. http://www.transcoding.org/

transcode -i temporary1.yuv -J  stabilize=maxshift=100=fieldsize=20 -y null,null -o /dev/null
transcode -i temporary1.yuv -J transform=smooth=50,denoise3d=luma=3:chroma=3:luma_strength=5:chroma_strength=5 -y yuv4mpeg -o temporary2.yuv
share|improve this answer
up vote 0 down vote accepted

Use ffmpeg with the same filter as in transcode:

# create deshaking profile, with a preview
ffmpeg -i inputvideo.mkv -pix_fmt yuv420p -vf vidstabdetect=show=1:result=inputvideo.trf -vcodec libx264 -preset ultrafast -crf 0 -an -f matroska - | ffplay  -

# preview the transformed video
ffmpeg -i inputvideo.mkv -pix_fmt yuv420p -vf vidstabtransform=input=inputvideo.trf:smoothing=5  -vcodec libx264 -preset ultrafast -crf 0 -an -f matroska -  | ffplay -
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .