我想获得有关直播的一些信息。
我用
ffprobe -i rtmp://****.
(ffmpeg -i http://****
)也无法立即获取信息。
对于某些直播,我可以立即获得一些信息。 像这样:
Input #0, flv, from 'http://hdl.9158.com/live/2f6c6ce0162f6af2cccadf289dfa9674.flv':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Subtitle: text
Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp
Stream #0:2: Video: h264 (Main), yuv420p(progressive), 540x960, 20 fps, 20 tbr, 1k tbn
但 有时我会在2分钟后获得信息,虽然现场直播没有问题。
我该如何解决这个问题。
使用
ffprobe -analyzeduration 500k -probesize 100k -i rtmp://***
可以解决问题。 但后来我运行命令合并我之前检查过的实时流。
ffmpeg -analyzeduration 500k -i http://flv80f29ef7.live.126.net/live/8c79ace747b24694a8d6563c9e626509.flv -analyzeduration 500k -i http://flv80f29ef7.live.126.net/live/8c79ace747b24694a8d6563c9e626509.flv -analyzeduration 500k -i http://flv80f29ef7.live.126.net/live/8c79ace747b24694a8d6563c9e626509.flv -analyzeduration 500k -i http://flv80f29ef7.live.126.net/live/8c79ace747b24694a8d6563c9e626509.flv -filter_complex "nullsrc=size=640x480 [base]; [0:v] setpts=PTS-STARTPTS, scale=320x240 [upperleft]; [1:v] setpts=PTS-STARTPTS, scale=320x240 [upperright]; [2:v] setpts=PTS-STARTPTS, scale=320x240 [lowerleft]; [base][upperleft] overlay=shortest=1 [tmp1];[tmp1][upperright] overlay=shortest=1:x=320 [tmp2]; [tmp2][lowerleft] overlay=shortest=1:y=240 " -f flv rtmp://127.0.0.1:1935/live
调用错误:
Stream specifier ':v' in filtergraph description nullsrc=size=640x480 [base];[0:v] setpts=PTS-STARTPTS, scale=320x240 [upperleft];[1:v] setpts=PTS-STARTPTS, scale=320x240 [upperright];[2:v] setpts=PTS-STARTPTS, scale=320x240 [lowerleft];[3:v] setpts=PTS-STARTPTS, scale=320x240 [lowerright];[base][upperleft] overlay=shortest=1 [tmp1];[tmp1][upperright] overlay=shortest=1:x=320 [tmp2];[tmp2][lowerleft] overlay=shortest=1:y=240 [tmp3];[tmp3][lowerright] overlay=shortest=1:x=320:y=240 matches no streams.