所以我试图让一个非常简单的直播系统通过Azure媒体服务运行。我已经在带有USB摄像头的Raspberry Pi上安装了ffmpeg,并且我只是想通过Azure获得摄像头订阅源,以便开始修补媒体播放器。 FFmpeg的命令似乎顺利运行,但每当我试图预览流,我收到了以下错误:不支持的演示文稿(0x20400003)
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support. 0x20400003"
代码的0x0400003部分的文档(http://amp.azure.net/libs/amp/latest/docs/index.html#error-codes) 的含义上市该视频的演示不被支持,但我无法找到什么是错误的实际意义。
我使用的编码下面的ffmpeg命令,
ffmpeg -v verbose -framerate 30 -r 30 -i /dev/video0 -vcodec libx264 -preset ultrafast -acodec libfdk-aac -ab 48k -b:v 500k -maxrate 500k -bufsize 500k -r 30 -g 60 -keyint_min 60 -sc_threshold 0 -f flv rtmp://{Azure channel address}/channel5
导致下面的输出:
ffmpeg version N-83743-gd757ddb Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.9.2 (Raspbian 4.9.2-10)
configuration: --enable-gpl --enable-libx264 --enable-nonfree --enable-libfdk-aac
libavutil 55. 47.101/55. 47.101
libavcodec 57. 82.100/57. 82.100
libavformat 57. 66.103/57. 66.103
libavdevice 57. 3.100/57. 3.100
libavfilter 6. 74.100/6. 74.100
libswscale 4. 3.101/4. 3.101
libswresample 2. 4.100/2. 4.100
libpostproc 54. 2.100/54. 2.100
[video4linux2,v4l2 @ 0x1f7a430] fd:3 capabilities:84200001
[video4linux2,v4l2 @ 0x1f7a430] Querying the device for the current frame size
[video4linux2,v4l2 @ 0x1f7a430] Setting frame size to 640x480
[video4linux2,v4l2 @ 0x1f7a430] The driver changed the time per frame from 1/30 to 1/15
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 169752.581724, bitrate: 73728 kb/s
Stream #0:0: Video: rawvideo, 1 reference frame (YUY2/0x32595559), yuyv422, 640x480, 73728 kb/s, 15 fps, 15 tbr, 1000k tbn, 1000k tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:0 @ 0x1f89eb0] w:640 h:480 pixfmt:yuyv422 tb:1/30 fr:30/1 sar:0/1 sws_param:flags=2
[auto_scaler_0 @ 0x1f8a9c0] w:iw h:ih flags:'bicubic' interl:0
[format @ 0x1f8a040] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_null_0' and the filter 'format'
[graph 0 input from stream 0:0 @ 0x1f89eb0] TB:0.033333 FRAME_RATE:30.000000 SAMPLE_RATE:nan
[auto_scaler_0 @ 0x1f8a9c0] w:640 h:480 fmt:yuyv422 sar:0/1 -> w:640 h:480 fmt:yuv422p sar:0/1 flags:0x4
No pixel format specified, yuv422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x1f7d650] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x1f7d650] profile High 4:2:2, level 3.0, 4:2:2 8-bit
[libx264 @ 0x1f7d650] 264 - core 148 r2762 90a61ec - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=60 keyint_min=31 scenecut=0 intra_refresh=0 rc_lookahead=0 rc=cbr mbtree=0 bitrate=500 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=500 vbv_bufsize=500 nal_hrd=none filler=0 ip_ratio=1.40 aq=0
Output #0, flv, to 'rtmp://{Azure Channel Address}/channel5':
Metadata:
encoder : Lavf57.66.103
Stream #0:0: Video: h264 (libx264), 1 reference frame ([7][0][0][0]/0x0007), yuv422p, 640x480, q=-1--1, 500 kb/s, 30 fps, 1k tbn, 30 tbc
Metadata:
encoder : Lavc57.82.100 libx264
Side data:
cpb: bitrate max/min/avg: 500000/0/500000 buffer size: 500000 vbv_delay: -1
[flv @ 0x1f7c1c0] Failed to update header with correct duration.ate= 501.5kbits/s speed=0.25x
[flv @ 0x1f7c1c0] Failed to update header with correct filesize.
frame= 2155 fps=7.5 q=-1.0 Lsize= 4392kB time=00:01:11.80 bitrate= 501.1kbits/s speed=0.25x
video:4350kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.974120%
我不知道,如果头误差显著,作为程序继续按预期运行,但请让我知道这里有什么是公然的问题,或者是否有什么演示问题有意义的解释。