How to Convert/Save rotated video

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
JonN
New Cone
New Cone
Posts: 2
Joined: 03 Jul 2013 19:29

How to Convert/Save rotated video

Postby JonN » 03 Jul 2013 19:50

Hi, sorry I haven't found this answer elsewhere... All I want to do is use the Convert/Save dialog to save the result of rotating a video. I get as far as Media> Convert/Save> [InputFile]> Convert/Save, select File, enter OutFile.ext, select Profile (MP4 in this example), and I can get Generated stream output string as follows...
:sout=#duplicate{dst=std{access=file,mux=mp4,dst=C:\Users\MyProfile\Desktop\Movie.mp4}}

This is successful in converting, for instance, an MOV to an MP4 just fine. Trouble is my intent was to also correct the rotation. I'm trying to find the syntax needed to add something like "transform-type=180" somewhere in the Generated stream output string by manually editing the string. Most examples show using the command line options approach, which I don't think should be necessary.

Thanks!

JonN
New Cone
New Cone
Posts: 2
Joined: 03 Jul 2013 19:29

Re: How to Convert/Save rotated video

Postby JonN » 03 Jul 2013 20:16

Seems like this question could be extended to include other video or audio effects. How do you add such elements to the Generated stream outpout string from the Convert/Save dialog?

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: How to Convert/Save rotated video

Postby mederi » 04 Jul 2013 19:34

You also need to transcode the video.
Use Media > Stream... instead of Convert / Save...
Select/create transcoding profile.
Then insert vfilter=transform{type=180} in the generated transcode chain in the last step.

Or you can preview (play) the video at first and apply the transform on-the-fly filter:
Tools > Effects and Filters > Video Effects > Geometry: [v] Transform [Rotate by 180 degrees]
Then stop previewing and go to Stream..., and insert just vfilter=transform in the transcode. The transform-type value will be automatically the same you used in previewing.
An example of generated stream output string with inserted vfilter parameter:
:sout=#transcode{vcodec=h264,vb=1000,scale=0,vfilter=transform}:file{dst=C:\\films\\movie.mp4}
If you want to apply more video filters then use ":" separator among them.

hershmab
New Cone
New Cone
Posts: 2
Joined: 01 Jun 2012 13:57
VLC version: 2.2.1
Operating System: Windows 7

Re: How to Convert/Save rotated video

Postby hershmab » 07 Aug 2013 21:42

I have the same problem: .MOV files created on my wife's iPad appear upside down when played on my PC. Following mederi's instructions below I was able to play and replay it in the correct orientation on VLC in Windows 7. I even thought I had succeeded in saving the rotated version, but when I opened it in the default Windows Media Player it was still upside down.

So I tried mederi's's instructions again - but fell at the first step
stop previewing and go to Stream..., and insert just vfilter=transform in the transcode
. My difficulty is very simple to explain: I cannot find anywhere in the main VLC window that takes me to anything to do with "transcode". Can you point me to the basic instructions please?

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: How to Convert/Save rotated video

Postby mederi » 08 Aug 2013 10:26


Andrewhe
New Cone
New Cone
Posts: 1
Joined: 25 Nov 2014 04:41

Re: How to Convert/Save rotated video with audio VLC 2.1.5

Postby Andrewhe » 25 Nov 2014 05:02

Hi

I have managed to rotate my video by 180 degrees, converted and saved it but I lose the audio. I have tried selecting the MP3 audio codec and also tried selecting "Keep original audio track" but my saved video is silent. The original still has audio. What am I doing wrong please? :( I followed the instructions provided in the link from mederi and it was really useful. I use Win7 Pro and VLC 2.1.5

uzrgm
New Cone
New Cone
Posts: 4
Joined: 09 Jan 2015 14:18

Re: How to Convert/Save rotated video

Postby uzrgm » 11 May 2017 10:35

After 2 days of searching solution for exporting live stream from my Axis camera into a file with 180 degrees rotation I finally found it.

Originally I had this:
":sout=#transcode{vcodec=h264,acodec=none}:file{dst='<output_file_path>'}"
That works fine but I got video upside down.

Then I tried this:
":sout=#transcode{vcodec=h264,acodec=none,vfilter=rotate{angle=180}}:file{dst='<output_file_path>'}"
Rotation worked but output video was 16x16 size.

After this article "http://www.wintips.org/how-to-rotate-an ... ia-player/" and some digging in VLC player logs (vlc.exe --verbose=2 --file-logging --logfile=vlc-log.txt) I came up with this:
":sout=#transcode{vcodec=h264,width=1280,height=720,vfilter=rotate{angle=180},acodec=none}:file{dst='<output_file_path>'}"
Width and Height parameters prevent scaling output video into 16x16.

PS: I am using VLC 2.1.3
PPS: "transform{type=180}" doesn't work in some reason


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Google [Bot] and 11 guests