Newest 'ffmpeg' Questions - Stack Overflow

http://stackoverflow.com/questions/tagged/ffmpeg

Les articles publiés sur le site

  • NodeJS - piping multiple FFMPEG processes

    8 février 2017, par Alaska

    I am trying to programm an converter which can take any video source and convert it to mp3. The mp3 should be saved on my hard drive, or in an buffer to send it via telegram.

    It works good so far, the only problem I am facing is that it can only take one video at a time, and I don't know why.

    // IMPORTS
    var fs = require('fs');
    var https = require('https');
    var child_process = require('child_process');
    
    // EVENTEMITER (Not used so far)
    var util = require('util');
    var EventEmitter = require('events').EventEmitter;
    
    
    // STREAMHANDLER
    var StreamHandler = function(url, name){
    
        // VARIABLES
        self = this;
        this.url = url;
        this.name = name;
    
        // CREATE FFMPEG PROCESS
        var spawn = child_process.spawn;
        var args = ['-i', 'pipe:0', '-f', 'mp3', '-ac', '2', '-ab', '128k', '-acodec', 'libmp3lame', 'pipe:1'];
        this.ffmpeg = spawn('ffmpeg', args);
    
        // GRAB STREAM
        https.get(url, function(res) {
            res.pipe(self.ffmpeg.stdin);
        });
    
        // WRITE TO FILE
        this.ffmpeg.stdout.pipe(fs.createWriteStream(name));
    
        //DEBUG
        this.ffmpeg.stdout.on("data", function (data) {
           console.error(self.name);
        });
    }
    
    util.inherits(StreamHandler, EventEmitter);
    
    
    // TESTING
    var test1 = new StreamHandler(vidUrl, "test1.mp3");
    test1.ffmpeg.on("exit", function (code, name, signal) {
        console.log("Finished: " + test1.name);
    });
    
    var test2 = new StreamHandler(vidUrl, "test2.mp3");
    test2.ffmpeg.on("exit", function (code, name, signal) {
        console.log("Finished: " + test2.name);
    });
    

    It skips test1.mp3 and only converts test2.mp3, but 2 ffmpeg processes were created: enter image description here

    After test2.mp3 is converted the other ffmpeg thread stays open, but does nothing, and the node program gets stuck waiting (i guess so) for it to send something.

    I hope someone can help me :)

  • play MPD file of mpeg-dash on android and IOS

    8 février 2017, par user3223551

    I have used ffmpeg to create a MPD file for my video, and I could play and watch it on my pc using :http://dashplayer.azurewebsites.net/

    now I want to make sure it works and plays appropriately on andoid and IOS, could anyone tell me how to test this file on android and IOS?

  • Is there any way to control the video bitrate using FFmpeg Complex Filter other than -b:v ?

    8 février 2017, par srujith poondla

    I am trying to compress the video size by reducing the bitrate. I successfully achieved using -b:v in ffmpeg, its working perfectly. But that is not a filter so i am unable to chain the ffmpeg commands one after the other. Is there any other video filter in ffmpeg that controls the bitrate of the video so that i can chain the ffmpeg commands like mentioned in this link Filter Chaining FFmpeg

  • ffmpeg - "Incompatible pixel format 'rgb24' for codec 'gif', auto-selecting format 'rgb8'"

    8 février 2017, par fordprefect

    I'm trying to convert a .webm to .gif at a pretty good quality, so I decided to have a go at ffmpeg (very new to this). I followed some instructions and did some research and after setting everything up figured out what I wanted in the command line:

    ffmpeg -i input.webm -pix_fmt rgb24 -vf scale=-1:720 output.gif
    

    Whenever I start the conversion it gives me a warning (as seen in the title), and gives me a somewhat low quality gif by using 'rgb8'. I've googled around but can't seem to find an answer, not that my skill level can understand at least.

    Help would be much appreciated! Thanks :)

  • Adobe connect video : FLV to MP4 (export, convert)

    8 février 2017, par Guillaume Chevalier

    I would like to convert an adobe connect video from .flv in the downloaded zip to .mp4. I have already done the steps explained in this question and answer, however I get .flv files organised like this inside the .zip:

    enter image description here

    Moreover, I know that ffmpeg can merge video and sound files together as well as concatenating resulting clips directly from the command-line which could be quite useful: https://www.labnol.org/internet/useful-ffmpeg-commands/28490/

    I can't ask the owner of the video to make it available as an .mp4 from within the adobe connect admin interface. Briefly, I would like to listen to those videos in x2 speed in VLC (just like what I do when listening to random math classes on YouTube - I put ON the x2 speed). The amount of time I would gain to watch adobe connect videos in x2 speed is MASSIVE.

    I think I am not the only one that would like to do this. There are a lot of questions on forums about downloading adobe connect videos, but the .flv format mixed with some .xml is generally a killer when the host does not make the videos properly available in .mp4.

    Dealing with the order of the .flv files is a puzzle. At least, I would not care to flush the chat away and leave some details like that behind, that would help to reconstruct the videos. Any scripts to automate the process would be useful.