Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • How i can resize rectangular video into square size without loosing quality ?

    15 février 2017, par Srinivas 25

    Our challenge is how do we can resize 1080*720 format videos to 720*720 format without loosing quality. Hence we are using ffmpeg for video encoding, please advice any tool or tips to achieve this?

  • How to use trap to terminate while loop containing ffmpeg fed by redirect from /dev/null ?

    15 février 2017, par Lorccan

    I discovered here Loop calls process that takes a long time to complete. How do I break out of it? that piping from find to a while loop that calls an ffmpeg cli [HandBrakeCLI] will not process more than one input file because ffmpeg has a quirk that it 'eats' all the input list in one go and 'starves' the loop.

    The solution was to redirect from /dev/null per http://mywiki.wooledge.org/BashFAQ/089 and that works fine. However, it brings me back to the original problem and the question I set out to solve:

    Because /dev/null now has a complete list of all the files feeding HandBrakeCLI, ctrl-c on its own is not enough to quit the loop.

    I have tried various permutations of trap, but I can't get it to do anything other than stop HandBrakeCLI processing the current input before it moves on to the next one. Instead of terminating the loop immediately, it also processes the mv right after the HandBrakeCLI line.

    So, there are two things I am not getting here: 1. How do I terminate everything with a ctrl-c or kill command? 2. If not dealt with by (1.), how do I prevent the mv inside the loop from being executed?

    For the sake of addressing the question, this is the simplified version of the code:

    #!/bin/bash
    
    source_dir="/Volumes/Volumename"
    dest_dir="/Volumes/Volumename/Converted/"
    finished_dir="Volumes/Volumename/Processed/"
    
    
    find "$source_dir" -type d -name "VIDEO_TS" | while read -r dir; do
      name=${dir%/VIDEO_TS}
      mov_dir=${dir%/*}
      name=${name##*/}
      ./HandBrakeCLI -i "$dir" -o "$dest_dir/$name.m4v" null
      mv "$mov_dir" "finished_dir"
    done
    
  • How to open MIL avi video file

    15 février 2017, par ahme0307

    I have some (AVI) videos with MIL(Matrox Imaging Library) codec. I have tried multiple codecs but i am not able to open. I have tried VLC, K-lite codecs,ffmpeg, here is the log file from k-Lite

    >##LAV Splitter Source (internal)::Video
    >
    >Media Type 0:
    >--------------------------
    >Video: MIL  256x256 5fps 489kbps
    >AM_MEDIA_TYPE: 
    >majortype: MEDIATYPE_Video {73646976-0000-0010-8000-00AA00389B71}
    >subtype: Unknown GUID Name {204C494D-0000-0010-8000-00AA00389B71}
    >formattype: FORMAT_VideoInfo {05589F80-C356-11CE-BF01-00AA0055595A}
    >bFixedSizeSamples: 0
    >bTemporalCompression: 1
    >lSampleSize: 1
    >cbFormat: 128
    >
    >VIDEOINFOHEADER:
    >rcSource: (0,0)-(256,256)
    >rcTarget: (0,0)-(256,256)
    >dwBitRate: 489508
    >dwBitErrorRate: 0
    >AvgTimePerFrame: 2000000
    >
    >BITMAPINFOHEADER:
    >biSize: 80
    >biWidth: 256
    >biHeight: 256
    >biPlanes: 1
    >biBitCount: 24
    >biCompression: MIL 
    >biSizeImage: 196608
    >biXPelsPerMeter: 0
    >biYPelsPerMeter: 0
    >biClrUsed: 0
    >biClrImportant: 0
    >
    >pbFormat:
    >
    >
    

    I also tried ffplay and here is the output enter image description here

    The only software i came across that can open this video is from Matrox and it doesn't allow exporting to other formats enter image description here I appreciate if some one can direct me to codecs that can handle this videos. I would like convert to other video formats for further processing.

    Edit: I have attached sample video here sample

    I also tried the latest ffmpeg

  • Extract Progress tone from Audio file

    15 février 2017, par spicyramen

    Is there a way to extract Progress tone frequency and duration from an audio file (Audacity, VLC, ffmpeg, etc.)

    I need to configure Freeswitch spandsp.conf.xml for India.

    I collected the audio file where I can hear the tone, wondering if there is a tool to extract and configure the settings required in Freeswitch.

    Current non-working config:

       
         
            
             
            
            
         
             
             
             
        
            
             
             
             
             
        
            
             
             
             
              
        
         
    

    Image of progress tone.

    enter image description here

  • How should I use the dash (not webm_dash_manifest !) format in ffmpeg ?

    15 février 2017, par Alton Patrick

    FFmpeg has a format named "dash":

    > ffmpeg -formats
    ...
      E dash            DASH Muxer
    ...
    

    This presumably corresponds to the code in libavformat/dashenc.c.

    I can find a number of items on the web about how to use the WebM DASH Manifest format, but nothing at all about this other DASH format.

    Can someone point me to documentation or examples that use the "DASH Muxer" either from the command line or API?