Page 1 of 1

Transcode with cmd line duplicates image

Posted: 13 Jul 2014 16:49
by ric
My end goal is to take my GoPro footage (which was recorded at a slight angle), and transcode it to the correct viewing angle.

To this end, I am trying to figure out the correct command line options to use.

Based on the documentation at https://wiki.videolan.org/VLC_command-line_help/, I have figured out the correct command line to view the video correctly:
  • vlc -vvv "E:\GP020516.MP4" --video-filter=rotate:croppadd --rotate-angle=-18 --croppadd-croptop=220 --croppadd-cropbottom=220 --croppadd-cropleft=220 --croppadd-cropright=220
To contrast to the transcoded stream, here is an example of how the video looks when viewing with the above command line.
Image

In order to convert the video, I started using the following command line:
  • vlc -vvv "E:\GP020516.MP4" --stop-time=5 --sout=#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:standard{access=file,mux=ts,dst="E:\test.mpg"}
The output file is clearly very broken. It has rotated the video by 90degrees, and duplicated it, so there are 2 copies of the image. Check out the snapshot below.
Image


I would like to know why this command line creates this double-image in the output? Surely not a bug?

Re: Transcode with cmd line duplicates image

Posted: 13 Jul 2014 17:35
by ric
There is a bug in 2.1.3, according to this post: Upgrading to a 3.0.0 nightly (and clearing the preferences, even though I had no preferences set???) almost fixed the issue, but got poor performance.

Downgrading to 2.0.2 (and clearing preferences) fixed the issue.

For anyone reading this in the future who wants to rotate and crop a video, a working command line is:
  • vlc -vvv "E:\GP020516.MP4" :sout=#transcode{vcodec=h264,vfilter={rotate{angle=-18}:croppadd{croptop=220,cropbottom=220,cropleft=220,cropright=220}},acodec=mpga}:file{mux=mp4,dst="E:\test.mpg"} vlc://quit
The transformation is:
  • Rotate 18 degrees clockwise
  • Crop by 220 pixels all round to remove the rotated frame
A handy tip when playing with conversions like this is to only convert a small portion of the clip while fine-tuning the parameters, with this parameter:
  • --stop-time=5