我正在尝试YPC99使用 WiFi 连接从Linux PC 上的内窥镜摄像头流式传输视频。从我目前发现的情况来看,摄像机使用的是 IP 192.168.1.1。它支持RTSP7070 端口(唯一一个开放的端口)上的协议。该DESCRIBE报告说,流应该是JPEG视频(RTP/AVP 26)
DESCRIBE rtsp://192.168.1.1:7070/webcam RTSP/1.0
CSec: 2
RTSP/1.0 200 OK
Content-Base: rtsp://192.168.1.1:7070/webcam/
Content-Type: application/sdp
Content-Length: 122
v=0
o=- 1 1 IN IP4 127.0.0.1
s=Test
a=type:broadcast
t=0 0
c=IN IP4 0.0.0.0
m=video 0 RTP/AVP 26
a=control:track0
VLC正在显示黑屏。ffmpeg也无法检测到要使用的正确编解码器:
$ ffmpeg -i rtsp://192.168.1.1:7070/webcam -vcodec copy /tmp/abc.mp4
ffmpeg version n4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.3.0 (Arch Linux 9.3.0-1)
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
[mjpeg @ 0x55ef344d0900] dqt: 0 quant value
Last message repeated 58 times
[rtsp @ 0x55ef344ccfc0] decoding for stream 0 failed
[rtsp @ 0x55ef344ccfc0] Could not find codec parameters for stream 0 (Video: mjpeg, none(bt470bg/unknown/unknown)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, rtsp, from 'rtsp://192.168.1.1:7070/webcam':
Metadata:
title : Test
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: mjpeg, none(bt470bg/unknown/unknown), 90k tbr, 90k tbn, 90k tbc
[mp4 @ 0x55ef344fcc40] dimensions not set
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Last message repeated 1 times
我有wireshark几秒钟的流转储(当我试图用 VLC 播放它时)。从我读过的内容来看,每一帧都FFD8应该以FFD9. 没有单个包包含FFD8但有很多包含FFD9,所以我无法找出帧的开头,看看那里的某些标题是否可以帮助我。
有andorid和iPhone应用来观看来自摄像机的流。该应用程序名为YCamera。我已经下载了andorid应用程序(https://apkpure.com/ycamera/cn.com.buildwin.YCamera)并反编译了它。在资源目录中有以下库:
- libijkffmpeg.so
- libijkplayer.so
- libijksdl.so
似乎libijkffmpeg.so是处理流的一个(字符串bt470bg仅在其中找到)。根据我的研究(对于这个,我不确定我是否在寻找我应该找的地方)它是ijkplayer玩家的一部分,应该基于ffmpeg但奇怪的ffmpeg是无法识别流。
我知道我的问题太开放了,但有什么建议可以让我继续进步吗?
最终目标是能够公开此流。为此目的,最好是ffmpeg或vlc能够识别流。
