Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Aws Lambda - ffmpeg outputs distorted mp3 audio

    13 août 2018, par Eric Amshukov

    How do I get ffmpeg to output correctly to mp3 on AWS lambda? It's currently rendering a distorting/clipping sound in parts of the audio, but doesn't do it on my local machine.

    I am utilizing ffmpeg on AWS Lambda linux using the static build provided by https://www.johnvansickle.com/ffmpeg/ (x86_64 build).

    Here's the exact command:

    ffmpeg -loglevel verbose -ss 0 -t 30 -y -i /tmp/ick_20180323005225.wav -codec:a libmp3lame -qscale:a 7 /tmp/ick_20180323005225-opa.mp3

    Here is the sample file that I used:

    http://www.brainybetty.com/FacebookFans/Feb112010/strings.wav

  • MPD MPEG-DASH - Shows only one bitrate

    13 août 2018, par Justin Rec

    Help. I wont show bitrate.
    player.getBitrateInfoListFor("video"); Shows only one bitrate - 454948

    manifest.mpd generated by GPAC

     
      
       
        
       
      
      
       
        
       
      
      
       
        
       
      
      
       
        
       
      
      
       
        
        
       
      
     
    
    

    player.getBitrateInfoListFor("video"); Shows only one bitrate - 454948

  • How to use an executable as a filter for Ffmpeg ? [on hold]

    12 août 2018, par Maria do Carmo Costa

    My goal is to get broadcasts from clients, then improve the quality of the image applying some filters, then rebroadcast to some other servers.

    My first idea was to use OpenCV to make the changes to the broadcast but I realized that I would have problems to sincronize the changed frames with the audio. I do not know how could I change the frames and then recreate the broadcast with the audio.

    Then I decided to go for Ffmpeg, using Ffmpeg filters, it seems that if I just use ffmpeg from end to end, the audio will just go togheter. The problem is that the filters I want to apply are complex, they are external programs. I would like to have an Ffmpeg filter that would be able to make changes to the frames by running my external program.

  • Change the framerate of a video including audio without re-encoding using ffmpeg

    12 août 2018, par Trojaner_

    I have a 30.02 FPS .mp4-video and I'm trying to convert it to 30 FPS. I found this question but if I try the method like described in the first answer the audio gets lost because the video is getting converted in a .h264-file which can't contain audio as I read here.

    (I'm sorry if i've got issues with the english language, it isn't my mother language)

    EDIT: Here goes the content I enter in the terminal and the output that returns

    Input: ffmpeg -y -i 01.mp4 -f h264 -c copy temp1.h264

    Output: (I replaced the real paths with path\to\...)

    ffmpeg version N-91589-ge0539f0349 Copyright (c) 2000-2018 the FFmpeg developers
    built with gcc 8.2.1 (GCC) 20180808
    configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
    libavutil      56. 18.102 / 56. 18.102
    libavcodec     58. 22.101 / 58. 22.101
    libavformat    58. 17.101 / 58. 17.101
    libavdevice    58.  4.101 / 58.  4.101
    libavfilter     7. 26.100 /  7. 26.100
    libswscale      5.  2.100 /  5.  2.100
    libswresample   3.  2.100 /  3.  2.100
    libpostproc    55.  2.100 / 55.  2.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'path\to\01.mp4':
    Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.17.101
    Duration: 00:02:42.01, start: 0.000000, bitrate: 5168 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 5000 kb/s, 30.02 fps, 30 tbr, 16k tbn, 60 tbc (default)
    Metadata:
    handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 159 kb/s (default)
    Metadata:
    handler_name    : SoundHandler
    Output #0, h264, to 'path\to\temp1.h264':
    Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.17.101
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, q=2-31, 5000 kb/s, 30.02 fps, 30 tbr, 30 tbn, 30 tbc (default)
    Metadata:
    handler_name    : VideoHandler
    Stream mapping:
    Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    frame= 4862 fps=0.0 q=-1.0 Lsize=   98859kB time=00:02:42.00 bitrate=4999.1kbits/s speed= 351x
    video:98860kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    

    Input: ffmpeg -y -r 30 -i "temp1.h264" -c copy "temp1.mp4"

    Output: (I replaced the real paths with path\to\...)

    ffmpeg version N-91589-ge0539f0349 Copyright (c) 2000-2018 the FFmpeg developers
    built with gcc 8.2.1 (GCC) 20180808
    configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
    libavutil      56. 18.102 / 56. 18.102
    libavcodec     58. 22.101 / 58. 22.101
    libavformat    58. 17.101 / 58. 17.101
    libavdevice    58.  4.101 / 58.  4.101
    libavfilter     7. 26.100 /  7. 26.100
    libswscale      5.  2.100 /  5.  2.100
    libswresample   3.  2.100 /  3.  2.100
    libpostproc    55.  2.100 / 55.  2.100
    Input #0, h264, from 'path\to\temp1.h264':
    Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720, 30 fps, 30 tbr, 1200k tbn, 60 tbc
    Output #0, mp4, to 'path\to\temp1.mp4':
    Metadata:
    encoder         : Lavf58.17.101
    Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1280x720, q=2-31, 30 fps, 30 tbr, 15360 tbn, 30 tbc
    Stream mapping:
    Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    [mp4 @ 0000018e11422ec0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
    [mp4 @ 0000018e11422ec0] pts has no value
    Last message repeated 156 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:00:05.13 bitrate=5719.5kbits/s speed=10.2x
    Last message repeated 153 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:00:10.26 bitrate=4902.4kbits/s speed=10.2x
    Last message repeated 150 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:00:15.30 bitrate=4934.5kbits/s speed=10.2x
    Last message repeated 137 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:00:19.90 bitrate=4953.1kbits/s speed=9.91x
    Last message repeated 152 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:00:25.00 bitrate=4949.3kbits/s speed=9.97x
    Last message repeated 152 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:00:30.10 bitrate=4946.8kbits/s speed=  10x
    Last message repeated 152 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:00:35.20 bitrate=4945.0kbits/s speed=  10x
    Last message repeated 146 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:00:40.10 bitrate=4968.3kbits/s speed=9.99x
    Last message repeated 153 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:00:45.23 bitrate=4960.8kbits/s speed=  10x
    Last message repeated 147 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:00:50.16 bitrate=5016.4kbits/s speed=  10x
    Last message repeated 152 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:00:55.26 bitrate=4970.9kbits/s speed=  10x
    Last message repeated 151 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:00.33 bitrate=4970.6kbits/s speed=  10x
    Last message repeated 153 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:05.46 bitrate=4997.3kbits/s speed=  10x
    Last message repeated 149 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:10.46 bitrate=5029.6kbits/s speed=  10x
    Last message repeated 153 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:15.60 bitrate=5021.0kbits/s speed=  10x
    Last message repeated 151 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:20.66 bitrate=5017.6kbits/s speed=  10x
    Last message repeated 154 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:25.83 bitrate=4984.3kbits/s speed=10.1x
    Last message repeated 151 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:30.90 bitrate=4983.3kbits/s speed=10.1x
    Last message repeated 149 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:35.90 bitrate=4985.9kbits/s speed=10.1x
    Last message repeated 149 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:40.90 bitrate=4988.3kbits/s speed=  10x
    Last message repeated 151 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:45.96 bitrate=5007.0kbits/s speed=10.1x
    Last message repeated 150 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:51.00 bitrate=5006.7kbits/s speed=10.1x
    Last message repeated 150 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:01:56.03 bitrate=5006.4kbits/s speed=10.1x
    Last message repeated 147 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:02:00.96 bitrate=4992.9kbits/s speed=  10x
    Last message repeated 151 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:02:06.03 bitrate=4991.9kbits/s speed=  10x
    Last message repeated 149 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:02:11.03 bitrate=4993.5kbits/s speed=  10x
    Last message repeated 151 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:02:16.10 bitrate=4992.5kbits/s speed=  10x
    Last message repeated 153 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:02:21.23 bitrate=4989.2kbits/s speed=10.1x
    Last message repeated 152 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:02:26.33 bitrate=4987.3kbits/s speed=10.1x
    Last message repeated 149 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:02:31.33 bitrate=5016.5kbits/s speed=  10x
    Last message repeated 153 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:02:36.46 bitrate=5026.2kbits/s speed=10.1x
    Last message repeated 148 times
    [mp4 @ 0000018e11422ec0] pts has no valueB time=00:02:41.43 bitrate=4988.5kbits/s speed=  10x
    Last message repeated 15 times
    frame= 4862 fps=301 q=-1.0 Lsize=   98882kB time=00:02:41.96 bitrate=5001.3kbits/s speed=  10x
    video:98859kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.023950%
    
  • How to setup ffmpeg to read data from pipe permanently ?

    12 août 2018, par roxioam

    I have the following args for mmpeg: -y -f rawvideo -vcodec rawvideo -pixel_format rgba -colorspace bt709 -video_size 1280x720 -i - -vcodec libx264 -preset ultrafast -tune zerolatency -f flv -listen 1 rtmp://127.0.0.1 - ffmpeg is waiting for incoming connections. If nobody is connected to the ffmpeg then ffmpeg doesn't read data from pipe and my data source is hanging. How to say ffmpeg to read data from pipe permanently even without connected clients?