datarhei / restreamer

The Restreamer is a complete streaming server solution for self-hosting. It has a visually appealing user interface and no ongoing license costs. Upload your live stream to YouTube, Twitch, Facebook, Vimeo, or other streaming solutions like Wowza. Receive video data from OBS and publish it with the RTMP and SRT server.
https://docs.datarhei.com/restreamer/
Apache License 2.0
3.78k stars 438 forks source link

Poor quality of video #12

Closed tlenclos closed 6 years ago

tlenclos commented 8 years ago

Hi there, thanks for your work ! I tried your project and it seems that the quality is not as good as my previous setup with just raspivid + ffmpeg.

I didn't try to change the config, i'm no ffmpeg expert, but I used the same FPS and bitrate as the command below (that I found on this excellent post http://maxogden.com/hd-live-streaming-cats.html). Maybe we could change some default parameters in live.json, fyi my setup is this:

raspivid -o - -t 0 -vf -hf -fps 30 -b 6000000 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2

svenerbeck commented 8 years ago

Hi tiencios

Yes Sir - the Raspicam is currently just a "hack" ;-) But we added more startup ENV in the latest version. You can start the Docker-Image now with:

-e "RS_RASPICAM_WIDTH=1280" -e "RS_RASPICAM_HEIGHT=720" -e "RS_RASPICAM_FPS=25" -e "RS_RASPICAM_BITRATE=500000"

An example for a Pi2:

docker run -d —name restreamer --restart always -p 8080:8080 --privileged -v /opt/vc:/opt/vc -v /mnt/restreamer/db:/restreamer/db \
   -e "RESTREAMER_USERNAME=YOUR-USERNAME" \
   -e "RESTREAMER_PASSWORD=YOUR-PASSWORD" \
   -e "MODE=RASPICAM" \
   -e "RS_RASPICAM_WIDTH=1280" \
   -e "RS_RASPICAM_HEIGHT=720" 
   -e "RS_RASPICAM_FPS=25" \
   -e "RS_RASPICAM_BITRATE=500000" \
   datarhei/restreamer-armv7l:latest