Hello @KonradIT ,
Thank you for this amazing API.
I tried it on Windows 7, i can get the camera connected and get the overview infos, but when it came to streaming it fails.
I'm on the firmware 1.60.00, using pythonV3.7.0, and last ffmpegV4 64-bit (i also tried ffmpegV4 32bit just in case), and finally VLC-v3.03 to capture the stream using udp://localhost:5000.
Here's my code for quick testing :
from goprocam import GoProCamera
# from goprocam import constants
gpCam = GoProCamera.GoPro()
# gpCam.pair(usepin=False) # I use this as said to pair for the first time.
print(gpCam.overview()) # I get the camera infos here but isRecording == Recording even if it's not !!!
gpCam.stream("udp://localhost:5000") # I tried to switch order with gpCam.livestream("start") just in case but nothing
gpCam.livestream("start")
while True: # just for quick testing
print()
And here's the output :
ffmpeg version N-91378-g3f953379e1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
libavutil 56. 18.102 / 56. 18.102
libavcodec 58. 20.104 / 58. 20.104
libavformat 58. 17.101 / 58. 17.101
libavdevice 58. 4.101 / 58. 4.101
libavfilter 7. 25.100 / 7. 25.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100
[h264 @ 00997680] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 00997680] decode_slice_header error
[h264 @ 00997680] no frame!
[h264 @ 00997680] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 00997680] decode_slice_header error
[h264 @ 00997680] no frame!
[h264 @ 00997680] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 00997680] decode_slice_header error
[h264 @ 00997680] no frame!
[h264 @ 00997680] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 00997680] decode_slice_header error
[h264 @ 00997680] no frame!
[h264 @ 00997680] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 00997680] decode_slice_header error
[h264 @ 00997680] no frame!
[h264 @ 00997680] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 00997680] decode_slice_header error
[h264 @ 00997680] no frame!
[h264 @ 00997680] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 00997680] decode_slice_header error
[h264 @ 00997680] no frame!
[h264 @ 00997680] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 00997680] decode_slice_header error
[h264 @ 00997680] no frame!
[mpegts @ 00982900] Could not find codec parameters for stream 2 (Unknown: none ([128][0][0][0] / 0x0080)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'udp://10.5.5.9:8554':
Duration: N/A, start: 0.066733, bitrate: N/A
Program 1
Stream #0:0[0x1011]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuvj420p(pc, bt709, progressive), 848x480 [SAR 1:1 DAR 53:30], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x1100]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 193 kb/s
Stream #0:2[0x200]: Unknown: none ([128][0][0][0] / 0x0080)
Please use -b:a or -b:v, -b is ambiguous
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mpeg2video (native))
Stream #0:1 -> #0:1 (aac (native) -> mp2 (native))
Press [q] to stop, [?] for help
[h264 @ 00a33280] concealing 1127 DC, 1127 AC, 1127 MV errors in P frame
[swscaler @ 08b63e00] deprecated pixel format used, make sure you did set range correctly
Output #0, mpegts, to 'udp://localhost:5000':
Metadata:
encoder : Lavf58.17.101
Stream #0:0: Video: mpeg2video (Main), yuv420p, 848x480 [SAR 1:1 DAR 53:30], q=2-31, 800 kb/s, 30 fps, 90k tbn, 30 tbc
Metadata:
encoder : Lavc58.20.104 mpeg2video
Side data:
cpb: bitrate max/min/avg: 0/0/800000 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s
Metadata:
encoder : Lavc58.20.104 mp2
[h264 @ 05f86c00] concealing 1142 DC, 1142 AC, 1142 MV errors in P frame
[h264 @ 00a33a40] cabac decode of qscale diff failed at 51 8
[h264 @ 00a33a40] error while decoding MB 51 8, bytestream 2671
[h264 @ 00a33a40] concealing 1164 DC, 1164 AC, 1164 MV errors in P frame
[h264 @ 00a33280] concealing 504 DC, 504 AC, 504 MV errors in P frame
[h264 @ 00a33280] concealing 278 DC, 278 AC, 278 MV errors in P frame
[h264 @ 00a40000] concealing 129 DC, 129 AC, 129 MV errors in P frame
[h264 @ 00a33640] error while decoding MB 23 5, bytestream -33
[h264 @ 00a33640] concealing 1351 DC, 1351 AC, 1351 MV errors in I frame
[h264 @ 00a33640] cabac decode of qscale diff failed at 0 23
[h264 @ 00a33640] error while decoding MB 0 23, bytestream 500
[h264 @ 00a33640] concealing 420 DC, 420 AC, 420 MV errors in P frame
[h264 @ 00a33640] cabac decode of qscale diff failed at 20 24
[h264 @ 00a33640] error while decoding MB 20 24, bytestream 302
[h264 @ 00a33640] concealing 347 DC, 347 AC, 347 MV errors in P frame
[h264 @ 00a33280] cabac decode of qscale diff failed at 47 14
[h264 @ 00a33280] error while decoding MB 47 14, bytestream 1797
[h264 @ 00a33280] concealing 850 DC, 850 AC, 850 MV errors in P frame
[h264 @ 00a33280] cabac decode of qscale diff failed at 41 22
[h264 @ 00a33280] error while decoding MB 41 22, bytestream 580
[h264 @ 00a33280] concealing 432 DC, 432 AC, 432 MV errors in P frame
[h264 @ 00a33280] concealing 1162 DC, 1162 AC, 1162 MV errors in P frame
[h264 @ 00a33280] cabac decode of qscale diff failed at 10 18
[h264 @ 00a33280] error while decoding MB 10 18, bytestream 1542
[h264 @ 00a33280] concealing 675 DC, 675 AC, 675 MV errors in P frame
[h264 @ 00a33280] concealing 1140 DC, 1140 AC, 1140 MV errors in P frame
[h264 @ 00a40000] cabac decode of qscale diff failed at 20 6
[h264 @ 00a40000] error while decoding MB 20 6, bytestream 2778
[h264 @ 00a40000] concealing 1301 DC, 1301 AC, 1301 MV errors in P frame
[h264 @ 00a40000] concealing 1162 DC, 1162 AC, 1162 MV errors in P frame
[h264 @ 00a40000] concealing 890 DC, 890 AC, 890 MV errors in P frame
[h264 @ 00a40000] concealing 471 DC, 471 AC, 471 MV errors in P frame
[h264 @ 00a33a40] cabac decode of qscale diff failed at 22 20
[h264 @ 00a33a40] error while decoding MB 22 20, bytestream 1036
[h264 @ 00a33a40] concealing 557 DC, 557 AC, 557 MV errors in P frame
[h264 @ 05f86c00] concealing 178 DC, 178 AC, 178 MV errors in P frame
[h264 @ 05f86c00] cabac decode of qscale diff failed at 20 20
[h264 @ 05f86c00] error while decoding MB 20 20, bytestream 1802
[h264 @ 05f86c00] concealing 559 DC, 559 AC, 559 MV errors in P frame
[h264 @ 05f86c00] cabac decode of qscale diff failed at 36 25
[h264 @ 05f86c00] error while decoding MB 36 25, bytestream 714
[h264 @ 05f86c00] concealing 278 DC, 278 AC, 278 MV errors in P frame
[h264 @ 05f86c00] concealing 1240 DC, 1240 AC, 1240 MV errors in P frame
[h264 @ 05f86c00] concealing 676 DC, 676 AC, 676 MV errors in P frame
[h264 @ 00a33a40] concealing 108 DC, 108 AC, 108 MV errors in P frame
[h264 @ 05f86c00] error while decoding MB 52 28, bytestream -5
[h264 @ 05f86c00] concealing 103 DC, 103 AC, 103 MV errors in P frame
[h264 @ 05f86c00] concealing 881 DC, 881 AC, 881 MV errors in P frame
[h264 @ 00a33a40] cabac decode of qscale diff failed at 25 6
[h264 @ 00a33a40] error while decoding MB 25 6, bytestream 3839
[h264 @ 00a33a40] concealing 1296 DC, 1296 AC, 1296 MV errors in P frame
[h264 @ 00a33a40] concealing 1017 DC, 1017 AC, 1017 MV errors in P frame
[h264 @ 00a33a40] concealing 1284 DC, 1284 AC, 1284 MV errors in P frame
[h264 @ 00a33280] concealing 812 DC, 812 AC, 812 MV errors in P frame
[h264 @ 00a40000] concealing 570 DC, 570 AC, 570 MV errors in P frame
[h264 @ 00a33280] concealing 1233 DC, 1233 AC, 1233 MV errors in P frame
[h264 @ 00a33280] concealing 622 DC, 622 AC, 622 MV errors in P frame
[h264 @ 00a33280] cabac decode of qscale diff failed at 7 21
[h264 @ 00a33280] error while decoding MB 7 21, bytestream 39601
[h264 @ 00a33280] concealing 519 DC, 519 AC, 519 MV errors in P frame
[h264 @ 00a33640] cabac decode of qscale diff failed at 6 10
[h264 @ 00a33640] error while decoding MB 6 10, bytestream 19291
[h264 @ 00a33640] concealing 1103 DC, 1103 AC, 1103 MV errors in P frame
[h264 @ 00a33640] concealing 1273 DC, 1273 AC, 1273 MV errors in P frame
[h264 @ 00a33640] concealing 1232 DC, 1232 AC, 1232 MV errors in P frame
[h264 @ 00a33640] concealing 1257 DC, 1257 AC, 1257 MV errors in P frame
[h264 @ 00a33640] concealing 1008 DC, 1008 AC, 1008 MV errors in P frame
[h264 @ 00a33280] concealing 164 DC, 164 AC, 164 MV errors in P frame
[h264 @ 00a40000] concealing 1159 DC, 1159 AC, 1159 MV errors in P frame
[h264 @ 00a40000] concealing 1135 DC, 1135 AC, 1135 MV errors in P frame
[h264 @ 00a40000] concealing 1092 DC, 1092 AC, 1092 MV errors in P frame
[h264 @ 00a40000] cabac decode of qscale diff failed at 0 16
[h264 @ 00a40000] error while decoding MB 0 16, bytestream 1526
[h264 @ 00a40000] concealing 791 DC, 791 AC, 791 MV errors in P frame
[h264 @ 05f86c00] cabac decode of qscale diff failed at 6 7
[h264 @ 05f86c00] error while decoding MB 6 7, bytestream 3098
[h264 @ 05f86c00] concealing 1262 DC, 1262 AC, 1262 MV errors in P frame
[h264 @ 05f86c00] concealing 1045 DC, 1045 AC, 1045 MV errors in P frame
And sometimes is starts with :
[mpegts @ 0000000000502d40] PES packet size mismatch
Last message repeated 1 times
[mpegts @ 0000000000502d40] Could not find codec parameters for stream 2 (Unknown: none ([128][0][0][0] / 0x0080)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Do i need to upgrade to the last firmware 2.01 ? i hope not, it's a disaster ^^"
Can you help with this one please ?
Thank you so much for keeping this a live.
Karam.