I am streaming a camera what is connected to DVR to youtube. With video everything is fine, but there is something not ok with audio. There is some audio stream, because if it wasn't then youtobe refused my video stream.
I am using these code:
ffmpeg -f lavfi -i anullsrc -rtsp_transport tcp -i "rtsp://user:pass@MYIPADRESS:554/cam/realmonitor?channel=1&subtype=0" -tune zerolatency -vcodec libx264 -pix_fmt + -c:v copy -c:a aac -strict experimental -f flv rtmp://a.rtmp.youtube*****/live2/****-****-youtube code-****-****
I found this code by searching web, but have no idea how to modify it to get correct audio.
If I take rtsp stream by vlc ("rtsp://user:pass@MYIPADRESS:554/cam/realmonitor?channel=1&subtype=0") it plays audio as well.
On DVR I have options to chose these audio formats: PCM, G711a, G711u. At this moment PCM is activated.