
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (48)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)
Sur d’autres sites (7429)
-
How to get rtp(javacv ffmpeg) stream from VLC as client
15 avril 2015, par SezerttI am trying to play rtp stream from vlc player which I created using javacv. Here is the code :
FFmpegFrameGrabber frameGrabber = new FFmpegFrameGrabber("rtsp://10.6.0.147:554/ufirststream");
frameGrabber.start(); // First I take another stream
FFmpegFrameRecorder frameRecorder = new FFmpegFrameRecorder("rtp://239.31.31.69:4433", frameGrabber.getImageWidth(), frameGrabber.getImageHeight());
frameRecorder.setFormat("rtp");
frameRecorder.setPixelFormat(AV_PIX_FMT_YUV420P);
frameRecorder.setVideoCodec(AV_CODEC_ID_MPEG2VIDEO); <-- AV_CODEC_ID_H264
frameRecorder.setFrameRate(25);
frameRecorder.setVideoBitrate(1024); <--1024*1024*2
frameRecorder.start();
while (true) {
frameRecorder.record(frameGrabber.grab()); //grab from stream, stream with rtp
}If I choose my codec as AV_CODEC_ID_MPEG2VIDEO I can play the stream from VLC using rtp ://239.31.31.69:4433 with open network.
If I increase the quality using setVideoBitrate(1024*1024*2) the stream lags too much and if I decrease the quality is so bad.
I want to use AV_CODEC_ID_H264 as my codec to fasten things with better quality but i can’t play the stream from VLC getting error :
SDP required A description in SDP format is required to receive the RTP stream. Note that rtp :// URIs cannot work with dynamic RTP payload format (96).
I tried to get sdp using wireshark and then I realized rtp stream doesn’t have sdp :) so I tried to create my own sdp like this
c=IN IP4 239.31.31.69
m=video 4433 RTP/AVP 96
a=rtpmap:96 H264/90000and this
v=0
c=IN IP4 239.31.31.69
a=recvonly
t=0 0
m=video 4433 RTP/AVP 99
a=rtpmap:99 H264/90000
a=fmtp:99 packetization-mode=1;profile-level-id=42c01e;sprop-parameter sets=Z0LAHukBQHsg,aM4G4g==;but both seems to fail similar to this
> core debug: adding item `asf.sdp' ( file:///C:/Users/Sezer/Desktop/asf.sdp )
core debug: processing request item: asf.sdp, node: null, skip: 0
core debug: rebuilding array of current - root Playlist
core debug: rebuild done - 7 items, index 6
core debug: starting playback of the new playlist item
core debug: resyncing on asf.sdp
core debug: asf.sdp is at 6
core debug: creating new input thread
core debug: Creating an input for 'asf.sdp'
core debug: Creating an input for 'asf.sdp'
core debug: requesting art for asf.sdp
core debug: using timeshift granularity of 50 MiB, in path 'C:\Users\Sezer\AppData\Local\Temp'
core debug: `file:///C:/Users/Sezer/Desktop/asf.sdp' gives access `file' demux `' path `/C:/Users/Sezer/Desktop/asf.sdp'
core debug: specified demux `any'
core debug: creating demux: access='file' demux='any' location='/C:/Users/Sezer/Desktop/asf.sdp' file='C:\Users\Sezer\Desktop\asf.sdp'
core debug: looking for access_demux module matching "file": 12 candidates
core debug: looking for meta fetcher module matching "any": 1 candidates
core debug: no access_demux modules matched
core debug: creating access 'file' location='/C:/Users/Sezer/Desktop/asf.sdp', path='C:\Users\Sezer\Desktop\asf.sdp'
core debug: looking for access module matching "file": 21 candidates
filesystem debug: opening file `C:\Users\Sezer\Desktop\asf.sdp'
lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\fetcher
core debug: using access module "filesystem"
core debug: Using stream method for AStream*
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher
core debug: starting pre-buffering
core debug: received first data after 0 ms
core debug: pre-buffering done 193 bytes in 0s - 188476 KiB/s
core debug: looking for stream_filter module matching "any": 6 candidates
core debug: no stream_filter modules matched
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
core debug: looking for stream_filter module matching "record": 6 candidates
core debug: using stream_filter module "record"
core debug: creating demux: access='file' demux='any' location='/C:/Users/Sezer/Desktop/asf.sdp' file='C:\Users\Sezer\Desktop\asf.sdp'
core debug: looking for demux module matching "any": 65 candidates
live555 debug: version 2014.07.25
live555 debug: RTP subsession 'video/H264'
core debug: selecting program id=0
core debug: adding item `file.sdp' ( file:///C:/Users/Sezer/Desktop/file.sdp )
live555 debug: setup start: 0.000000 stop:0.000000
live555 debug: play start: 0.000000 stop:0.000000
core debug: using demux module "live555"
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
core debug: no meta fetcher modules matched
core debug: looking for a subtitle file in C:\Users\Sezer\Desktop\
core debug: searching art for asf.sdp
core debug: looking for art finder module matching "any": 2 candidates
core debug: looking for decoder module matching "any": 43 candidates
avcodec debug: CPU flags: 0x010053db
lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\art
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art
avcodec debug: trying to use direct rendering
avcodec debug: allowing 4 thread(s) for decoding
avcodec warning: threaded frame decoding is not compatible with DXVA2, disabled
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
core debug: meta ok for (null), need to fetch art
core debug: Creating an input for 'file.sdp'
avcodec debug: avcodec codec (H264 - MPEG-4 AVC (part 10)) started
avcodec debug: using slice thread mode with 4 threads
core debug: using decoder module "avcodec"
core debug: looking for meta fetcher module matching "any": 1 candidates
core debug: looking for packetizer module matching "any": 23 candidates
core debug: using packetizer module "packetizer_h264"
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\fetcher
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher
core debug: looking for meta reader module matching "any": 2 candidates
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\reader
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\reader
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\reader\filename.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
core debug: no meta fetcher modules matched
core debug: searching art for asf.sdp
core debug: looking for art finder module matching "any": 2 candidates
core debug: no meta reader modules matched
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
core debug: `file:///C:/Users/Sezer/Desktop/asf.sdp' successfully opened
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\art
core debug: meta ok for (null), need to fetch art
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
core debug: no art finder modules matched
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
core debug: looking for meta fetcher module matching "any": 1 candidates
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\fetcher
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
core debug: using meta fetcher module "lua"
core debug: removing module "lua"
core debug: searching art for asf.sdp
core debug: looking for art finder module matching "any": 2 candidates
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
qt4 debug: IM: Setting an input
core debug: no art finder modules matched
core debug: looking for meta fetcher module matching "any": 1 candidates
lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\art
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art
lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\fetcher
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
core debug: no meta fetcher modules matched
core debug: searching art for file.sdp
core debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\art
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
core debug: no art finder modules matched
core debug: art not found for asf.sdp
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
core debug: no art finder modules matched
core debug: looking for meta fetcher module matching "any": 1 candidates
lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\fetcher
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
core debug: using meta fetcher module "lua"
core debug: removing module "lua"
core debug: searching art for asf.sdp
core debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\art
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
core debug: no art finder modules matched
core debug: art not found for asf.sdp
core debug: looking for meta fetcher module matching "any": 1 candidates
lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\fetcher
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
core debug: using meta fetcher module "lua"
core debug: removing module "lua"
core debug: searching art for file.sdp
core debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\art
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
core debug: no art finder modules matched
core debug: art not found for file.sdpCan you lead me to the right direction ? What should I do to get fair quality and no lag using rtp ?
-
ffmpeg can't stream to remote client
4 septembre 2014, par KFLI’m building a simple
ffmpeg
command line on my laptop to stream from its camera. The command line reads (verbose output at the botton) :host1> ffmpeg -v verbose \
-f dshow \
-i video="Camera":audio="Microphone" \
-r 30 -g 0 -vcodec h264 -acodec libmp3lame \
-tune zerolatency \
-preset ultrafast \
-f mpegts udp://12.34.56.78:12345Firstly, it works locally. I.e., I can view the output by using
ffplay
on the same host :host1> ffplay -hide_banner -v udp://12.34.56.78:12345
Now what is NOT working is when I do this from another machine in the same network. It shows a
nan
progress :host2> ffplay -hide_banner -v udp://12.34.56.78:12345
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0I used
ncat
to dump the raw content. But there’s no output :host2>\ncat\ncat -v -u 12.34.56.78 12345
Ncat: Version 5.59BETA1 ( http://nmap.org/ncat )
Ncat: Connected to 12.34.56.78:12345.
(...and nothing happen...)Note that I can exclude firewall issues as I used
ncat
to communicate with each other across the wire using the same port and protocol (UDP). This works and they can chat to each other :host1> ncat -l -u -p 12345
host2> ncat -u 12.34.56.78 12345Any hint ?
I’m using Windows x64 with FFMPEG 64bit installed from here. Below is the Output of my ffmpeg command :
C:\ffmpeg\bin>ffmpeg -v verbose -f dshow -i video="Integrated Camera":audio="Microphone (Realtek High Definition Audio)" -r 30 -g 0 -vcodec h264 -acodec libmp3lame -tune zerolatency -preset ultrafast -f mpegts udp://12.34.56.78:12345
ffmpeg version N-66012-g97b8809 Copyright (c) 2000-2014 the FFmpeg developers
built on Sep 1 2014 00:21:15 with gcc 4.8.3 (GCC)
configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug -enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 3.100 / 56. 3.100
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 0.103 / 5. 0.103
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, dshow, from 'video=Integrated Camera:audio=Microphone (Realtek High Definition Audio)':
Duration: N/A, start: 171840.657000, bitrate: N/A
Stream #0:0: Video: rawvideo, bgr24, 640x480, 30 fps, 30 tbr, 10000k tbn, 30 tbc
Stream #0:1: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
Matched encoder 'libx264' for codec 'h264'.
[graph 0 input from stream 0:0 @ 0000000000470aa0] w:640 h:480 pixfmt:bgr24 tb:1/10000000 fr:10000000/333333 sar:0/1 sws_param:flags=2
[auto-inserted scaler 0 @ 0000000004326d00] w:iw h:ih flags:'0x4' interl:0
[format @ 0000000004325a00] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_null_0' and the filter 'format'
[auto-inserted scaler 0 @ 0000000004326d00] w:640 h:480 fmt:bgr24 sar:0/1 -> w:640 h:480 fmt:yuv444p sar:0/1 flags:0x4
No pixel format specified, yuv444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[graph 1 input from stream 0:1 @ 0000000000460c20] tb:1/44100 samplefmt:s16 samplerate:44100 chlayout:0x3
[audio format for output stream 0:1 @ 00000000004601a0] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'audio format for output stream 0:1'
[auto-inserted resampler 0 @ 00000000004604a0] ch:2 chl:stereo fmt:s16 r:44100Hz -> ch:2 chl:stereo fmt:s16p r:44100Hz
[libx264 @ 000000000081bb20] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 000000000081bb20] profile High 4:4:4 Intra, level 3.0, 4:4:4 8-bit
[mpegts @ 000000000081abe0] muxrate VBR, pcr every 3 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to 'udp://12.34.56.78:12345':
Metadata:
encoder : Lavf56.3.100
Stream #0:0: Video: h264 (libx264), yuv444p, 640x480, q=-1--1, 30 fps, 90k tbn, 30 tbc
Metadata:
encoder : Lavc56.1.100 libx264
Stream #0:1: Audio: mp3 (libmp3lame), 44100 Hz, stereo, s16p
Metadata:
encoder : Lavc56.1.100 libmp3lame
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (pcm_s16le (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
*** 1 dup!
frame= 241 fps= 31 q=28.0 Lsize= 3439kB time=00:00:08.03 bitrate=3506.4kbits/s dup=1 drop=0
video:3035kB audio:125kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 8.791966%
Input file #0 (video=Integrated Camera:audio=Microphone (Realtek High Definition Audio)):
Input stream #0:0 (video): 240 packets read (221184000 bytes); 240 frames decoded;
Input stream #0:1 (audio): 16 packets read (1411200 bytes); 16 frames decoded (352800 samples);
Total: 256 packets (222595200 bytes) demuxed
Output file #0 (udp://12.34.56.78:12345):
Output stream #0:0 (video): 241 frames encoded; 241 packets muxed (3108187 bytes);
Output stream #0:1 (audio): 306 frames encoded (352512 samples); 307 packets muxed (128313 bytes);
Total: 548 packets (3236500 bytes) muxed
[libx264 @ 000000000081bb20] frame I:241 Avg QP:27.97 size: 12897
[libx264 @ 000000000081bb20] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 000000000081bb20] coded y,u,v intra: 26.3% 0.5% 0.0%
[libx264 @ 000000000081bb20] i16 v,h,dc,p: 19% 28% 21% 31%
[libx264 @ 000000000081bb20] kb/s:3095.29
[dshow @ 0000000000467720] real-time buffer[Integrated Camera] too full (90% of size: 3041280)! frame dropped!
Received signal 2: terminating. (I pressed CTRL-C) -
Troubleshooting ffmpeg/ffplay client RTSP RTP UDP * multicast * issue
6 novembre 2020, par MAXdBI'm having problem with using udp_multicast transport method using ffmpeg or ffplay as a client to a webcam.


TCP transport works :


ffplay -rtsp_transport tcp rtsp://192.168.1.100/videoinput_1/mjpeg_3/media.stm



UDP transport works :


ffplay -rtsp_transport udp rtsp://192.168.1.100/videoinput_1/mjpeg_3/media.stm



Multicast transport does not work :


ffplay -rtsp_transport udp_multicast rtsp://192.168.1.100/videoinput_1/mjpeg_3/media.stm



The error message when udp_multicast is chosen reads :


[rtsp @ 0x7fd6a8000b80] Could not find codec parameters for stream 0 (Video: mjpeg, none(bt470bg/unknown/unknown)): unspecified size



Run with -v debug : Observe that the UDP multicast information appears in the SDP even though the chosen transport is unicast for this run. The SDP content is unchanged for unicast or multicast.


[tcp @ 0x7f648c002f40] Starting connection attempt to 192.168.1.100 port 554
[tcp @ 0x7f648c002f40] Successfully connected to 192.168.1.100 port 554
[rtsp @ 0x7f648c000b80] SDP:
v=0
o=- 621355968671884050 621355968671884050 IN IP4 192.168.1.100
s=/videoinput_1:0/mjpeg_3/media.stm
c=IN IP4 0.0.0.0
m=video 40004 RTP/AVP 26
c=IN IP4 237.0.0.3/1
a=control:trackID=1
a=range:npt=0-
a=framerate:25.0

Failed to parse interval end specification ''
[rtp @ 0x7f648c008e00] No default whitelist set
[udp @ 0x7f648c009900] No default whitelist set
[udp @ 0x7f648c009900] end receive buffer size reported is 425984
[udp @ 0x7f648c019c80] No default whitelist set
[udp @ 0x7f648c019c80] end receive buffer size reported is 425984
[rtsp @ 0x7f648c000b80] setting jitter buffer size to 500
[rtsp @ 0x7f648c000b80] hello state=0
Failed to parse interval end specification ''
[mjpeg @ 0x7f648c0046c0] marker=d8 avail_size_in_buf=145103 
[mjpeg @ 0x7f648c0046c0] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x7f648c0046c0] marker=e0 avail_size_in_buf=145101
[mjpeg @ 0x7f648c0046c0] marker parser used 16 bytes (128 bits)
[mjpeg @ 0x7f648c0046c0] marker=db avail_size_in_buf=145083
[mjpeg @ 0x7f648c0046c0] index=0
[mjpeg @ 0x7f648c0046c0] qscale[0]: 5
[mjpeg @ 0x7f648c0046c0] index=1
[mjpeg @ 0x7f648c0046c0] qscale[1]: 10
[mjpeg @ 0x7f648c0046c0] marker parser used 132 bytes (1056 bits)
[mjpeg @ 0x7f648c0046c0] marker=c4 avail_size_in_buf=144949
[mjpeg @ 0x7f648c0046c0] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x7f648c0046c0] marker=c0 avail_size_in_buf=144529
[mjpeg @ 0x7f648c0046c0] Changing bps from 0 to 8
[mjpeg @ 0x7f648c0046c0] sof0: picture: 1920x1080
[mjpeg @ 0x7f648c0046c0] component 0 2:2 id: 0 quant:0
[mjpeg @ 0x7f648c0046c0] component 1 1:1 id: 1 quant:1
[mjpeg @ 0x7f648c0046c0] component 2 1:1 id: 2 quant:1
[mjpeg @ 0x7f648c0046c0] pix fmt id 22111100
[mjpeg @ 0x7f648c0046c0] Format yuvj420p chosen by get_format().
[mjpeg @ 0x7f648c0046c0] marker parser used 17 bytes (136 bits)
[mjpeg @ 0x7f648c0046c0] escaping removed 676 bytes
[mjpeg @ 0x7f648c0046c0] marker=da avail_size_in_buf=144510
[mjpeg @ 0x7f648c0046c0] marker parser used 143834 bytes (1150672 bits)
[mjpeg @ 0x7f648c0046c0] marker=d9 avail_size_in_buf=2
[mjpeg @ 0x7f648c0046c0] decode frame unused 2 bytes
[rtsp @ 0x7f648c000b80] All info found vq= 0KB sq= 0B f=0/0
[rtsp @ 0x7f648c000b80] rfps: 24.416667 0.018101
 Last message repeated 1 times
[rtsp @ 0x7f648c000b80] rfps: 24.500000 0.013298
 Last message repeated 1 times
[rtsp @ 0x7f648c000b80] rfps: 24.583333 0.009235
 Last message repeated 1 times
[rtsp @ 0x7f648c000b80] rfps: 24.666667 0.005910
 Last message repeated 1 times
[rtsp @ 0x7f648c000b80] rfps: 24.750000 0.003324
 Last message repeated 1 times
[rtsp @ 0x7f648c000b80] rfps: 24.833333 0.001477
 Last message repeated 1 times
[rtsp @ 0x7f648c000b80] rfps: 24.916667 0.000369
 Last message repeated 1 times
[rtsp @ 0x7f648c000b80] rfps: 25.000000 0.000000
[rtsp @ 0x7f648c000b80] rfps: 25.083333 0.000370
 Last message repeated 1 times
[rtsp @ 0x7f648c000b80] rfps: 25.166667 0.001478
 Last message repeated 1 times
[rtsp @ 0x7f648c000b80] rfps: 25.250000 0.003326
 Last message repeated 1 times
[rtsp @ 0x7f648c000b80] rfps: 25.333333 0.005912
 Last message repeated 1 times
[rtsp @ 0x7f648c000b80] rfps: 25.416667 0.009238
 Last message repeated 1 times
[rtsp @ 0x7f648c000b80] rfps: 25.500000 0.013302
 Last message repeated 1 times
[rtsp @ 0x7f648c000b80] rfps: 25.583333 0.018105
 Last message repeated 1 times
[rtsp @ 0x7f648c000b80] rfps: 50.000000 0.000000
[rtsp @ 0x7f648c000b80] Setting avg frame rate based on r frame rate
Input #0, rtsp, from 'rtsp://192.168.1.100/videoinput_1/mjpeg_3/media.stm':
 Metadata:
 title : /videoinput_1:0/mjpeg_3/media.stm
 Duration: N/A, start: 0.000000, bitrate: N/A
 Stream #0:0, 21, 1/90000: Video: mjpeg (Baseline), 1 reference frame, yuvj420p(pc, bt470bg/unknown/unknown, center), 1920x1080 [SAR 1:1 DAR 16:9], 0/1, 25 fps, 25 tbr, 90k tbn, 90k tbc
[mjpeg @ 0x7f648c02ad80] marker=d8 avail_size_in_buf=145103



Here is the same debug section when using udp_multicast. The SDP is identical as mentioned, and the block after the SDP containing [mjpeg] codec info is entirely missing (beginning with marker=d8)—the stream is never identified. This happens (to the eye) instantaneously, there's no indication of a timeout waiting unsuccessfully for an RTP packet, though this, too, could just be insufficient debug info in the driver. Also note that ffmpeg knows that the frames are MJPEG frames and the color primaries are PAL, it just doesn't know the size. Also curious, but not relevant to the problem, the unicast UDP transport destination port utilized for the stream does not appear in the ffmpeg debug dump shown above, meaning part of the RTSP/RTP driver is hiding important information under the kimono, that port number and how it knows that the frames will be MJPEG.


[tcp @ 0x7effe0002f40] Starting connection attempt to 192.168.1.100 port 554
[tcp @ 0x7effe0002f40] Successfully connected to 192.168.1.100 port 554
[rtsp @ 0x7effe0000b80] SDP:aq= 0KB vq= 0KB sq= 0B f=0/0
v=0
o=- 621355968671884050 621355968671884050 IN IP4 192.168.1.100
s=/videoinput_1:0/mjpeg_3/media.stm
c=IN IP4 0.0.0.0
m=video 40004 RTP/AVP 26
c=IN IP4 237.0.0.3/1
a=control:trackID=1
a=range:npt=0-
a=framerate:25.0

Failed to parse interval end specification ''
[rtp @ 0x7effe0008e00] No default whitelist set
[udp @ 0x7effe0009900] No default whitelist set
[udp @ 0x7effe0009900] end receive buffer size reported is 425984
[udp @ 0x7effe0019c40] No default whitelist set
[udp @ 0x7effe0019c40] end receive buffer size reported is 425984
[rtsp @ 0x7effe0000b80] setting jitter buffer size to 500
[rtsp @ 0x7effe0000b80] hello state=0
Failed to parse interval end specification '' 
[rtsp @ 0x7effe0000b80] Could not find codec parameters for stream 0 (Video: mjpeg, 1 reference frame, none(bt470bg/unknown/unknown, center)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, rtsp, from 'rtsp://192.168.1.100/videoinput_1/mjpeg_3/media.stm':
 Metadata:
 title : /videoinput_1:0/mjpeg_3/media.stm
 Duration: N/A, start: 0.000000, bitrate: N/A
 Stream #0:0, 0, 1/90000: Video: mjpeg, 1 reference frame, none(bt470bg/unknown/unknown, center), 90k tbr, 90k tbn, 90k tbc
 nan M-V: nan fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0



This is the TCPDUMP of the traffic. The information in both streams appears identical.


19:21:30.703599 IP 192.168.1.100.64271 > 192.168.1.98.5239: UDP, length 60
19:21:30.703734 IP 192.168.1.100.64270 > 192.168.1.98.5238: UDP, length 1400
19:21:30.703852 IP 192.168.1.100.64270 > 192.168.1.98.5238: UDP, length 1400
19:21:30.704326 IP 192.168.1.100.64270 > 192.168.1.98.5238: UDP, length 1400
19:21:30.704326 IP 192.168.1.100.64270 > 192.168.1.98.5238: UDP, length 1400
19:21:30.704327 IP 192.168.1.100.64270 > 192.168.1.98.5238: UDP, length 1400
19:21:30.704327 IP 192.168.1.100.64270 > 192.168.1.98.5238: UDP, length 1400
19:21:30.704504 IP 192.168.1.100.64270 > 192.168.1.98.5238: UDP, length 1400
19:21:30.704813 IP 192.168.1.100.64270 > 192.168.1.98.5238: UDP, length 1400
19:21:30.704814 IP 192.168.1.100.64270 > 192.168.1.98.5238: UDP, length 1400
19:21:30.704872 IP 192.168.1.100.64270 > 192.168.1.98.5238: UDP, length 732
19:21:30.704873 IP 192.168.1.100.59869 > 237.0.0.3.40005: UDP, length 60
19:21:30.705513 IP 192.168.1.100.59868 > 237.0.0.3.40004: UDP, length 1400
19:21:30.705513 IP 192.168.1.100.59868 > 237.0.0.3.40004: UDP, length 1400
19:21:30.705513 IP 192.168.1.100.59868 > 237.0.0.3.40004: UDP, length 1400
19:21:30.705513 IP 192.168.1.100.59868 > 237.0.0.3.40004: UDP, length 1400
19:21:30.705594 IP 192.168.1.100.59868 > 237.0.0.3.40004: UDP, length 1400
19:21:30.705774 IP 192.168.1.100.59868 > 237.0.0.3.40004: UDP, length 1400
19:21:30.706236 IP 192.168.1.100.59868 > 237.0.0.3.40004: UDP, length 1400
19:21:30.706236 IP 192.168.1.100.59868 > 237.0.0.3.40004: UDP, length 1400
19:21:30.706236 IP 192.168.1.100.59868 > 237.0.0.3.40004: UDP, length 1400
19:21:30.706236 IP 192.168.1.100.59868 > 237.0.0.3.40004: UDP, length 732



I hope this is a configuration problem, that I can fix this in my ffplay/ffmpeg line, and it's not a bug in ffmpeg. Thanks for any tips.