Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Fffmpeg mapping audio and video by language

    28 mars 2017, par Terrabyte

    I want to batch convert these mkv files, they contain more than one language. Instances include: Eng/Ger, Eng/JPN. Sometimes there are multiple video sources within the mkv for whatever reason:

    ive tried using:

    FFMPEG_PATH . ' -i ' . $localFile . ' -sn -map 0:v:0 -map 0:a:m:language:jpn -c:v ' . $videoCodec . ' -tune animation -crf 20 -refs 6 -bf 6 -trellis 1 -b_strategy 1 -profile:v high -level 4.0 -pix_fmt yuv420p -ac 2 -flags +aic+mv4 ' . $scale . ' ' . $convertedFilename;
    

    This one grabs the first video (this doesnt matter, but i need it to grab one video just in case)

    -map 0:v:0 -map 
    

    I don't thing this one works because when i tried it, it grabbed the english one instead so i dont know the issue.

    0:a:m:language:jpn
    

    I could do

    0:m:language:jpn
    

    but then id have to remove: 0:v:0 and sometimes theres a issue where just using the general mapping would encode both video sources so it wold double in file sizes

    so how would i just map the audio file while keeping the video mapping? Fgmpeg is really confusing with this instruction.

  • ffmpeg - remove sequentially duplicate frames

    27 mars 2017, par metlira

    Is there any way to detect duplicate frames within the video using ffmpeg.

    I tried -vf flag with select=gt(scene\,0.xxx) for scene change. But, it did not work for my case.

  • FFMpeg open a DVD VOB chain ?

    27 mars 2017, par Sugrue

    I'm new to FFMpeg so this may be a dumb question, but I don't see the answer in the documentation.

    I want to decode frames from a DVD vob files. Opening the first VOB in the group works fine, but how do I tell ffmpeg to continue on to the next VOB and read all the VOBs on a DVD?

    I have the VOB files in a folder on a hard disk.

  • FFMPEG .oma to .mp3 "Unsupported codec 5 !" with a big file

    27 mars 2017, par Ventura

    I'm trying to convert a .OMA file to .MP3 but no success with a specific file.

    If I try:

    ffmpeg -i audio1.oma -f mp3 output.mp3
    

    The file is converted successfully. The file audio1.oma is a 3 MB file.

    Full output:

    ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
      built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
      configuration: --prefix=/usr/local/Cellar/ffmpeg/3.2.4 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --disable-lzma --enable-vda
      libavutil      55. 34.101 / 55. 34.101
      libavcodec     57. 64.101 / 57. 64.101
      libavformat    57. 56.101 / 57. 56.101
      libavdevice    57.  1.100 / 57.  1.100
      libavfilter     6. 65.100 /  6. 65.100
      libavresample   3.  1.  0 /  3.  1.  0
      libswscale      4.  2.100 /  4.  2.100
      libswresample   2.  3.100 /  2.  3.100
      libpostproc    54.  1.100 / 54.  1.100
    [oma @ 0x7f8fc4000000] Estimating duration from bitrate, this may be inaccurate
    Input #0, oma, from 'audio1.oma':
      Metadata:
        title           : Is This It
        artist          : The Strokes
        album           : Is This It
        genre           : Rock
        OMG_TRLDA       : 2001/01/01 00:00:00
        TLEN            : 153000
      Duration: 00:02:33.36, start: 0.000000, bitrate: 128 kb/s
        Stream #0:0: Audio: mp3 ([3][0][0][0] / 0x0003), 44100 Hz, stereo, s16p, 128 kb/s
    Output #0, mp3, to 'output.mp3':
      Metadata:
        TIT2            : Is This It
        TPE1            : The Strokes
        TALB            : Is This It
        TCON            : Rock
        OMG_TRLDA       : 2001/01/01 00:00:00
        TLEN            : 153000
        TSSE            : Lavf57.56.101
        Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, stereo, s16p
        Metadata:
          encoder         : Lavc57.64.101 libmp3lame
    Stream mapping:
      Stream #0:0 -> #0:0 (mp3 (native) -> mp3 (libmp3lame))
    Press [q] to stop, [?] for help
    size=    2397kB time=00:02:33.35 bitrate= 128.0kbits/s speed=37.2x    
    video:0kB audio:2397kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.016094%
    

    If I try the same with another .oma (53 MB) I'm getting the error:

    Unsupported codec 5! audio2.oma: Function not implemented

    Full output:

    ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
      built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
      configuration: --prefix=/usr/local/Cellar/ffmpeg/3.2.4 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --disable-lzma --enable-vda
      libavutil      55. 34.101 / 55. 34.101
      libavcodec     57. 64.101 / 57. 64.101
      libavformat    57. 56.101 / 57. 56.101
      libavdevice    57.  1.100 / 57.  1.100
      libavfilter     6. 65.100 /  6. 65.100
      libavresample   3.  1.  0 /  3.  1.  0
      libswscale      4.  2.100 /  4.  2.100
      libswresample   2.  3.100 /  2.  3.100
      libpostproc    54.  1.100 / 54.  1.100
    [oma @ 0x7f8792000000] Unsupported codec 5!
    audio2.OMA: Function not implemented
    

    Both audios works fine when using the MP3 Player. The first audio which works is just a random song from my MP3 player to test. The second file was recorded in a music studio playing live with multiple channels.

    Anything I'm missing here?

  • There are error about ffmpeg in python

    27 mars 2017, par WHOAMI
    from ffmpy import FFmpeg
    import ffmpy
    
    ff = FFmpeg(inputs={'screenrecord.mp4':None},
                outputs={'C:\\Users\pc\Desktop\CM\03.24\Demo\output.mp4':None})
    
    #ff.cmd
    ff.run()
    

    following is the error message.

    C:\Users\pc\AppData\Local\Programs\Python\Python36\python.exe C:/Users/pc/Desktop/CM/03.24/Demo/Demo.py
    Traceback (most recent call last):
      File "C:\Users\pc\AppData\Local\Programs\Python\Python36\lib\site-packages\ffmpy-0.2.2-py3.6.egg\ffmpy.py", line 95, in run
      File "C:\Users\pc\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 707, in __init__
        restore_signals, start_new_session)
      File "C:\Users\pc\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 990, in _execute_child
        startupinfo)
    FileNotFoundError: [WinError 2] 系统找不到指定的文件。
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "C:/Users/pc/Desktop/CM/03.24/Demo/Demo.py", line 8, in 
        ff.run()
      File "C:\Users\pc\AppData\Local\Programs\Python\Python36\lib\site-packages\ffmpy-0.2.2-py3.6.egg\ffmpy.py", line 99, in run
    ffmpy.FFExecutableNotFoundError: Executable 'ffmpeg' not found
    

    Process finished with exit code 1