Consti10 / LiveVideo10ms

Real time video decoding on android
GNU Lesser General Public License v3.0
73 stars 22 forks source link

streaming examples #1

Closed marclava closed 4 years ago

marclava commented 4 years ago

How to stream a test video to the app? For example with FFmpeg? Here's what I tried (without success): ffmpeg -re -i 1_reallyShort.mp4 -an -f rtp rtp://192.168.1.22:5600

Consti10 commented 4 years ago

Hello, You can use the following gstreamer command to stream an example video to FPV_VR / VideoExampe via rtph264 on port 5600: gst-launch-1.0 -v videotestsrc ! video/x-raw,framerate=120/1,width=1280,height=720 ! videoscale ! videoconvert ! x264enc key-int-max= 1 bitrate=5000 ! video/x-h264, profile=baseline ! rtph264pay ! udpsink host=192.168.137.47 port=5600

Unfortunately I do not know what's wrong with the ffmpeg pipeline above. However, since gstreamer rtp h264 is working, I can assume it is not a problem with VideoCore.

marclava commented 4 years ago

The command you provided works.

I was also able to play a file, using this command: gst-launch-1.0 filesrc location=file.m4v ! queue ! qtdemux ! h264parse ! rtph264pay ! udpsink host=192.168.1.22 port=5600

Consti10 commented 4 years ago

Thanks for the command. If you find any other usefull pipelines, don't hesitate to share them here in this thread.