Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • FFmpeg - Overlay one video onto another video ?

    9 février 2016, par CDR LDN

    I understand that this is a very open ended question. I have done some initial reading into FFmpeg, but now require some guidance.

    Problem

    • I have a video input.mov.
    • I would like to overlay another video on top of overlay.wov.
    • The result should be a single video (output.mov).

    Notes

    Thanks - C.

    Edits

    1. Backend is Go/Ruby. Open to using a new language.
    2. The audio from the first video should be kept.
    3. Setting the interval at which the overlay starts would be great.

    Current Solution

    ffmpeg -i input.mov -i overlay.mov -filter_complex "[0:0][1:0]overlay[out]" -shortest -map [out] -map 0:1 -pix_fmt yuv420p -c:a copy -c:v libx264 -crf 18  output.mov
    

    This nearly works, however:

    • Overlay is cut short even though the two videos (input.mov & overlay.mov) are the same length.
    • I cannot start the overlay at any interval apart from 0:00.
  • is it possible to record again a specific part while recording in android ?

    9 février 2016, par arslan haktic

    I am working on an android application for recording a long audio message, for now in case user made a mistake he have to cancel previous recording and record new, Can we make it preserve previous recording and record the same file from a specific point again?

    As i get there can be following solutions to do this,

    1. If user want to make recording again from a specific point, save previous file and cut it from specific length and join the new recorded file. If so can you please recommend an easy way to cut and join audio files in android (i have tried ffmpeg but that very much complex)

    2. Is there a way to overwrite file stream writing the audio from a specific point so it skip a specific recording path ?

    Any help will be highly appreciated. Thanks in advance.

  • Filter concat:out:v0 has a unconnected output | Concatenating with php-ffmpeg

    9 février 2016, par K Ф

    I'm incorporating PHP-FFMpeg to my symfony3 project which is working perfectly. However recently I've been needing to concatenate two videos into one, and it would appear it's not supported. So I created a ConcatVideoFilter class that I'm using based off of this

        public function apply(Video $video, VideoInterface $format)
        {
            $params = [];
            $count = count($this->files) + 1;
            foreach ($this->files as $i => $file) {
                $params[] = '-i';
                $params[] = $file;
            }
            $params[] = '-filter_complex';
            $params[] = 'concat=n='.$count.':v=1:a=1 [v]';
            $params[] = '-map';
            $params[] = '[v]';
            return $params;
        }
    

    I'm getting an encoding failed error in my symfony profiler

    RuntimeException: Encoding failed, ExecutionFailureException: ffmpeg failed to execute command

    I then copy pasted the actual ffmpeg command line to see what error it would give:

    Filter concat:out:v0 has a unconnected output

    Which is giving me this error

    Filter concat:out:v0 has a unconnected output

    What does this error mean, and what can I do to get rid of it?

  • How to restart RTMP dump bash script if it closes / dies ?

    9 février 2016, par Shashwat Singh

    I'm using this script to dump a live stream, say "stream1.sh" etc

    #! /bin/bash
    function INT_cleanup()
    {
        kill `jobs -p`
        exit
    }
    
    trap INT_cleanup INT
    
    count=0
    while [[ $count < 10 ]] # Try 10 times
    do
        rtmpdump -r "rtmp://" -a "live" -f "WIN 11,9,900,117" -W "http://xyz.swf" -p "" -y "xyz" --live | ffmpeg -re -i  - -sn  -vcodec copy -acodec copy -f flv "" 
        count=$((count + 1))
    done }
    

    It runs perfectly fine for 3-4 hours then it quits automatically due to packet loss or something, however if I restart it, it again starts working. So, What should I do to restart this particular script IF it dies ? Will it require cronjob? If yes, then please explain how?

  • Does ffmpeg supported KLV metadata ?

    9 février 2016, par ransh

    Is ffmpeg metadata, which is also described in: http://wiki.multimedia.cx/index.php?title=FFmpeg_Metadata also supported MISB standard UAV metadata 601.5 ? Is it same as KLV ?

    Thanks, Ran