Хочу
rtsp + aac ==> rtmp + image every 5 sec (упростил до минимума)
aac добавляю потому что 1) Хочу 2) Без звука rtmp не заводится вообще
Проблемка в том, что если картинка пишется раз в 5 минут, то rtmp не проигрывается
ffplay пишет ошибку (после задумывания около минуты) при проигрывании rtmp, но после этого все равно начинает играть
Could not find codec parameters for stream 0 (Audio: aac, 44100 Hz, stereo, 127 kb/s): unspecified sample format
Если картинка пишется 1 раз в сек - то нормально
Так не работает
ffmpeg -i rtsp:// -i sample.aac -c:v copy -c:a copy -f flv rtmp:// -vf select='eq(pict_type,I)',fps=1/300' -update 1 -f image2 \tmp\key.jpg
Так работает
ffmpeg -i rtsp:// -i sample.aac -c:v copy -c:a copy -f flv rtmp:// -vf select='eq(pict_type,I)',fps=1' -update 1 -f image2 \tmp\key.jpg
Точнее работает и так и так, но в первом варианте - с большой задумкой - висит около минуты, потом играет, но потом снова задумывается
изгуглился уже весь, гении помогите
Input #0, rtsp, from 'rtsp://x.x.x.x:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif':
Metadata:
title : RTSP Session/2.0
Duration: N/A, start: 0.730000, bitrate: N/A
Stream #0:0: Video: h264 (Baseline), yuv420p(progressive), 1280x720, 10 fps, 100 tbr, 90k tbn, start 0.730000
Stream #0:1: Data: none
[aac @ 000001cdfe470340] Estimating duration from bitrate, this may be inaccurate
Input #1, aac, from 'sample.aac':
Duration: 00:04:14.81, bitrate: 127 kb/s
Stream #1:0: Audio: aac (LC), 44100 Hz, stereo, fltp, 127 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #1:0 -> #0:1 (copy)
Stream #0:0 -> #1:0 (h264 (native) -> mjpeg (native))
Output #0, flv, to 'rtmp://x.x.x.x/live':
Metadata:
title : RTSP Session/2.0
encoder : Lavf62.3.100
Stream #0:0: Video: h264 (Baseline) ([7][0][0][0] / 0x0007), yuv420p(progressive), 1280x720, q=2-31, 10 fps, 100 tbr, 1k tbn
Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 44100 Hz, stereo, fltp, 127 kb/s
Press [q] to stop, [?] for help
[aist#1:0/aac @ 000002674d0f0dc0] Resumed reading at pts 0.000 with rate 1.050 after a lag of 0.500s
[vist#0:0/h264 @ 000002674ceeed80] Resumed reading at pts 2.080 with rate 1.050 after a lag of 0.500s
[vost#0:0/copy @ 000002674ceb9b00] Non-monotonic DTS; previous: 9200, current: 9150; changing to 9200. This may result in incorrect timestamps in the output file.
[vost#0:0/copy @ 000002674ceb9b00] Non-monotonic DTS; previous: 49210, current: 49160; changing to 49210. This may result in incorrect timestamps in the output file.
[vist#0:0/h264 @ 000002674ceeed80] Resumed reading at pts 80.000 with rate 1.050 after a lag of 1.012s
[vost#0:0/copy @ 000002674ceb9b00] Non-monotonic DTS; previous: 94210, current: 94150; changing to 94210. This may result in incorrect timestamps in the output file.
[mjpeg @ 000002674ce3dcc0] bitrate tolerance 4000000 too small for bitrate 200000, overriding
ТУТ пауза где то 2 минуты
Output #1, image2, to '\tmp\key.jpg':
Metadata:
title : RTSP Session/2.0
encoder : Lavf62.3.100
Stream #1:0: Video: mjpeg, yuv420p(pc, progressive), 1280x720, q=2-31, 200 kb/s, 0.0033 fps, 0.0033 tbn
Metadata:
encoder : Lavc62.11.100 mjpeg
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A

