restreamer icon indicating copy to clipboard operation
restreamer copied to clipboard

Rotate/Transpose

Open ws opened this issue 5 years ago โ€ข 2 comments

Hey guys! Looking to rotate my RTSP feed 90 degrees before piping it back out- figured it would be pretty easy to modify the FFMPEG config in conf/live.json but I cannot for the life of me seem to get the parameters correct. I get an exit with code 1 on pretty much anything I try. Any pointers?

ws avatar Dec 23 '19 01:12 ws

@ws What did you try so far?

You should enable encoding to "h264". In conf/live.json add the filter to the video_codec_h264 option:

...
           "video_codec_h264": {
                "inputOptions": [
                    "-re"
                ],
                "outputOptions": [
                    "-codec:v libx264",
                    "-preset:v {preset}",
                    "-b:v {bitrate}k",
                    "-maxrate {bitrate}k",
                    "-bufsize {bitrate}k",
                    "-r {fps}",
                    "-g {gop}",
                    "-pix_fmt yuv420p",
                    "-map 0:{videoid}",
                    "-vsync 1",
                    "-filter:v",
                    "rotate=90*PI/180"
                ]
            },
...

Disclaimer: I didn't try it out, but this would be my first shot.

If you modify conf/live.json you have either build your own Docker image or mount it into the container.

ioppermann avatar Dec 27 '19 10:12 ioppermann

Hello @ws The v2.2.0 now supports video rotation. Here is a tutorial: https://docs.datarhei.com/restreamer/knowledge-base/user-guides/how-to-rotate-a-video

Cheers

jstabenow avatar Jul 22 '22 11:07 jstabenow

๐Ÿ’™๐Ÿ’š๐Ÿงก๐Ÿ’œ Help datarhei with a rating or review on Google. #feelsgoodtobeloved https://t.co/ZT9pRX1gG7

svenerbeck avatar Nov 15 '22 09:11 svenerbeck