Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • How to Automatically Add Silence to a Voiceover Based on Punctuation ?

    19 mai, par Big Loot

    I have a script and its voiceover. Is there a way to automatically add silence with the following durations:

    • 1 second at each comma
    • 2 seconds at each full stop
    • 3 seconds at each paragraph change

    I've tried manually inserting silence in the audio file, but it's time-consuming and prone to errors. I'm looking for a more efficient and accurate method, possibly an automated solution, that can help streamline this process.

  • How can I use ffmpeg to stream over http

    19 mai, par user3754828

    I am using the follow commands to stream to my localhost

    ffmpeg -i b.mp4 -r 60 -bufsize 1024k -vcode libtheora -qscale:v 1 -f ogg "udp://@127.0.0.1/video.ogg"
    
    ffmpeg -i b.mp4 -r 60 -bufsize 1024k -vcode libtheora -qscale:v 1 -f ogg "http://127.0.0.1/video.ogg"
    

    The both work very well, at least do not show any errors, but when I try play such http stream does not, it gave me error "not found"

    Can somebody help me on it? I am complety lost in this issue...also when I try include some port, for example ffmpeg -i b.mp4 -r 60 -bufsize 1024k -vcode libtheora -qscale:v 1 -f ogg "http://127.0.0.1:8980/video.ogg" provide me input/output error...I have test the equivalent commands on vlc and is work as well.

    Thanks in advance

  • How to record video and audio from webcam using ffmpeg on Windows ?

    19 mai, par Babu

    I want to record video as well as audio from webcam using ffmpeg,

    I have used the following codes to know what devices are available:

    ffmpeg -list_devices true -f dshow -i dummy
    

    And got the result:

    ffmpeg version N-54082-g96b33dd Copyright (c) 2000-2013 the FFmpeg developers
    built on Jun 17 2013 02:05:16 with gcc 4.7.3 (GCC)
    configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
    isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
    le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
    e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
    ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
    ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
    eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-
    amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
    enable-libxvid --enable-zlib
    libavutil      52. 37.101 / 52. 37.101
    libavcodec     55. 16.100 / 55. 16.100
    libavformat    55.  8.103 / 55.  8.103
    libavdevice    55.  2.100 / 55.  2.100
    libavfilter     3. 77.101 /  3. 77.101
    libswscale      2.  3.100 /  2.  3.100
    libswresample   0. 17.102 /  0. 17.102
    libpostproc    52.  3.100 / 52.  3.100
    [dshow @ 024eb460] DirectShow video devices
    [dshow @ 024eb460]  "Sirius USB2.0 Camera"
    [dshow @ 024eb460]  "Vimicro USB Camera (Altair)"
    [dshow @ 024eb460] DirectShow audio devices
    [dshow @ 024eb460]  "Microphone (Realtek High Defini"
    dummy: Immediate exit requested
    

    I am using the following codes to get more details about the device:

    ffmpeg -f dshow -list_options true -i video="Vimicro USB Camera (Altair)"
    

    And i am getting the following results:

    ffmpeg version N-54082-g96b33dd Copyright (c) 2000-2013 the FFmpeg developers
    built on Jun 17 2013 02:05:16 with gcc 4.7.3 (GCC)
    configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
    isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
    le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
    e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
    ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
    ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
    eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-
    amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
    enable-libxvid --enable-zlib
    libavutil      52. 37.101 / 52. 37.101
    libavcodec     55. 16.100 / 55. 16.100
    libavformat    55.  8.103 / 55.  8.103
    libavdevice    55.  2.100 / 55.  2.100
    libavfilter     3. 77.101 /  3. 77.101
    libswscale      2.  3.100 /  2.  3.100
    libswresample   0. 17.102 /  0. 17.102
    libpostproc    52.  3.100 / 52.  3.100
    [dshow @ 0249b3e0] DirectShow video device options
    [dshow @ 0249b3e0]  Pin "Capture"
    [dshow @ 0249b3e0]   pixel_format=yuyv422  min s=640x480 fps=30 max   s=640x480 fp
    s=30
    [dshow @ 0249b3e0]   pixel_format=yuyv422  min s=640x480 fps=30 max s=640x480 fp
    s=30
    [dshow @ 0249b3e0]   pixel_format=yuyv422  min s=352x288 fps=30 max s=352x288 fp
    s=30
    [dshow @ 0249b3e0]   pixel_format=yuyv422  min s=352x288 fps=30 max s=352x288 fp
    s=30
    [dshow @ 0249b3e0]   pixel_format=yuyv422  min s=320x240 fps=30 max s=320x240 fp
    s=30
    [dshow @ 0249b3e0]   pixel_format=yuyv422  min s=320x240 fps=30 max s=320x240 fp
    s=30
    [dshow @ 0249b3e0]   pixel_format=yuyv422  min s=176x144 fps=30 max s=176x144 fp
    s=30
    [dshow @ 0249b3e0]   pixel_format=yuyv422  min s=176x144 fps=30 max s=176x144 fp
    s=30
    [dshow @ 0249b3e0]   pixel_format=yuyv422  min s=160x120 fps=30 max s=160x120 fp
    s=30
    [dshow @ 0249b3e0]   pixel_format=yuyv422  min s=160x120 fps=30 max s=160x120 fp
    s=30
    video=Vimicro USB Camera (Altair): Immediate exit requested
    

    When i am trying following codes to get video and audio stream:

    ffmpeg -f dshow -s 320x240 -r 30 -vcodec mjpeg -i video="Vimicro USB Camera (Altair)" e:\output.mp4
    

    I am getting an error message as "Could not set video options video=Vimicro USB Camera (Altair): Input/output error"

    Following are the error details:

    ffmpeg version N-54082-g96b33dd Copyright (c) 2000-2013 the FFmpeg developers
    built on Jun 17 2013 02:05:16 with gcc 4.7.3 (GCC)
    configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
    isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
    le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
    e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
    ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
    ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
    eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-
    amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
    enable-libxvid --enable-zlib
    libavutil      52. 37.101 / 52. 37.101
    libavcodec     55. 16.100 / 55. 16.100
    libavformat    55.  8.103 / 55.  8.103
    libavdevice    55.  2.100 / 55.  2.100
    libavfilter     3. 77.101 /  3. 77.101
    libswscale      2.  3.100 /  2.  3.100
    libswresample   0. 17.102 /  0. 17.102
    libpostproc    52.  3.100 / 52.  3.100
    [dshow @ 002f78e0] Could not set video options
    video=Vimicro USB Camera (Altair): Input/output error
    

    And i am unable to find where i am doing wrong.

    So if anybody can find where i am doing wrong or how to record video as well as audio from webcam using ffmpeg please help me to solve this problem.

  • Convert m3u8 file to mp4 file in React Native Expo

    19 mai, par DRx

    How can I convert m3u8 file to mp4 file in React Native Expo? I have tried to convert m3u8 file to mp4 using FFmpegKit but I have this errors:

    'Cannot read property 'getLogLevel' of null' and 'Cannot read property 'ffmpegSession' of null'

    Also building with this package failing (Could not determine the dependencies of task ':ffmpeg-kit-react-native:compileDebugAidl'.).

    Is there a simple and easy way to convert m3u8 file in React Native Expo?

    Code I have used:

    import { FFmpegKit } from 'ffmpeg-kit-react-native';
    export async function converterToMp4() {
        try {
            await FFmpegKit.executeAsync(`-i ${m3u8FileUri} ${mp4FileUri}`)
    
        } catch(err) {
            console.log(err)
        }
    }
    
  • Convert CODEC of all videos in a folder from "Codec : MPEG-H Part2/HEVC (H.265) (hev1)" to "Codec : H264 - MPEG-4 AVC (part 10) (avc1)"

    19 mai, par user25123807

    I've downloaded shows and cant get them to play on TV as the codec is not supported. H264 is a compatible codec. I have noted the codec of the videos in the title of this post, and the codec which is compatible (264). I need help converting in bulk, all videos in a folder to the compatible codec - H264 - MPEG-4 AVC (part 10) (avc1).

    please help

    i have ffmpeg.

    I have tried changing the file type from mkv --> mp4 but the issue is the codec. I need help bulk converting the codec (265-->264)