Page 1 of 1

Video frame shift issue

Posted: 01 May 2015 17:57
by quelx
I have some videos from an old camera phone where the frames are vertically challenged, e.g. some of the top lines of each frame are at the bottom of the frame. Like this: Image

Is there a technical term for this which I can use to search google or a setting in VLC to correct for this?

I have tried searching for video [vh]sync, misaligned video frames, video frame shift, shift video vertically, and the like.

Thank you.

Re: Video frame shift issue

Posted: 02 May 2015 10:32
by Lotesdelere
What OS ?
Which VLC version ?


Please open Tools -> Messages (set Verbosity to 2) before you start the playback, and then paste the full resulting log here or on Pastebin.com if it's too long.

Also upload a short sample of a problematic file to either http://streams.videolan.org/upload/ or to Zippyshare.com (200 MB max) or to EmbedUpload.com, the latter will upload the file for you to several other hosts (use the default ones) and then post the link to the file here.

If needed cut it with DGsplit and read here about how to do it:
viewtopic.php?f=14&t=57724&p=193335#p193335
50 MB max should be enough.

Re: Video frame shift issue

Posted: 03 May 2015 03:21
by quelx
What OS ?
OS X 10.10.3 (14D136)
Which VLC version ?
VLC 2.1.5 Rincewind

debug logs from "Window > Messages" @ http://pastebin.com/8NxKBHnr

uploaded video-2010-06-20-19-25-41.3gp, 891,480 bytes to http://streams.videolan.org/upload/

To be clear, I do not believe this is an issue with VLC. The video looks the same in mplayer, quicktime, on Google Photos, etc. I was wondering if there is a way to fix it with VLC or if there was a term for this issue I could add to my google-fu.

Thank you.

Re: Video frame shift issue

Posted: 03 May 2015 19:04
by Jean-Baptiste Kempf
I don't know any solution for this.

Re: Video frame shift issue

Posted: 07 May 2015 15:04
by quelx
I ended up using some ImageMagick and a few mplayer.

Dump the frames:

Code: Select all

mplayer -vo png video.3gp
Dump the audio:

Code: Select all

mplayer -vc dummy -vo null -ao pcm:file=video.wav video.3gp
Fix the frames (shifted down 85 pixels):

Code: Select all

for i in $(ls -1 *.png); do convert -roll +0+85 $i roll-$i done
Put it back together:

Code: Select all

mencoder mf://roll-*.png -mf fps=29.970 -ovc lavc -o roll-video.avi -oac mp3lame -audiofile video.wav
And for ffmpeg (which produced better results):

Code: Select all

ffmpeg -framerate 20.83 -i roll-0000%04d.png -i video.wav -c:v libx264 -c:a aac -strict experimental -b:a 64k -r 30 -pix_fmt yuv420p roll-video.mp4

Re: Video frame shift issue

Posted: 12 May 2015 16:23
by mederi
vhs video filter can shift picture up/down :)
Tools > Preferences > Show settings=All > Video > Filters: [v] VHS movie effect video filter

Re: Video frame shift issue

Posted: 12 May 2015 17:24
by quelx
vhs video filter can shift picture up/down :)
Tools > Preferences > Show settings=All > Video > Filters: [v] VHS movie effect video filter
That made it interesting :wink: