Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Can ffmpeg process files by their size ? - looking for a faster way to process

    10 octobre 2013, par nlahkim

    i looking for a faster way to convert mp3 files on mp4 by adding a simple image on it maybe can the codec sort files by size before processing

    i use this portion of code to do the conversion:

    for %%a in ("*.*")
    do
    "C:\ffmpeg\bin\ffmpeg" -loop 1 -i  "C:\ffmpg\bin\input.jpg" -i  "%%a" -c:v libx264 -preset veryslow -tune stillimage -crf 18 -pix_fmt yuv420p -vf scale=640:480 -c:a aac -shortest -strict experimental -b:a 192k -shortest "C:\mp4\%%~na.mp4"
    pause
    

    i don't find anything about sorting files on ffmpeg support site

    the only thing i have fond about processing faster is using cpu and thread but it dosen't really work like i expected

    so any idea about processing faster?

    thanks

  • decode mpeg4 video stream with FFMEG

    10 octobre 2013, par thaibaodoan

    I have a prolem with ffmpeg library when using it for decoding video. Data send from server to remote is fine, I decode H264 data well. But when decode mpeg-4 data, avcodec_decode_video2() function always decode fail a frame after decode successfully a frame.

                int len = 0;
        int ret = 0;
        int got_picture = 0;
        uint8_t* padding_data = NULL;
        AVPacket avpacket;
        av_init_packet(&avpacket);
    
        jboolean result = false;
        int encoded_size = dFrame.length + FF_INPUT_BUFFER_PADDING_SIZE;
        padding_data = (uint8_t*) aligned_malloc(encoded_size, IMC_ALIGNED32);
        memcpy(padding_data, dFrame.bitstream, dFrame.length);
        memset(padding_data + dFrame.length, 0, FF_INPUT_BUFFER_PADDING_SIZE);
        avpacket.data = padding_data;
        avpacket.size = dFrame.length;
    
    
        avcodec_get_frame_defaults(this->pFrame);
    
        len = avcodec_decode_video2(this->pCodecCtx, this->pFrame, &got_picture,
                &avpacket);
    
        if (padding_data)
        {
            aligned_free (padding_data);
        }
        av_free_packet(&avpacket);
    

    And I init decoder with AV_CODEC_ID_MPEG4 . Anybody can give me some advice?

  • When merging video and audio, converting audio to AAC, sound is missed at the end 3 seconds

    10 octobre 2013, par profuel

    I have to build video from images and some audio clip.
    Audio is much longer, so I have to mute last 5 seconds of audio track, cutting to video length.
    My issue is that adding AAC encoding to audio removes last 2-5 seconds of audio in resulted video.

    Here are my command lines:

    ffmpeg -i sound.mp3 -i video.mp4 -shortest out.mp4 -> results in correct audio in result video with played audio over 100% of movie

    ffmpeg -i sound.mp3 -i video.mp4 -acodec aac -ab 160000 -strict experimental -shortest out.mp4 -> not correct audio, gets crop at end of video for 2-5 seconds


    The problem appears for me both on Windows and on CentOS 6.4, no matter which version of ffmpeg is used.

    FFMPEG details (downloaded from http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.2013-06-01.tar.gz )
    ffmpeg version N-53724-g716dbc7 Copyright (c) 2000-2013 the FFmpeg developers
    built on Jun 1 2013 05:26:08 with gcc 4.6 (Debian 4.6.3-1)
    configuration: --prefix=/root/ffmpeg-static/64bit --extra-cflags='-I/root/ffmpeg-static/64bit/include -static' --extra-ldflags='-L/root/ffmpeg-static/64bit/lib -static' --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx
    libavutil 52. 34.100 / 52. 34.100
    libavcodec 55. 12.102 / 55. 12.102
    libavformat 55. 8.102 / 55. 8.102
    libavdevice 55. 2.100 / 55. 2.100
    libavfilter 3. 73.100 / 3. 73.100
    libswscale 2. 3.100 / 2. 3.100
    libswresample 0. 17.102 / 0. 17.102
    libpostproc 52. 3.100 / 52. 3.100

  • Apply different effects to Video

    10 octobre 2013, par ishan jain

    I am creating an application, in which I have to give the option to apply different effects (normal, sepia, black & white, vintage, HD) to the VIDEO. I am creating this application this application for min android 2.3 version. I am thinking of following the flow video -> convert to image frames -> apply effect to frames using some library -> convert frames to video.

    Can anyone help me that if above flow is correct or not? And which library I can use for applying effects to the frames or is there any other way to apply the effects?

    Thanks

  • FFMPEG installation & configuration with xampp on fedora

    10 octobre 2013, par UMI

    I have running Fedora 8, where I have installed XAMPP-Linux. First I installed latest version with Xampp-Linux-1.8.3 including PHP 5.5 from "http://www.apachefriends.org/en/xampp-linux.html".

    After setting up everything, tried to install "FFMPEG" from "http://www.nixgurus.com/fedora/installing-ffmpeg-using-yum-on-centos-redhat-fedora/". This is the only guide which gets completed with successful installation and configuration, otherwise all other tried tutorials got leave me middle of nowhere.

    Note: While installing FFMPEG following above provided URL, "phpize" did not work to me so I had to install php-devel by running "yum install php-devel" command. I always got different "Zend Module" and "Zend Extension API" versions.

    When I installed ffmpeg and put extension in "php.ini" with correct path, it never appeared in phpinfo().

    Then after searching, I got a hint that installed "FFMPEG" will not be compatible to the installed PHP version. So I removed complete pack of XAMMP-LINUX and installed old one with Xampp-Linux-1.8.2 including PHP 5.4. But it result were same.

    Then, I decided to use more older version and it was Xampp-Linux-1.8.1 including PHP 5.4. Now currently I have this version but having version results are totally changed that after installation of FFMPEG when I put ffmpeg.so with its correct path in PHP.INI (definitely restart the server on every change) server behaves strange way that PHP files get downloaded by browsers and when I comment same line and restart web server everything works well.

    Just to let you know that, even I have given path "extension=/usr/lib/php/modules/ffmpeg.so" which did not work and even moved files to default extension path "/opt/lampp/lib/php/extensions/no-debug-non-zts-20100525" as well but in vain.

    Looking forward to your help please.