Giter Club home page Giter Club logo

Comments (2)

yomguy avatar yomguy commented on May 25, 2024

Hi Grégoire,

It's true, I've failed to provide a good doc for that. Before I get it in the repo, here is my thoughts and methodologies.

For real time task like live encoding from audio and video sources, I use the GStreamer framework rather than ffmpeg. I use ffmpeg a lot, it's a great tool but really better for post-process and non realtime processes. Even I've invested money some years ago to include the JACK plugin in it, thinking I could use it for live process, I've never manage to get audio and video synchronized and stable enough.

So here is how I start a GStreamer 0.10 pipe taking the webcam with the V4L driver and the audio from the JACK server:

gst-launch v4l2src device=/dev/video0 ! video/x-raw-rgb, width=864, height=480, framerate={30/1}  \
        ! queue ! ffmpegcolorspace \
        ! queue ! vp8enc speed=2 threads=4 quality=10.0 max-latency=25 max-keyframe-distance=30 auto-alt-ref-frames=true ! queue ! muxout. \
        jackaudiosrc connect=2 ! audio/x-raw-float, channels=2 \
        ! queue ! audioconvert ! queue ! vorbisenc quality=0.4 ! queue ! muxout.  \
        webmmux streamable=true name=muxout \
        ! tcpserversink host=127.0.0.1 port=9000 protocol=none blocksize=65536 sync-method=1

Note you'll need to adjust some object names for use with GStreamer 1.x.

At this point, the webm stream is available on the port 9000 of the localhost. You can browse it with Chromium/Chrome at http://localhost:9000

To scale the stream of the net, I use stream-m on a server:
https://github.com/yomguy/stream-m

with at least this minimal configuration:

server.port=8080

streams.monitor=true
streams.monitor.password=xxxxxxxx
streams.monitor.limit=100

Then, finally use the deefuzzer in relay mode to relay the local stream to the server.
Just adjust those parameters in the YAML config file:

deefuzzer:
  log: /var/log/telecaster/telecaster_webm_monitor.log
  m3u: /var/www/m3u/telecaster_webm_monitor.m3u
  station:
    control: {mode: 0, port: 16002}
    infos: {description: TeleCaster WebM monitor stream, genre: Vocal, name: monitor, short_name: monitor,
      url: 'http://parisson.com.com'}
    jingles: {dir: /path/to/jingles, mode: '0', shuffle: '0'}
    media: {bitrate: '512', dir: /usr/local/share/telecaster/media/webm, format: webm, ogg_quality: '4',
      samplerate: '48000', shuffle: '0', voices: '2'}
    record: {dir: /home/telecaster/trash/webm, mode: 1}
    relay: {author: TeleCaster, mode: '1', url: 'http://127.0.0.1:9000/'}
    rss: {dir: /var/www/rss, enclosure: '0', media_url: 'http://localhost/rss/'}
    server: {host: 127.0.0.1, port: '8080', public: '0', sourcepassword: xxxxxxxx,
      type: stream-m, mountpoint: monitor}
    twitter: {key: 76728330-OjKgbHtn4II86Ad7pNUGEzfNAkGTW5Wvw38qUmLE, mode: '0', secret: 4egZs1dSM37XVY8zXa016Yueku2fleXF2bx8k25V4,
      tags: bla bla}

Adjust the passwords, the hosts, etc to you needs.
Note that stream-m need explicit names for each mountpoints (here "monitor").

Et voilà !
Cheers,
G

from deefuzzer.

yomguy avatar yomguy commented on May 25, 2024

https://github.com/yomguy/DeeFuzzer/wiki/HowtoStreamVideo

from deefuzzer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.