Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • ffmpeg batch reencode with subfolders

    4 octobre 2016, par Alan

    I am trying to reencode a few hundred videos to X265 but there are many directories that have spaces in the filenames as do some of the files. I have looked at a bunch of scripts and am struggling to find one that works with the spaces and the different directory levels.

    This one works, as long as there is no sub directories:

    #!/bin/bash
    for i in *.avi;
    do 
        ffmpeg -i "$i" -c:v libx265 -c:a copy X265_"$i"
    done
    

    I have been trying to work with this bash script, but it fails with the whitespaces I am guessing.

    #!/bin/bash
    inputdir=$PWD
    outputdir=$PWD
    while IFS= read -r file ; do
      video=`basename "$file"`
      dir=`dirname "$file"`
     ffmpeg -fflags +genpts -i "$file" -c:v libx265 -c:a copy "$dir"/X265_"$video"
    done < <(find "$inputdir" -name "*.avi" | head -100)
    

    On this thread it looks like a good solution for windows users, but not linux. FFMPEG - Batch convert subfolders

    FOR /r %%i in (*.mp4) DO ffmpeg32 -i "%%~fi" -map 0:0 -map 0:1 -map 0:1 -c:v copy -c:a:0 aac -b:a 128k -ac 2 -strict -2 -cutoff 15000 -c:a:1 copy "%%~dpni(2)%%~xi"

    If you can point me to the right solution that is appropriate for bash, I would appreciate it.

  • VLC snytax to transcode & stream to stdout ?

    4 octobre 2016, par Will Tower

    Goal: I am trying to use VLC as a local server to expand the video capabilities of an app created with Adobe AIR, Flex and Actionscript. I am using VLC to stream to stdoutand reading that output from within my app.

    VLC Streaming capabilities
    VLC Flash Video

    Status: I am able to launch VLC as a background process and control it through its remote control interface (more detail). I can load, transcode and stream a local video file. The example app below is a barebones testbed demonstrating this.

    Issue: I am getting data in to my app but it is not rendering as video. I don't know if it is a problem with my VLC commands or with writing to/reading from stdout. This technique of reading from stdout in AIR works (with ffmpeg for example).

    One of the various transcoding commands I have tried:

    -I rc  // remote control interface  
    -vvv   // verbose debuging  
    --sout  // transcode, stream to stdout 
    "#transcode{vcodec=FLV1}:std{access=file,mux=ffmpeg{mux=flv},dst=-}"
    

    This results in data coming into to my app but for some reason it is not rendering as video when using appendBytes with the NetStream instance.

    If instead I write the data to an .flv file, a valid file is created – so the broken part seems to be writing it to stdout. One thing I have noticed: I am not getting metadata through the stdout`method. If I play the file created with the command below, I do see metadata.

    Hoping someone sees where I am going wrong here.


    // writing to a file
    var output:File = File.desktopDirectory.resolvePath("stream.flv");
    var outputPath:String = output.nativePath;
    "#transcode{vcodec=FLV1}:std{access=file,mux=ffmpeg{mux=flv},dst=" + outputPath + "}");
    

    Note: In order to get this to work in AIR, you need to define the app profile as "extendedDesktop"


      <?xml version="1.0" encoding="utf-8"?>
      
    
        
            
        
    
        
    
    
  • Failed to build opencv for conda

    4 octobre 2016, par Caenorst

    I'm on Ubuntu 16.04 64 bits, using Anaconda2.

    I'm trying to install Opencv for conda with FFMPEG support (for VideoCapture).

    I followed this tutorial: http://dhaneshr.net/2016/06/03/installing-opencv-2-4-x-with-ffmpeg-python-on-anaconda/

    changed cmake to 3.3.1 and -DWITH_FFMPEG=1 but when I execute $ conda build conda

    It fails at the test to import cv2

    You can find the whole log in this file: https://gist.github.com/Caenorst/e6bce629178540f30818a66e2f3a8663

  • "opaque" pointer in ffmpeg AVFrame

    4 octobre 2016, par R2-D2

    In ffmpeg there is a structure AVFrame describing decoded video or audio data.

    It has a void pointer opaque. The documentation claims it is "for some private data of the user".

    What does this mean? Can it be used to transport any additional data as per-frame metadata?

  • Possible to dynamically switch input streams in ffserver ?

    4 octobre 2016, par dr.doom

    I am interested in having multiple alternative input streams to an ffserver that each will get activated upon command on predefined time intervals.

    Imagine a scenario where the client wants to stream feeds from a security camera for 10 seconds and then switch to another security camera.

    Is this functionality possible with ffserver and ffmpeg?