Open Kshitij-Khode opened 6 years ago
Hello,
I'd just like to say that I am currently having the same issue as you. I got it to work on one of my PCs using the gopro_keepalive script a few months back, but as of now I only have gotten it to work on the ffmpegless script. Now, I've tried it on another PC and I am experiencing the exact same issues as you. I tried reverting my Python version and goprocam version to the working ones, but they do not work on the other computer. Attempting to execute streaming results in status 0 consistently. I will let you know if I find a solution.
For reference: The working machine used Windows 10 and the non-working had Windows Server 2016. I attempted to use versions 2.0.6 and 2.0.1 of goprocam. The GoPro is running the latest firmware (HX1.01.02.00). I used a nightly build of ffmpeg for the issues above, but the working machine (which ffmpeg didn't work on the second time) uses an earlier nightly build from 2017 or so.
Hi. Try adding a @ symbol to 10.5.5.9, I think we got it solved that way in another issue.
Due to time crunch constraints, I simply moved away from my Linux VM and ran things on an alt-boot installation of Linux. This fixed the issue for me.
Where exactly should I be adding an @? I tried in the UDP address and it still didn't work (since the stream isn't even starting). Trying to sock.sendto with the @ symbol does not work either. Doing so in Chrome to enter the URLs makes no difference, still status 0.
I should've been more specific, sorry, in line 94 replace
udp://10.5.5.100:8554
with
udp://@10.5.5.100:8554
I'll add it to the code if it works.
In the GoProStream.py script it never reaches that part of the code, since it's trying to get status 31 from the GoPro (which is returning status 0).
When I modified the gopro-py-api code, which loads ffmpeg, it still didn't change the results.
This "bug" still exists. I got nailed as well after trying to connect VLC to watch the stream. Minutes before that, the stream was running (albeit, unknown if it was actually working)
As suspected it was a hang in the GoPro. Full powerdown, restart fixed it. Perhaps VLC keeps the connection open and barrs the GoPro from starting another video stream or something.
I made the same experience today. I tried to stream from my GoPro Hero 4 Black: The status code stays 0 and the stream never starts :/
I also tried to use ffplay manually and once some data were transmitted, but ffplay was reporting not readable headers and corrupt packages. In the end not any image could be displayed ...
Any ideas how to fix that?
I had the same problem with HERO7 black on both windows and linux. For whatever reason I could not get VLC to connect, always getting an error code "unable to open the MRL...." But achieved success with ffplay with the following line
ffplay udp://@10.5.5.9:8554 -fflags nobuffer
whilst executing
goproCamera = GoProCamera.GoPro() goproCamera.livestream("start") #execute this every ~ten seconds to maintain UDP stream
ffplay does occasionally still report unreadable headers and corrupt packages, but the video is still displayed OK.
After looking at this thread: https://github.com/KonradIT/goprowifihack/issues/47, I tried to get a stream running by using the GoPro app to get the UDP stream up and running. However, I still can't seem to connect to the UDP stream via VLC or ffplay.
Steps to reproduce issue:
http://10.5.5.9/gp/gpControl/execute?p1=gpStream&a1=proto_v2&c1=restart
and received{status: "0"}
as a response.http://10.5.5.9/gp/gpControl/status
and received a response,branch HD4 HERO4 Session HX1.01.02.00 ('UDP target IP:', '10.5.5.9') ('UDP target port:', 8554) ('message:', 'GPHD:0:0:2:0.000000\n') Recording on camera: False Press ctrl+C to quit this application.
from goprocam import GoProCamera from goprocam import constants gopro = GoProCamera.GoPro() gopro.stream("udp://127.0.0.1:10000")
HERO4 Session HX1.01.02.00 Camera successfully connected! {"status":"0"}
ffmpeg version 2.8.14-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609 configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100
Traceback (most recent call last): File "Test.py", line 4, in
gopro.stream("udp://127.0.0.1:10000")
File "/home/kshitij/.local/lib/python3.5/site-packages/goprocam/GoProCamera.py", line 864, in stream
self.KeepAlive()
File "/home/kshitij/.local/lib/python3.5/site-packages/goprocam/GoProCamera.py", line 67, in KeepAlive
time.sleep(2500/1000)
KeyboardInterrupt
[mpegts @ 0x10a5580] Could not detect TS packet size, defaulting to non-FEC/DVHS
udp://10.5.5.9:8554: could not find codec parameters
{"info":{"model_number":16,"model_name":"HERO4 Session","firmware_version":"HX1.01.02.00","serial_number":"C3141325722464","board_type":"0x07","ap_mac":"F4DD9E23FD95","ap_ssid":"GoProSession","ap_has_default_credentials":"0"}}