Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • ffmpeg mp4->mp3 conversion 'no such file'

    10 juin 2016, par Thomas R.

    I'm using ffmpeg to convert mp4's to mp3's, about 124 videos total, and I'm using python to iterate through the files they're in and executing a version of ffmpeg -i pathtovideo/video.mp4 pathtoaudio/audio.mp3 to convert them.

    When I use this command on its own in terminal, it converts just fine, but calling from the python script (using os) it says pathtoaudio/audio.mp3: No such file or directory but of course there isn't, I'm asking the computer to generate this file. Any ideas for what might be going wrong or how to fix?

  • Generate all the files (.vtt + sprite) for the Tooltip Thumbnails options of Jwplayer

    10 juin 2016, par Tahola

    What is the best way to generate the ".VTT" file and the jpg sprite attached with it for the Tooltip Thumbnails of Jwplayer (http://www.jwplayer.com/blog/building-tooltip-thumbnails-with-encodingcom/- ?

    I know how to make an image sprite with php, but i dont know how to make the screenshots of each video with the time in second.. I think there must be a server tool to do all the tasks it but i cant find it.

    Thanks

  • ffmpeg antialiasing not working/not found

    10 juin 2016, par christian m.

    I'm trying to run an antialiasing filter via ffmpeg, and it says that it defaults to enabled when installing, but when I enter -list_dither antialiases, it cannot find it.

    Any ideas why this might be?

    Thanks!

  • Cannot retrieve duration of webm file using ffmpeg

    10 juin 2016, par maximus 69

    I am trying to retrieve the duration of a .webm video file that I recorded using the the video.js plugin (https://github.com/collab-project/videojs-record).

    I am using ffmpeg to get the duration but it always return N/A:

    ffprobe version 3.0.2-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2016 the FFmpeg developers
      built with gcc 5.3.1 (Debian 5.3.1-16) 20160424
      configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus --enable-libass --enable-gnutls --enable-libvidstab --enable-libsoxr --enable-frei0r --enable-libfribidi --disable-indev=sndio --disable-outdev=sndio --enable-librtmp --enable-libmfx --enable-libzimg --cc=gcc
      libavutil      55. 17.103 / 55. 17.103
      libavcodec     57. 24.102 / 57. 24.102
      libavformat    57. 25.100 / 57. 25.100
      libavdevice    57.  0.101 / 57.  0.101
      libavfilter     6. 31.100 /  6. 31.100
      libswscale      4.  0.100 /  4.  0.100
      libswresample   2.  0.101 /  2.  0.101
      libpostproc    54.  0.100 / 54.  0.100
    Input #0, matroska,webm, from '/home/demoss/public_html/source/bALRt9I697PVQh4zglou.webm':
      Metadata:
        encoder         : Chrome
      Duration: N/A, start: 0.000000, bitrate: N/A
        Stream #0:0(eng): Video: vp8, yuv420p, 640x480, SAR 1:1 DAR 4:3, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)
        Stream #0:1(eng): Audio: opus, 48000 Hz, mono, fltp (default)
    duration=N/A
    

    I don't think the video is corrupted as it played in my VideoJS player without issues.

    Any pointers as to why its not returning the duration would be greatly appreciated. I wouldn't mind using an alternative library as well

    Thanks

  • FFMPEG - Converting all images that are uploaded to MP4s

    10 juin 2016, par programmer12

    I have created some FFMPEG codes to execute once an video has been loaded. I am still fairly new at this, so please give as much information as possible.

    // ffmpeg Location
    $ffmpeg = 'c:\ffmpeg\bin\ffmpeg.exe';
    $ffprobe = 'c:\ffmpeg\bin\ffprobe.exe';
    
    // Video Filename Dir
    $video0 = $caption->row()->vidFile;
    // ex. output: upload/user/vid23.mov 
    
    // Video Filename only
    $video1 = explode('/',$video0);
    $video2 = $video1[2];
    // ex. output = vid23.mov;
    
    // Remove Extensions
    function extensions ($video2) 
    { 
         $filename = strtolower($video2); 
         $exts = explode(".", $video2); 
         $n = count($exts)-2; 
         $exts = $exts[$n]; 
         return $exts; 
     } 
    
         $ext2 = extensions($video2);
    // ex. output = vid23;
    
         //Convert all files to Mp4s
         //exec("$ffmpeg -i $video0 -vcodec copy -acodec copy $ext2.mp4");
         exec("$ffmpeg -i $video0 -vcodec libx264 -vf scale=-1:360 -qscale 7 -acodec libfdk_aac -ab 32 -ar 24000 $ext2.mp4");
    

    Am I doing something incorrect? It works when I test it on my test location, but once I moved it into production useing Codeigniter Framework. It's not working (Well, correction, just this part is not working - My image thumbnail does what is needed)

    Please help in anyway possible. Thanks!

    EDIT

    The main issue with the code is it will totally skip over the section and not execute at all. I didn't receive any error messages. Another issue is the file tends to codec error because of the moov data (bytes 0-32/33). I did do some reading, but since I'm not familiar with FFMPEG it is hard to read or understand.

    Example site: http://askubuntu.com/questions/396883/how-to-simply-convert-video-files-i-e-mkv-to-mp4

    I used that site as a base.

    ERROR LOG INFO

    Updated the FFMPEG exec script to the following

    exec("$ffmpeg -i $video0 -vcodec libx264 -vf scale=-2:360 
    -acodec libfdk_aac -ab 32k -pix_fmt yuv420p -movflags +faststart 
    -ar 24000 $ext2.mp4 2> log/error_log.txt");
    

    The Error log printed out the following

    ffmpeg version N-80101-gd970f7b Copyright (c) 2000-2016 the FFmpeg developers
    built with gcc 5.3.0 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads 
     --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig 
     --enable-frei0r --enable-gnutls --enable-iconv --enable-libass 
     --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype 
     --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug 
     --enable-libmfx --enable-libmp3lame --enable-libopencore-amrnb 
     --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus 
     --enable-librtmp --enable-libschroedinger --enable-libsnappy 
     --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame 
     --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis 
     --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 
     --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg 
     --enable-lzma --enable-decklink --enable-zlib
    libavutil      55. 24.100 / 55. 24.100
    libavcodec     57. 43.100 / 57. 43.100
    libavformat    57. 37.100 / 57. 37.100
    libavdevice    57.  0.101 / 57.  0.101
    libavfilter     6. 46.100 /  6. 46.100
    libswscale      4.  1.100 /  4.  1.100
    libswresample   2.  0.101 /  2.  0.101
    libpostproc    54.  0.100 / 54.  0.100
    upload/user/vid53.mp4: No such file or directory