I have FFMpeg streaming video via UDP to my desktop. I ran a wireshark analysis, and the data is reaching my desktop, you can see one of the packets below. enter image description here

However, when I look for a network stream on VLC, It doesn't seem to recognize the stream. My command looks like so: udp://@[port] where is the IP address of my desktop PC, and is the address of the ffmpeg streaming client. It's a simple H264 stream with a blank audio channel, so I'm not sure why VLC doesn't pick it up. I'm using this command to stream: raspivid -o - -t 0 -vf -hf -fps 30 -b 45000000 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 60 -strict experimental -f h264 udp://[port]

Here is a breakdown of what exactly it's doing:

raspivid                 -Take video from raspberry pi camera
 -o -                    -Output to command line
  -t 0                   -Record indefinitely
    -vf -hf              -Flip the image twice
    -fps 30 -b 45000000 |-Alter the bit rate and pipe the output to the next command. 
-re                      -Simulate input device
 -ar 44100               -create an audio stream...
 -ac 2                   -with 2 channels...
 -acodec pcm_s16le       -as a signed 16 bis little endian..
 -f s16le                -force it to be so
 -i /dev/zero            -Take the audio from /dev/zero
  -f h264                -force the input to be formatted as h264 (ie from raspivid)
   -i -                  -input from the command line
    -vcodec copy         -copies the h264 codec for minimal processing power needed.
    -g 60                -make a keyframe every 60 frames
     -strict experimental-adds the audio channel
       udp://[port] -streams to my desktop PC at port

One thing that I thought could be the culprit is port binding, but checking the port binding via process hacker 2 says that VLC is listening on UDP and UDP8 for [port], shown in the screenshot below.

enter image description here

What are possible causes that VLC will not play a stream, even if the traffic is reaching the pc on the correct port AND vlc is listening on said port?

Update: VLC now recognizes the stream, but does not play anything, staying at 0:00, and not giving me the option to play. The searching for stream indicator, however, is not active.

  • 1
    got the same problem, if you found the solution, please let me know
    – CybeX
    Jan 21 '20 at 13:52
  • 1
    @Cybex sadly, I have found no solution, I ended up using UV4L and a HTTP cam stream.
    – tuskiomi
    Jan 23 '20 at 2:44
  • http cam streamer, may I ask the name?
    – CybeX
    Jan 23 '20 at 5:46
  • 1
    @Cybex It is called UV4L
    – tuskiomi
    Jan 23 '20 at 5:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.