phoboslab / jsmpeg

MPEG1 Video Decoder in JavaScript
MIT License
6.3k stars 1.43k forks source link

How to stream with gstreamer to jsmpeg #384

Closed me-amit closed 2 years ago

me-amit commented 2 years ago

Hi As mention in documention we can stream with ffmpeg and gstremer. Can we add similar example of gstremer as well I already posted a question here https://stackoverflow.com/questions/69794587/jsmpeg-camera-stream-with-gstremer

Inshort need same command with gstreamer. and we can add in documentation also.

ffmpeg \
    -f v4l2 \
        -framerate 25 -video_size 640x480 -i /dev/video0 \
    -f mpegts \
        -codec:v mpeg1video -s 640x480 -b:v 1000k -bf 0 \
    http://localhost:8081/supersecret 

Thanks

me-amit commented 2 years ago

We can consider adding in documention

GST_DEBUG=3 gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! video/x-raw,framerate=30/1 ! avenc_mpeg1video ! mpegtsmux ! curlhttpsink location=http://127.0.0.1:8081/supersecret

dumblob commented 2 years ago

I think gstreamer in the doc/readme would be a valuable addition because it provides observably lower latency than ffmpeg.

Thoughts @phoboslab ?