Skip to content

Instantly share code, notes, and snippets.

@LinuxwitChdoCtOr
Last active September 18, 2016 04:16
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save LinuxwitChdoCtOr/3099b6e68bd5597776e33f3a56c74251 to your computer and use it in GitHub Desktop.
ffmpeg RTP broken?
Charles@linux2 10:30pm Charles >> ffmpeg -f x11grab -r 60 -video_size 1024x768 -i :0.0 -vcodec h264_nvenc -pix_fmt yuv420p -preset lossless -profile:v high -rc vbr_minqp -g 20 -gpu 0 -delay 2 -f rtp rtp://227.1.1.1:5000
ffmpeg version 3.1.3 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --extra-cflags=-I../Nvidia --disable-crystalhd --enable-gnutls --enable-decoder=aac --enable-pthreads --enable-shared --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect --enable-nvenc
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 48.101 / 57. 48.101
libavformat 57. 41.100 / 57. 41.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
[x11grab @ 0x693400] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, x11grab, from ':0.0':
Duration: N/A, start: 1474169423.714266, bitrate: N/A
Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1024x768, 60 fps, 1000k tbr, 1000k tbn, 1000k tbc
[rtp @ 0x69f340] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Output #0, rtp, to 'rtp://227.1.1.1:5000':
Metadata:
encoder : Lavf57.41.100
Stream #0:0: Video: h264 (h264_nvenc), yuv420p, 1024x768, q=-1--1, 2000 kb/s, 60 fps, 90k tbn, 60 tbc
Metadata:
encoder : Lavc57.48.101 h264_nvenc
Side data:
cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 4000000 vbv_delay: -1
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_nvenc))
SDP:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 227.1.1.1
t=0 0
a=tool:libavformat 57.41.100
m=video 5000 RTP/AVP 96
b=AS:2000
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1
Press [q] to stop, [?] for help
frame=91982 fps= 60 q=-1.0 Lsize= 951382kB time=00:25:33.01 bitrate=5083.9kbits/s speed= 1x
video:941556kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.043567%
[Charles@minilinux ~]$ ffprobe -i rtp://227.1.1.1:5000
ffprobe version 2.6.8 Copyright (c) 2007-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
[rtp @ 0x1d7dea0] Unable to receive RTP payload type 96 without an SDP file describing it
Input #0, rtp, from 'rtp://227.1.1.1:5000':
Duration: N/A, bitrate: N/A
[Charles@minilinux ~]$ ffprobe -i test.sdp
ffprobe version 2.6.8 Copyright (c) 2007-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
[h264 @ 0x15bf660] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x15bf660] decode_slice_header error
[h264 @ 0x15bf660] no frame!
[h264 @ 0x15bf660] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x15bf660] decode_slice_header error
[h264 @ 0x15bf660] no frame!
[h264 @ 0x15bf660] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x15bf660] decode_slice_header error
[h264 @ 0x15bf660] no frame!
[h264 @ 0x15bf660] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x15bf660] decode_slice_header error
[h264 @ 0x15bf660] no frame!
[h264 @ 0x15bf660] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x15bf660] decode_slice_header error
[h264 @ 0x15bf660] no frame!
[h264 @ 0x15bf660] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x15bf660] decode_slice_header error
[h264 @ 0x15bf660] no frame!
[h264 @ 0x15bf660] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x15bf660] decode_slice_header error
[h264 @ 0x15bf660] no frame!
[h264 @ 0x15bf660] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x15bf660] decode_slice_header error
[h264 @ 0x15bf660] no frame!
[h264 @ 0x15bf660] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x15bf660] decode_slice_header error
[h264 @ 0x15bf660] no frame!
[h264 @ 0x15bf660] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x15bf660] decode_slice_header error
[h264 @ 0x15bf660] no frame!
[h264 @ 0x15bf660] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x15bf660] decode_slice_header error
[h264 @ 0x15bf660] no frame!
[h264 @ 0x15bf660] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x15bf660] decode_slice_header error
[h264 @ 0x15bf660] no frame!
[h264 @ 0x15bf660] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x15bf660] decode_slice_header error
[h264 @ 0x15bf660] no frame!
[h264 @ 0x15bf660] RTP: missed 5 packets
[h264 @ 0x15bf660] corrupted macroblock 26 27 (total_coeff=-1)
[h264 @ 0x15bf660] error while decoding MB 26 27
[h264 @ 0x15bf660] Cannot use next picture in error concealment
[h264 @ 0x15bf660] concealing 1367 DC, 1367 AC, 1367 MV errors in P frame
Input #0, sdp, from 'test.sdp':
Metadata:
title : No Name
Duration: N/A, start: 0.333333, bitrate: N/A
Stream #0:0: Video: h264 (High 4:4:4 Predictive), yuv420p(tv), 1024x768 [SAR 1:1 DAR 4:3], 60 fps, 60 tbr, 90k tbn, 120 tbc
Charles@linux2 10:59pm Charles >> ffprobe -i rtp://227.1.1.1:5000
ffprobe version 3.1.3 Copyright (c) 2007-2016 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --extra-cflags=-I../Nvidia --disable-crystalhd --enable-gnutls --enable-decoder=aac --enable-pthreads --enable-shared --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect --enable-nvenc
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 48.101 / 57. 48.101
libavformat 57. 41.100 / 57. 41.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
^C
Charles@linux2 10:59pm Charles >> ffprobe -i test.sdp
ffprobe version 3.1.3 Copyright (c) 2007-2016 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --extra-cflags=-I../Nvidia --disable-crystalhd --enable-gnutls --enable-decoder=aac --enable-pthreads --enable-shared --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect --enable-nvenc
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 48.101 / 57. 48.101
libavformat 57. 41.100 / 57. 41.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
[rtp @ 0xd31120] Protocol not on whitelist 'file,crypto'!
test.sdp: Invalid data found when processing input
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 227.1.1.1
t=0 0
a=tool:libavformat 57.41.100
m=video 5000 RTP/AVP 96
b=AS:2000
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1
Centos 6.8 x86_64
Linux linux2 2.6.32-642.3.1.el6.x86_64 #1 SMP Tue Jul 12 18:30:56 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
@LinuxwitChdoCtOr
Copy link
Author

For some reason the soft-wrap is not working
Output:
ffmpeg -f x11grab -r 60 -video_size 1024x768 -i :0.0 -vcodec h264_nvenc -pix_fmt yuv420p -preset lossless -profile:v high -rc vbr_minqp -g 20 -gpu 0 -delay 2 -f rtp rtp://227.1.1.1:5000
ffmpeg version 3.1.3 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --extra-cflags=-I../Nvidia --disable-crystalhd --enable-gnutls --enable-decoder=aac --enable-pthreads --enable-shared --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect --enable-nvenc

Working
ffprobe -i test.sdp
ffprobe version 2.6.8 Copyright (c) 2007-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

Broken
ffprobe -i test.sdp
ffprobe version 3.1.3 Copyright (c) 2007-2016 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --extra-cflags=-I../Nvidia --disable-crystalhd --enable-gnutls --enable-decoder=aac --enable-pthreads --enable-shared --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment