Como posso forçar uma nova sessão no FFmpeg ao conectar-me a um fluxo de entrada RTSP? Eu não vejo uma maneira de passar informações de cabeçalho. Aqui está o comando e a saída para o problema.
Comando:
$ ffmpeg -y -hide_banner -loglevel debug -stimeout 10000000 -rtsp_transport tcp \
-i rtsp://username:[email protected]:554/live/477799A3-88A9-45AA-95EC-4CBE3CA1FBA7 \
-vframes 1 -f null /dev/null
Saída:
Splitting the commandline.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-hide_banner' ... matched as option 'hide_banner' (do not show program banner) with argument '1'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-stimeout' ... matched as AVOption 'stimeout' with argument '10000000'.
Reading option '-rtsp_transport' ... matched as AVOption 'rtsp_transport' with argument 'tcp'.
Reading option '-i' ... matched as input url with argument 'rtsp://username:[email protected]:554/live/477799A3-88A9-45AA-95EC-4CBE3CA1FBA7'.
Reading option '-vframes' ... matched as option 'vframes' (set the number of video frames to output) with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'null'.
Reading option '/dev/null' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Applying option hide_banner (do not show program banner) with argument 1.
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url rtsp://username:[email protected]:554/live/477799A3-88A9-45AA-95EC-4CBE3CA1FBA7.
Successfully parsed a group of options.
Opening an input file: rtsp://username:[email protected]:554/live/477799A3-88A9-45AA-95EC-4CBE3CA1FBA7.
[tcp @ 0x55cd6cca1100] No default whitelist set
[rtsp @ 0x55cd6cc9efa0] SDP:
v=0
o=- 1528388529036236 1 IN IP4 192.168.50.1
s=libttrtspserver
c=IN IP4 0.0.0.0
t=0 0
a=tool:libttrtspserver 1.0.0
a=range:npt=now-
m=video 0 RTP/AVP 96
a=framerate:1.000000
a=rtpmap:96 H264/90000
a=control:streamid=0
a=fmtp:96 packetization-mode=1;
[rtsp @ 0x55cd6cc9efa0] video codec set to: h264
[rtsp @ 0x55cd6cc9efa0] RTP Packetization Mode: 1
[rtsp @ 0x55cd6cc9efa0] setting jitter buffer size to 0
[rtsp @ 0x55cd6cc9efa0] hello state=0
[rtsp @ 0x55cd6cc9efa0] method PLAY failed: 454 Session Not Found
[rtsp @ 0x55cd6cc9efa0] CSeq: 5
Date: Thu, Jun 07 2018 16:22:25 GMT
Informações da versão do FFmpeg:
$ ffmpeg -v
ffmpeg version 3.4.2-1~16.04.york0.2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609
Tags ffmpeg