Rotate output stream

About encoding, codec settings, muxers and filter usage
Ares
New Cone
New Cone
Posts: 5
Joined: 06 Oct 2008 17:54

Rotate output stream

Postby Ares » 10 Oct 2008 17:23

Hi,

I'm using VLC 0.9.2 installed as a windows service. I have configured in VLM few streams like:

new Cam1 broadcast enabled
setup Cam1 input "http://user:pass@xx.xx.xx.xx/ipcam/sjpeg.cgi"
setup Cam1 output #transcode{vcodec=WMV2,vb=1024,scale=1}:std{access=mmsh,mux=asf,dst=xx.xx.xx.xx:8081}
control Cam1 play

Everything ok except one thing: I need to rotate one of the streams.

I can play (localy) starting from cli:
vlc http://user:pass@xx.xx.xx.xx/ipcam/sjpeg.cgi --vout-filter=transform --transform-type=vflip --transform-type=hflip
and the camera is rotated, but I need that output stream rotated.

I think I'm doing some mistakes on the output syntax, I tried in many ways to add "--vout-filter=transform --transform-type=vflip --transform-type=hflip" but without success.

Please advise!

Thanks

Rémi Denis-Courmont
Developer
Developer
Posts: 15268
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Rotate output stream

Postby Rémi Denis-Courmont » 11 Oct 2008 10:18

Code: Select all

--vout-filter=transform --transform-type=180
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Ares
New Cone
New Cone
Posts: 5
Joined: 06 Oct 2008 17:54

Re: Rotate output stream

Postby Ares » 11 Oct 2008 19:17

Hi Remi,

I tried :

setup Cam1 output #transcode{vcodec=WMV2,vb=1024,scale=1}:std{access=mmsh,mux=asf,dst=xx.xx.xx.xx:8081}--vout-filter=transform --transform-type=180

but isn't working, I receive an error (syntax incorrect).

Thank you for help!

mwahal
New Cone
New Cone
Posts: 9
Joined: 21 May 2005 07:20

Re: Rotate output stream

Postby mwahal » 30 Oct 2008 00:05

Is there any work done by developers in addressing this issue ? I think we need a filter in the sout to transform the video for streaming.

Thanks
Mudit

mwahal
New Cone
New Cone
Posts: 9
Joined: 21 May 2005 07:20

Re: Rotate output stream

Postby mwahal » 30 Oct 2008 01:04

OK, I figured it out with some googling. I can rotate the image in sout, but the image is clipped when I play in vlc. Here is what I used to sout and transcode.

Code: Select all

vlc -I dummy somefile.mpg --rotate-angle=90 --sout "#transcode{ deinterlace, fps=18, vb=192, vcodec=x264, acodec=mp3, ab=16, channels=2,deinterlace,vfilter=rotate,scale=.5}:std{access=mmsh,mux=ts,dst=0.0.0.0:8888}" vlc://quit
When I see the streamed output, the picture is flipped 90 deg , but the top and bottom (original left and right) are now clipped.

Here is my vlc flags etc

Code: Select all

VLC media player 1.0.0-git Goldeneye [0x804b208] main libvlc debug: VLC media player - version 1.0.0-git Goldeneye - (c) 1996-2008 the VideoLAN team [0x804b208] main libvlc debug: libvlc was configured with ./configure '--prefix=/usr' '--enable-wxwidgets' '--enable-dvdread' '--enable-dvdplay' '--enable-esd' '--enable-v4l' '--enable-dvb' '--enable-x264' '--enable-lirc' '--with-ffmpeg-mp3lame' '--with-ffmpeg-faac' '--with-ffmpeg-dts' '--with-ffmpeg-vorbis' '--with-ffmpeg-ogg' '--enable-ffmpeg' '--enable-theora' '--enable-faad' '--enable-live555' '--with-live555-tree=../../liveMedia/live' '--enable-debug' '--enable-visual' '--enable-bonjour=no'
Thanks

Mudit

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

Re: Rotate output stream

Postby uzrgm » 11 May 2017 10:38

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

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Rotate output stream

Postby Jean-Baptiste Kempf » 11 Jun 2017 15:45

transform does not work with all types of inputs.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

hit2501
New Cone
New Cone
Posts: 1
Joined: 21 Aug 2017 03:40

Re: Rotate output stream

Postby hit2501 » 21 Aug 2017 03:46

I came up with this:
":sout=#transcode{vcodec=h264,width=1280,height=720,vfilter=rotate{angle=180},acodec=none}:file{dst='<output_file_path>'}"
Do you know how can I apply your solution to a VB Net project? I'm a noob with VLC and I saw that there is no answer for other post about the same issue.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 31 guests