I have been trying to stream local video on VLC using the FFmpeg library like this:
$ ffmpeg -i sample.mp4 -v 0 -vcodec mpeg4 -f mpegts udp://127.0.0.1:23000
I have not been able to stream the file on VLC.
I have been trying to stream local video on VLC using the FFmpeg library like this:
$ ffmpeg -i sample.mp4 -v 0 -vcodec mpeg4 -f mpegts udp://127.0.0.1:23000
I have not been able to stream the file on VLC.
My guess is that you are trying to play in VLC using the URL udp://127.0.0.1:23000
as you have it in the FFmpeg command.
In VLC, try using udp://@:23000
instead.
In the first terminal:
$ ffmpeg -i sample.mp4 -v 0 -vcodec mpeg4 -f mpegts udp://127.0.0.1:23000
Open a second terminal and use:
$ ffplay udp://127.0.0.1:23000
My guess is that you are trying to play in VLC using the URL udp://127.0.0.1:23000
as you have it in the FFmpeg command.
In VLC, try using udp://@:23000
instead.
It works, but it's ugly on VLC.
On MacOS Catalina with:
ffmpeg -f avfoundation -framerate 30 -i "0" -f mpeg1video -b 200k -r 30 -vf scale=640:360 udp://127.0.0.1:5555
and it works well with:
ffplay -fflags nobuffer -flags low_delay -framedrop -strict experimental udp://127.0.0.1:5555
Along with @Omy's answer be sure to add -re
before the input to ensure realtime (normal) livestreaming than sending too many UDP payloads at once. For instance,
ffmpeg -re -i sample.mp4 -v 0 -vcodec mpeg4 -f mpegts udp://127.0.0.1:23000
© 2022 - 2024 — McMap. All rights reserved.