Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Soft subtitles on iPhone

    12 novembre 2012, par forthrin

    I know this question (or similar ones) has been asked all over the Web, but I still can't find a straight answer:

    1. Is it possible to mux soft subtitles into an mp4 video file (quickly, without re-encoding the video stream) that iPhone will actually display on the screen? I have tried ffmpeg, MP4Box, Subler, Submerge and mp4v2 and none of them were successful in producing mp4 file that would display subtitles on iPhone (though some of them had subtitles when playing the video in VLC or iTunes).

    2. If iPhone does not support soft subtitles in mp4 files, then is there any command line utility (like the ones mentioned in question 1) that will render hard subtitles onto the video stream? (I guess then this process will take hours since the video will have to be re-encoded)

    3. Finally, if there is no command line utility that can do hard subtitles, what options are there for GUI-based utilities? Is Handbrake the best option?

    If possible, please supply a command line example.

  • Cakephp execute ffmpeg on webroot folder

    12 novembre 2012, par gabo84

    Hello I'm trying to execute ffmpeg from my controller on video after i upload it. I believe my code is not right.

    <?php
    class VideosController extends AppController{
    
        function controlleraction(){
    
        //some code that uploads the video works ok
        exec('/var/www/multimedia/app/webroot/files/videos/ffmpeg -i video.mp4 video.avi');
    
        }
    }
    ?>
    
  • How to add subtitles to a MKV video with PHP ? [closed]

    11 novembre 2012, par Minipipo1

    I'd like to add subtitles to a mkv video with PHP. Could it be possible ?

    I've tried to search but I only found a library called ffmpeg-php and it doesn't look useful for me. Does anyone have an idea ?

    Thank you !

  • PHPVideoToolkit getFFmpegInfo() returns an array with empty codecs

    11 novembre 2012, par user16948

    I have install ffmpeg and ffmpeg -codecs returns a huge list of codecs. But output of the following code:

        $ffmpeg = $toolkit->getFFmpegInfo(FALSE);
        print_r($ffmpeg);
    

    is this:

      ...
      [codecs] => Array
            (
                [video] => Array
                    (
                    )
    
                [audio] => Array
                    (
                    )
    
                [subtitle] => Array
                    (
                    )
    
            )
    

    It doesn't find any codec. Any suggestion? (I have installed ffmpeg from source)

  • Streaming ffmpeg.exe stdout

    11 novembre 2012, par Gent

    I need to stream the standard output from ffmpeg.exe directly to a web response stream on the fly. I have no problem setting up the command line with Process/RedirectStandardOutput/etc to pipe the output stream.

    However, the problem seems to be the output from Process.StandardOutput is not in the correct raw format. Something like this (pseudocode):

    var ffpsi = new ProcessStartInfo("ffmpeg.exe", "-i input.mp3 -acodec copy -f mp3 -")
    ffpsi.UseShellExecute = false;
    ffpsi.RedirectStandardOutput = true;
    var ffmpegProcess = new Process();
    ffpmpegProcess.StartInfo = ffpsi;
    
    ffmpegProcess.Start();
    
    var outputFile = new FileStream("out.mp3");
    ffmpegProcess.StandardOutput.BaseStream.CopyTo(outputFile);
    

    creates a file a little larger than the original and it's clearly not a valid MP3.

    I've played with various encodings copying strategies with the base streams and get data from the async callbacks, but nothing seems to work.

    Any ideas here? I guess this comes down to how to get the raw binary output from ffmpeg stdout into a .NET stream I can pass to a response stream?