Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • how to codec specific parameters (encoding qualities and presets) in ffmpeg

    14 septembre 2019, par blackcat

    I'm using libavcodec to encode captured video. When using ffmpeg utility we can setup encoding quality, encoding preset and bitrate. But how to check what values are available, i suppose it's possible as ffmpeg enumerate them somehow?

  • How can I parse ffprobe output and run ffmpeg depending on the result ?

    14 septembre 2019, par Eli Greenberg

    I have had incredible trouble building a binary of ffmpeg for Mac that works correctly for all of my needs. I have an older build that works great remuxing h264 video without problems but lacks a library I need, namely libspeex. I built a newer build based on ffmpeg's git that includes libspeex but crashes when trying to remux h264 from .flv files with bad timecodes (live dumps from rtmpdump). So I have two ffmpeg binaries that each do half of what I need. This is what I have as my current .command file:

    for f in ~/Desktop/Uploads/*.flv
    do
    /usr/local/bin/ffmpeg -i "$f" -vcodec copy -acodec libfaac -ab 128k -ar 48000 -async 1 "${f%.*}".mp4 && rmtrash "$f" || rmtrash "${f%.*}".mp4
    done
    

    This ffmpeg binary has libspeex included so it can decode speex audio in the .flv input files. What I'm looking to do is something like this pseudocode:

    for f in ~/Desktop/Uploads/*.flv
    do
    ffprobe input.flv
        if Stream #0:1 contains speex
            ffmpeg-speex -i input.flv -acodec copy -async 1 output.m4a
        fi
    ffmpeg-h264 -i input.flv -vcodec copy output.mp4
    MP4Box -add output.mp4 -add output.m4a finaloutput.mp4
    done
    

    Is something like this possible? Are there any alternatives?

  • Cleaning up audio (probably malformed AAC bitstream)

    14 septembre 2019, par Jeffrey Kramer

    I've come across a set of files with two streams. The first is audio with codec=ADTS, the second is MPEG-4 AVC video.

    I used MKVToolNix to convert the file to MPEG AAC Audio and save the file as an .mkv file. Everything works fine, but it's a manual process.

    Is there a more efficient approach I could use through FFmpeg? For example, can I convert the audio to AAC and fix (what I suspect) is the malformed bitstream? I am still learning FFmpeg (I've used it mostly for concatenations) so I'm not sure what the best approach to this audio trouble is.

  • headless chrome capture screen video or animation

    14 septembre 2019, par t_io

    I try to capture some animations from a website and stitch them together using ffmpeg. As far as I understand the docs startScreencast is the way to go.

    If I understand that right I can start the screencast with

    await Page.startScreencast({format: 'png', everyNthFrame: 1});

    and listen to every incoming frame with

    Page.screencastFrame(image =>{
      const {data, metadata} = image;
      console.log(metadata);
    });
    

    But it's never prints out something. So I assume it's not called.

    I archived my goal with something like this:

    let counter = 0;
    while(counter < 500){
      await Page.startScreencast({format: 'png', everyNthFrame: 1});
      const {data, metadata} = await Page.screencastFrame();
      console.log(metadata);
      counter += 1;
    }
    

    Which feels like a non-performant hack. So any suggestions on how to use startScreencast and screencastFrame properly?

  • How to record an IPTV channel to disk, splitted by time. And extract audio [on hold]

    13 septembre 2019, par Ahmad Qudan

    I need to save a recording of an IPTV channel into multiple video files. each video file should only be 1 minute in length. so, every minute, a video is created.

    Also, is it possible that an audio file is created the same way, with the same command? For example, a two minutes broadcast of a certain channel, will end up on my disk as 4 files, 2 videos; one for each minute, and two audios; one for each minute

    I tried to use ffmpeg on linux, and it seems to be the tool for the job, but I couldn't find out the right options that could make it happen