Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Integrating CUDA decoder in libavcodec

    30 janvier 2019, par tmlen

    I have a video decoder that is implemented in CUDA running on the GPU. It can output the uncompressed image either into CUDA buffer (on device) with a settable pixel format, or into a CUDA array (texture memory on device), with the format determined by the CUDA array format.

    Is it possible to integrate this decoder as an external codec into libavcodec, in a way that it does not need to copy the CUDA array to host memory on each frame. Ideally ffplay should be able to directly display the CUDA array's content, without further copy.

    libavcodec seems to support hardware-accelerated decoders by creating a AVHWAccel, but does it also support interoperating with CUDA-based decoders? NVDEC seems to use a different API that accesses a dedicated hardware decoder module on NVidia GPUs. Is there a tutorial or example code that shows how to do this?

  • ffmpeg pixelated logo and video, how do i improve ?

    30 janvier 2019, par S X

    i'm trying to instert a logo over a stream, the logo and stream after i start become very much so pixelated. Is there a way just to insert the logo and not mess with the stream or is there any way to improve the quality of the logo & stream.

    -fflags +genpts -i {INPUT} -i http://sample.com/logo.png -filter_complex "overlay=10:10"
    

    Thank you. =/> FFMPEG COMMAND PICTURE

  • ffmpeg overlay filter adds black background for PNG with transparency

    30 janvier 2019, par Pavel S.

    I'm trying to programmatically add PNG overlay over h264 video.

    Even though PNG image has alpha channel, after I apply filter, on a resulting video this image has black background instead of transparent one. Here's the filter:

    "[in][in2]overlay=15:15[out]"

    I'm using openh264 to decode/encode video, so the pixel format of resulting video is YUV420P. I've tried to explicitly define format in filter:

    [in][in2]overlay=15:15,format=rgba,format=yuv420p[out];

    But no change. ffmpeg: 3.4; openh264: Git (i.e. 1.9.0)

    Thanks in advance.

  • ffmpeg : convert audio-only flv to swf

    30 janvier 2019, par Michael Brewer-Davis

    My Flex application records audio-only FLV files using red5--I'd like to convert these to SWF files so I can embed them in other SWF files. (I could also convert to MP3 and then embed them into SWFs myself, but I'd prefer a one step solution.)

    Anyone have experience doing this?

    What I've tried:

    The following naive ffmpeg command fails:

    > ffmpeg -i 3139747641.flv -vn movie.swf
    FFmpeg version SVN-r21751-snapshot, Copyright (c) 2000-2010 Fabrice Bellard, et al.
      built on Feb 11 2010 09:15:42 with gcc 4.2.1 (SUSE Linux)
      configuration: --enable-gpl --enable-nonfree
      libavutil     50. 9. 0 / 50. 9. 0
      libavcodec    52.53. 0 / 52.53. 0
      libavformat   52.52. 0 / 52.52. 0
      libavdevice   52. 2. 0 / 52. 2. 0
      libswscale     0.10. 0 /  0.10. 0
    [flv @ 0x8a5e3a0]Could not find codec parameters (Video: 0x0000)
    [flv @ 0x8a5e3a0]Estimating duration from bitrate, this may be inaccurate
    Input #0, flv, from '3139747641.flv':
      Metadata:
        audiocodecid    : -1
        duration        : 0
        videocodecid    : -1
        canSeekToEnd    : true
      Duration: 00:00:14.88, start: 0.000000, bitrate: N/A
        Stream #0.0: Video: 0x0000, 1k tbr, 1k tbn, 1k tbc
        Stream #0.1: Audio: nellymoser, 8000 Hz, mono, s16
    Output #0, swf, to 'movie.swf':
        Stream #0.0: Audio: 0x0000, 8000 Hz, mono, s16, 64 kb/s
    Stream mapping:
      Stream #0.1 -> #0.0
    Encoder (codec id 86017) not found for output stream #0.0
    

    I've tried adding a dummy video, but this also failed:

    > ffmpeg -i dummy.mov -i 3139747641.flv movie.swf
        
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'dummy.mov':
      Metadata:
        major_brand     : qt  
        minor_version   : 512
        compatible_brands: qt  
        encoder         : Lavf52.52.0
        encoder-eng     : Lavf52.52.0
      Duration: 00:00:00.10, start: 0.000000, bitrate: 62 kb/s
        Stream #0.0(eng): Video: mpeg4, yuv420p, 10x10 [PAR 1:1 DAR 1:1], 1 kb/s, 10 fps, 10 tbr, 10 tbn, 10 tbc
    [flv @ 0x8a67fa0]Could not find codec parameters (Video: 0x0000)
    [flv @ 0x8a67fa0]Estimating duration from bitrate, this may be inaccurate
    Input #1, flv, from '3139747641.flv':
      Metadata:
        audiocodecid    : -1
        duration        : 0
        videocodecid    : -1
        canSeekToEnd    : true
      Duration: 00:00:14.88, start: 0.000000, bitrate: N/A
        Stream #1.0: Video: 0x0000, 1k tbr, 1k tbn, 1k tbc
        Stream #1.1: Audio: nellymoser, 8000 Hz, mono, s16
    picture size invalid (0x0)
    Cannot allocate temp picture, check pix fmt
    
  • ffmpeg command line for converting flv to mp3 using vbr @128

    30 janvier 2019, par user1910852

    I have extensively searched google and red through the FFmpeg documentation was hoping some one with a bit more experience could help.