asapach / peerflix-server

Streaming torrent client for Node.js with web ui.
MIT License
1.31k stars 586 forks source link

Add ffmpeg into Dockerfile #123

Closed pryg-skok closed 6 years ago

pryg-skok commented 6 years ago

A naive way - just to add ffmpeg into image is works. But it has some issues with calling code.

122

The problem with function which calls ffmpeg:

    res.type('video/webm');
    var command = ffmpeg(file.createReadStream())
      .videoCodec('libvpx').audioCodec('libvorbis').format('webm')
      .audioBitrate(128)
      .videoBitrate(1024)
      .outputOptions([
        //'-threads 2',
        '-deadline realtime',
        '-error-resilient 1'
      ])

It's actually not only remuxing, but also transcoding audio and video with specified bitrates and only on single core which is likely can't be done in realtime even on high end systems without HW acceleration.

I'll open separate issue for this, and also proposes for different links for remuxed variants in #19 is pretty meaningful to implement.

asapach commented 6 years ago

That's why this feature is experimental 😄 (see explanation). Maybe something has changed over the last couple of years and we can revisit it.