![]() ![]() The video encoding parameters "transmitter / encoder side" is more significant for determining the end to end latency.Īdding the argument -tune zerolatency reduces the encoder latency to minimum, but the required bandwidth is much higher (and probably not relevant for streaming over the internet). ![]() The above flags are relevant for the video decoder side (receiver side). My following answer demonstrates that the relevant FFmpeg flags are -probesize 32 and -flags low_delay. I did some research about reducing the video latency. Raw_frame = np.empty((HEIGHT, WIDTH, 3), np.uint8)įrame_bytes = memoryview(raw_frame).cast("B")įrame = raw_frame.reshape((HEIGHT, WIDTH, 3)) Implementation with suggestion(s) from Answers: import subprocessįFMPEG_CMD = "ffmpeg -nostdin -flags low_delay -rtsp_transport tcp -i -pix_fmt bgr24 -an -vcodec rawvideo -f rawvideo -".split(" ") Raw_frame = (WIDTH*HEIGHT*3)įrame = np.frombuffer(raw_frame, np.uint8)įrame = frame.reshape((HEIGHT, WIDTH, 3))įfmpeg command I am now using for -pix_fmt bgr24 -an -vcodec rawvideo -f rawvideo. Process = subprocess.Popen(FFMPEG_CMD, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) ![]() My current implmentation: FFMPEG_CMD = "ffmpeg -nostdin -rtsp_transport tcp -i -pix_fmt bgr24 -an -vcodec rawvideo -f rawvideo -".split(" ") I have made references from: How to dump raw RTSP stream to file?, Open CV RTSP camera buffer lag, How to pipe output from ffmpeg using python?, bad ffmpeg performace compared to ffplay and VLC, How to minimize the delay in a live streaming with ffmpeg I would like to know what other parameters I can use with my ffmpeg command to get an equivalent (or better) result compared to the ffplay command. Or when I play it via VLC Media > Open Network Stream with :network_caching=300ms. However, I would like to get the same latency as when I see it via ffplay: ffplay -fflags nobuffer -flags low_delay -tune zerolatency -framedrop -rtsp_transport tcp I am currently using this command to get frames from my RTSP stream and reading frames from stdout: ffmpeg -nostdin -rtsp_transport tcp -i -pix_fmt bgr24 -an -vcodec rawvideo -f rawvideo. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |