restreamer
restreamer copied to clipboard
Rotate/Transpose
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 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.
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
๐๐๐งก๐ Help datarhei with a rating or review on Google. #feelsgoodtobeloved https://t.co/ZT9pRX1gG7