3

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://@192.168.2.172:[port] where 192.168.2.172 is the IP address of my desktop PC, and 192.168.2.160 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://192.168.2.172:[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. 
ffmpeg 
-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://192.168.2.172:[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.

9
  • 1
    got the same problem, if you found the solution, please let me know
    – CybeX
    Commented Jan 21, 2020 at 13:52
  • 1
    @Cybex sadly, I have found no solution, I ended up using UV4L and a HTTP cam stream.
    – tuskiomi
    Commented Jan 23, 2020 at 2:44
  • http cam streamer, may I ask the name?
    – CybeX
    Commented Jan 23, 2020 at 5:46
  • 1
    @Cybex It is called UV4L
    – tuskiomi
    Commented Jan 23, 2020 at 5:47
  • 1
    @kyrlon I used UV4L, which comes with a web UI, not a UDP stream.
    – tuskiomi
    Commented Jul 15 at 18:49

0

You must log in to answer this question.

Browse other questions tagged .