找不到流0的编解码器参数(视频:hevc,无):未指定大小

问题描述 投票:0回答:1

我尝试使用ffmpeg在CENTOS 6.10上提供ffserver。当我在流上运行ffmpeg时,出现错误消息:找不到流0的编解码器参数(视频:h264,无):未指定大小。

完整的ffmpeg输出在这里:

[root@stone1 ~]# ffmpeg -i rtsp://user44:[email protected]:554/0 -y http://192.168.101.1:8090/feed2.ffm
ffmpeg version 2.6.8 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-16)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libdc1394 --enable-libfaac --enable-nonfree --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
  libavutil      54. 20.100 / 54. 20.100
  libavcodec     56. 26.100 / 56. 26.100
  libavformat    56. 25.101 / 56. 25.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 11.102 /  5. 11.102
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
[rtsp @ 0x8bc780] Could not find codec parameters for stream 0 (Video: hevc, none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Guessed Channel Layout for  Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://user44:[email protected]:554/0':
  Metadata:
    title           : h264.mp4
  Duration: 00:00:00.00, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: hevc, none, 90k tbr, 90k tbn, 90k tbc
    Stream #0:1: Audio: pcm_mulaw, 8000 Hz, 1 channels, s16, 64 kb/s
[buffer @ 0x91c2e0] Unable to parse option value "0x0" as image size
[buffer @ 0x91c2e0] Unable to parse option value "-1" as pixel format
[buffer @ 0x91c2e0] Unable to parse option value "0x0" as image size
[buffer @ 0x91c2e0] Error setting option video_size to value 0x0.
[graph 0 input from stream 0:0 @ 0x8a0da0] Error applying options to the filter.
Error opening filters!

我在Windows上用vlc测试了该流,它看起来工作正常。VLC stream details

关于此问题的任何提示吗?


更新

我已确认Windows和Linux ffmpeg版本仍然存在相同的问题。 4.2.2。请在下面找到附带的调试输出。

D:\Temp\ffmpeg-4.2.2-win64-static\bin>ffmpeg -loglevel debug -i rtsp://userxx:[email protected]:554/0:0 -y http://192.168.101.1:8090/feed2.ffm
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.2.1 (GCC) 20200122
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --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 --enable-libopenmpt
  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
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-i' ... matched as input url with argument 'rtsp://userxx:[email protected]:554/0:0'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option 'http://192.168.101.1:8090/feed2.ffm' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url rtsp://userxx:[email protected]:554/0:0.
Successfully parsed a group of options.
Opening an input file: rtsp://userxx:[email protected]:554/0:0.
[tcp @ 000002426835b540] No default whitelist set
[tcp @ 000002426835b540] Original list of addresses:
[tcp @ 000002426835b540] Address 192.168.101.108 port 554
[tcp @ 000002426835b540] Interleaved list of addresses:
[tcp @ 000002426835b540] Address 192.168.101.108 port 554
[tcp @ 000002426835b540] Starting connection attempt to 192.168.101.108 port 554
[tcp @ 000002426835b540] Successfully connected to 192.168.101.108 port 554
[rtsp @ 0000024268358c40] SDP:
v=0
o=StreamingServer 3331435948 1116907222000 IN IP4 192.168.101.108
s=h264.mp4
c=IN IP4 0.0.0.0
t=0 0
a=control:*
m=video 0 RTP/AVP 96
a=control:trackID=0
a=rtpmap:96 H265/90000
a=ptime:40
a=range:npt=0-0
a=fmtp:96 packetization-mode=1; sprop-parameter-sets=(null)
a=videoinfo:960*576*30*4096
m=audio 0 RTP/AVP 0
a=control:trackID=1
a=rtpmap:0 PCMU/8000
a=ptime:20


[rtsp @ 0000024268358c40] video codec set to: hevc
[rtsp @ 0000024268358c40] audio codec set to: pcm_mulaw
[rtsp @ 0000024268358c40] audio samplerate set to: 8000
[rtsp @ 0000024268358c40] audio channels set to: 1
[rtp @ 000002426835bb00] No default whitelist set
[udp @ 000002426835f600] No default whitelist set
[udp @ 000002426835f600] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 000002426835f600] end receive buffer size reported is 65536
[udp @ 000002426836f900] No default whitelist set
[udp @ 000002426836f900] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 000002426836f900] end receive buffer size reported is 65536
[rtsp @ 0000024268358c40] setting jitter buffer size to 500
[rtp @ 00000242683804c0] No default whitelist set
[udp @ 0000024268380780] No default whitelist set
[udp @ 0000024268380780] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 0000024268380780] end receive buffer size reported is 65536
[udp @ 0000024268390a80] No default whitelist set
[udp @ 0000024268390a80] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 0000024268390a80] end receive buffer size reported is 65536
[rtsp @ 0000024268358c40] setting jitter buffer size to 500
[rtsp @ 0000024268358c40] hello state=0
[rtsp @ 0000024268358c40] Could not find codec parameters for stream 0 (Video: hevc, 1 reference frame, none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://userxx:[email protected]:554/0:0':
  Metadata:
    title           : h264.mp4
  Duration: 00:00:00.00, start: 0.000000, bitrate: N/A
    Stream #0:0, 0, 1/90000: Video: hevc, 1 reference frame, none, 90k tbr, 90k tbn, 90k tbc
    Stream #0:1, 0, 1/8000: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
Successfully opened the file.
Parsing a group of options: output url http://192.168.101.1:8090/feed2.ffm.
Successfully parsed a group of options.
Opening an output file: http://192.168.101.1:8090/feed2.ffm.
[NULL @ 00000242683c85c0] Unable to find a suitable output format for 'http://192.168.101.1:8090/feed2.ffm'
http://192.168.101.1:8090/feed2.ffm: Invalid argument

VLC在同一Windows系统上可以正常工作。

对此有任何提示吗?

ffmpeg rtsp centos6
1个回答
0
投票

好,我找到了解决方案。我要做的就是添加以下选项:

-rtsp_transport tcp

整个语法如下:

ffmpeg -rtsp_transport tcp -i rtsp://userxx:[email protected]:554/0:0 -y http://192.168.101.1:8090/feed2.ffm
© www.soinside.com 2019 - 2024. All rights reserved.