|
Post by Skylar MSGC on Jun 28, 2017 12:40:56 GMT -7
Hey everyone, At Montana State we have been coming up with a method to use ffmpeg by running python. So for those that don't want to copy paste into their command prompt they wont have to. The repository where this python script is sitting is: github.com/MSU-BOREALIS/ffmpy_groundstationThe python file needs to be moved into the same folder that you have your ffmpeg.exe. You also need to change LINE 9 in the code to contain your RTMP key. Example: what is currently on line 9
RTMPKEY ='put you key in these quotes'
What you need to change it to
RTMPKEY ='xxxxxxxxxx-xxxxxxxxx-xxxxxxx' Once you do that you can just run the code and not have to change anything afterwards. You also need to install the python module ffmpy. You can do this by typing in pip install ffmpy into you command console. --if pip isn't a recognized command you can goto C:/Python27/Scripts/ to run pip in its home directory. This script is designed to restart when you lose connection. So if the paylaod hits an jetstream your dish can track back to it and pick back up the video stream. I will update this code where needed. Make sure to read the README.md on the github site
|
|
|
Post by Joe_CWU on Aug 4, 2017 13:06:34 GMT -7
Hello,
I went through the updating process for the video payload, (flashing the SD card, updating the firmware on the modems, and updating the modem settings) and continued to try and get the streaming to work. I have followed the steps above to start streaming and cannot get it to work. I made sure my modems are connected and that I have the correct RTMP key. I was able to access the files through bitvise, everything has worked smoothly until now.
Streaming is supposed to start if I run the ffmpeg.exe correct? When I try this nothing happens. I can't even get it to display in VLC.
Thanks, Joe
|
|
|
Post by kendra on Aug 8, 2017 8:54:41 GMT -7
I have a similar question. Is it suggested that we run the ffmpeg on Anaconda or Spyder?
Kendra
|
|
|
Post by psuteam on Aug 8, 2017 20:03:56 GMT -7
I have a similar question. After doing all updates, the video will not work using the new python code but it does still work using the old copy/paste code. When I type "python ffmpy_stream.py" into command prompt, it responds with this:
C:\ffmpeg\bin>python ffmpy_stream.py Your current ffmpeg command: ffmpeg -stimeout 3000000 -i rtsp://192.168.1.3:8554/ -c copy -f rtp_mpegts rtp://localhost:4000 -r 25 -c copy -loglevel panic -b:v 3M -f flv rtmp://media.stream.live:1935/live/rtmp://media.stream.live:1935/live/9eb4bcc2-cb0b-44df-add1-5de011794600 () finished
|
|
|
Post by sten on Aug 10, 2017 16:37:44 GMT -7
Psuteam, we're getting the exact same. Were you able to find a fix? We did the 'pip install ffmpy', and that seemed to work, but I'm wondering if somehow we did not install it correctly...
|
|
|
Post by psuteam on Aug 11, 2017 21:44:09 GMT -7
The trick is the go into the ffmpy_stream.py file and at the very bottom it says that the boolean has to be True, so you need to change the word "False" to "True". Save file and run.
I used Command Prompt.
Another thing I messed up was that you need to remove the website portion of your RTMP key so that its only the random string of letters and numbers.
After I fixed those two things, it worked beautifully. Btw, it no longer displays the wall of streaming code when its running so don't wait for that.
|
|
|
Post by kendra on Aug 12, 2017 16:23:24 GMT -7
I placed the ffmpy_stream.py file in the same folder as the ffmpeg.exe file.
I changed the RTMPKEY to my string of numbers and letters and I changed the Boolean from "False" to "True," but it still it not working for me.
When I use the Command Prompt
C:\Users\Ground Station>python ffmpy_stream.py it says that there is No such file or directory.
If I get to the:
C:\ffmpeg\bin>python ffmpy_stream.py
it says ffmpeg has finished, through end of file or timeout, streaming shouldn't reach here restarting now startting ffmpeg process.
and it keeps repeating this although it is not streaming.
Any ideas?
I am able to get the streaming to work using the old copy and paste method so I know my connection is good.
Thanks,
Kendra
|
|
|
Post by psuteam on Aug 12, 2017 18:38:09 GMT -7
I ran into that same exact repeating loop issue. Fixing my RTMP key is what fixed it for me.
I originally put it as: 'rtmp://media.stream.live:1935/live/9eb4bcc2-cb0b-44df-add1-5de0117#####'
Then changed to: '9eb4bcc2-cb0b-44df-add1-5de0117#####' (only changed the last 5 numbers to # here because I think we're not suppose to publish these online)
So I would double check that your RTMP key is inputted correctly. Hopefully that does it. I have no idea what else could cause that error.
|
|
|
Post by kendra on Aug 13, 2017 9:53:45 GMT -7
Thanks for the response. I didn't use the website info, just the rmtp key, but I'll try copying it again. Maybe there is an extra space or something I didn't see.
Kendra
|
|
|
Post by kendra on Aug 13, 2017 13:09:03 GMT -7
Nope, still not working. I re-copied the code (not the 'rtmp://media.stream.live:1935/live/..." but just the individualized code that works the old fashioned way of using ffmpeg).
I even deleted the ffmpy file and downloaded it again from github, changed the Boolean to "True" and replaced my RTMP code and I am getting the same error as before:
ffmpeg has finished, through end of file or timeout, streaming shouldn't reach here restarting now startting ffmpeg process.
Any ideas?
Kendra
|
|
|
Post by psuteam on Aug 13, 2017 18:02:50 GMT -7
Hey, I ran into the same issue again when trying to use a different laptop. This time what fixed it was creating the ad hoc network and static ip as instructed in the original video streaming document. So try checking your connection to the pi. Hope that helps...
|
|
|
Post by kendra on Aug 13, 2017 20:23:56 GMT -7
Thanks, Eclipse Design ProBoards buddy!
I'll give that a try tomorrow.
Kendra
|
|
|
Post by kendra on Aug 14, 2017 9:43:39 GMT -7
Could you send me the link and what time stamp in the video where you created the ad hoc network and set up a static IP?
I am able to get on BitVise and used 192.168.1.3 Port 22 to log into the pi to change the date and time, so I know that connection is good.
But still, the old way of streaming with ffmpeg works, but the ffmpy does not.
Kendra
|
|
|
Post by kendra on Aug 14, 2017 10:19:32 GMT -7
In addition to the ffmpy not working, my rtp://localhost:4000/ is not playing on VLC media player.
Any idea what settings I need to change to make both of these connections work?
Kendra
|
|
|
Post by kendra on Aug 14, 2017 10:39:09 GMT -7
Ok, I was able to get the VLC Media viewer to work with tsp://192.168.1.3:8554/ but not rtp://localhost:4000/ or rtp://localhost:4000 (I'm not sure if you are supposed to use the final slash or not.)
Does anyone have any idea why my rtp://localhost:4000/ isn't working on VLC Media Viewer?
I copied and pasted it directly from the ffmpy code.
Kendra
|
|