Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • mplayer output 4 audio channels to jack

    14 novembre 2013, par MrCastro

    I am struggling with getting mplayer to reproduce a 4 audio channel wav file.

    I created a 4chn audio file. Want mplayer to player, and output it to jack. The problem is that i am only able to get in jack 2 mplayer channels.

    if I do:

    mplayer -ao jack -channels 4 test_4chan_2.wav 
    

    mplayer plays and responds:

    laying test_4chan_2.wav.
    libavformat version 54.6.100 (internal)
    Audio only file format detected.
    Load subtitles in ./
    ==========================================================================
    Opening audio decoder: [pcm] Uncompressed PCM audio decoder
    AUDIO: 44100 Hz, 4 ch, s16le, 2822.4 kbit/100.00% (ratio: 352800->352800)
    Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
    ==========================================================================
    AO: [jack] 44100Hz 2ch floatle (4 bytes per sample)
    Video: no video
    Starting playback...
    

    and jack has only the following outputs:

    system:capture_1
    system:capture_2
    system:playback_1
    system:playback_2
    MPlayer [14434]:out_0
    MPlayer [14434]:out_1
    

    So it seems that mplayer recognizes that the input file as 4ch but on AO: [jack] only 2ch appear

    if I try the same with ecasound:

    ecasound -f 16,4,44100 -i test_4chan_2.wav -o jack 
    

    in Jack ecasoud appears with 4 outputs

    system:capture_1
    system:capture_2
    system:playback_1
    system:playback_2
    ecasound:out_1
    ecasound:out_2
    ecasound:out_3
    ecasound:out_4
    

    Do you have any idea of what could I be doing wrong?? I am running Debian (Jessy) and mplayer 1.1-4.7

    Thanks a lot

  • Extract WAV from an MP4, process and then remux it back

    13 novembre 2013, par Matt J.

    I have a large number of x264+AAC MP4 files. I have written an audio filter that operates on PCM wav files that I want to apply to the audio on all my videos, replacing the existing audio with the filtered version.

  • Hide system message while running ffmpeg

    13 novembre 2013, par Irene T.

    I am using the code bellow to grab an image from a video file and it is working great. But when i am running the php file that contains the code bellow all system procceses appears, and i mean some infos about the convertion, export etc.

    How can i make it run silent?

    $stderr = system("ffmpeg -i $videoPath -vframes 1 -an -s 306x173 -ss 03 $finalfilename 2>&1 >/dev/null", $exit_status);
    
    if ($exit_status === 0) {
        print 'Done! :)';
    } else {
        print 'Error... :/';
        // $stderr will help you figure out what happened...
    }
    
  • Find absolute path to ffmpeg

    13 novembre 2013, par Irene T.

    I installed ffmpeg and ffmpeg-php to my dedicated server and with a small script i am trying to extract an image from specific second.

    <?php
    
    $extension = "ffmpeg";
    $extension_soname = $extension . "." . PHP_SHLIB_SUFFIX;
    $extension_fullname = PHP_EXTENSION_DIR . "/" . $extension_soname;
    
    $timeOffset = "00:00:30";
    $videoPath = "sample.mp4";
    $extensi = ".jpg";
    $folder = "images/";
    $finalfilename = $folder . $randomfilename . $extensi;
    
    echo $extension_fullname; //I AM GETING THIS /usr/lib64/php/modules/ffmpeg.so
    
    if (exec("ffmpeg -ss $timeOffset -i $videoPath  -frames:v 1 $finalfilename")){
    echo "Done";
    }else{
    echo "Error";   
    }
    ?>
    

    as you can see in my execution command ther is ffmpeg, but how can i find the absolute path to ffmpeg? Take a look in my screenshot maybe this helps you to tell me..

    My last question is what is ffmpeg-php? Do i need it? i already install it.

    Thank you

    enter image description here

  • PHP - Converting images to video using ffmpeg

    13 novembre 2013, par Vishnu

    I am good in php but very new to ffmpeg and exec stuffs.Now I have successfully installed ffmpeg via ssh.I referred some stackoverflow here and found below code to make video using several images.

    <?php
    
    echo exec('ffmpeg -f image2 -i image%d.jpg video.mpg');
    
    ?>
    

    I have image1.jpg and image2.jpg in same folder.I run this php code but nothing happened...where does video.mpg gets saved ? and how to check if exec function ran successfully or how to debug it ?Any help is appreciated.