指定视频编解码器试一下:
Code:
ffmpeg -f lavfi -i anullsrc -rtsp_transport udp -i rtsp://192.168.1.3:554/onvif1 -tune zerolatency -vcodec libx264 -t 12:00:00 -pix_fmt + -c:v copy -c:a aac -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/stream name
[rtsp @ 0x555becd719a0] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Guessed Channel Layout for Input Stream #1.1 : mono
Input #1, rtsp, from 'rtsp://192.168.0.3:554/onvif1':
Metadata:
title : H.264 Video, RtspServer_0.0.0.2
Duration: N/A, start: 0.000000, bitrate: 64 kb/s
Stream #1:0: Video: h264, none, 90k tbr, 90k tbn, 180k tbc
Stream #1:1: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s
Codec AVOption tune (Tune the encoding to a specific scenario) specified for output file #0 (rtmp://127.0.0.1:1935/hls/play2) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.