Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stream from rtsp #2

Closed
arnauldb opened this issue Jan 23, 2018 · 5 comments
Closed

stream from rtsp #2

arnauldb opened this issue Jan 23, 2018 · 5 comments

Comments

@arnauldb
Copy link

Hello,

can I stream from a rtsp adress?

Thank you,

@scivision
Copy link
Owner

scivision commented Jan 23, 2018

I think you might be able to,

  • ffmpeg -i "rtsp://1.2.3.4" as the beginning, where 1.2.3.4 is the IP address of your RTSP streaming source.
  • source must be x264
  • will require a new top-level Python script as some more options are particular to this case

We will have to create a command line that works, then update the Python code to automatically create that command line (or just always copy and paste that command)

Which site are you wanting to stream to? E.g. YouTube Live, Periscope, Facebook Live...?

@arnauldb
Copy link
Author

Currently, I stream ( a raspberry pi+camera/ that records birds in my garden) to youtube using a script that takes a rtsp stream from the Pi. I found your "ffmpeg-youtube-live" today, and will try it this week. I wish to be able to stream audio/video and easily switch between youtube/Periscope...

Or maybe I could install "ffmpeg-youtube-live" directly on the Pi (where is already installed Pikrellcam, an audio/video recording motion detect program https://billw2.github.io/pikrellcam/pikrellcam.html)...

@scivision
Copy link
Owner

That sounds like a great idea. I would install on the Pi by git clone and pip install -e . so that in the future you can git pull any changes.

Basically I use this Python script instead of copying and pasting long Bash lines, I would need several for my various tasks. Instead I just remember to run a particular Python script. All these scripts due is "compute" a command line for the particular task.

OK so I think you have PiCam->Pi->RTSP->Youtube, and the GPU on the Pi is fast enough for X264 and this task.
Periscope uses a lower quality stream (lower bitrate) so prima facie I think that Periscope should work just as well.
Currently Periscope allows two different resolutions, with the same maximum bitrate.
If the Raspi CPU/GPU can handle it, due to the low motion in your garden video, you might be able to do HD Periscope (1280x720) instead of SD (960x540)

@scivision
Copy link
Owner

Does a shell command like from this script work?
https://github.com/ppihus/rtsp-stream-to-youtube

@sbonaime
Copy link

@scivision
Hi ! Can you re open this issue ? I would like to stream an rtsp source to youtube and twitch. Here is the command line I use

ffmpeg -rtsp_transport tcp 
            -i rtsp://admin:@rtsp_IP:554 \
            -q:v 1 -c:v libx264    -c:a aac -ab 44.1k -crf 25\
            -f flv rtmp://a.rtmp.youtube.com/live2/Xxxxx-xxxx-xx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants