Recherche avancée

Médias (2)

Mot : - Tags -/plugins

Autres articles (42)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

Sur d’autres sites (5803)

  • FFmpeg RTSP crash

    19 septembre 2016, par bot1131357

    I am trying to rtsp stream between two consoles on my computer.

    On console 1 I have :

    ffmpeg -rtbufsize 100M -re -f dshow -s 320x240 -i video="BisonCam, NB Pro" -r 10 -an -f rtsp -rtsp_transport tcp rtsp://127.0.0.1:8554/demo

    On console 2 I have :

    ffplay -rtsp_flags listen -i rtsp://127.0.0.1:8554/demo

    When I run execute both commands, my webcam LED lights up. But then immediately after ffmpeg crashes. Has anyone encountered the same thing ? I could really use some help here.

    This is my ffmpeg configuration on a Windows 10 machine :

    ffmpeg version N-81391-g2a3720b Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 5.4.0 (GCC)
     configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --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-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. 29.100 / 55. 29.100
     libavcodec     57. 54.100 / 57. 54.100
     libavformat    57. 47.101 / 57. 47.101
     libavdevice    57.  0.102 / 57.  0.102
     libavfilter     6. 52.100 /  6. 52.100
     libswscale      4.  1.100 /  4.  1.100
     libswresample   2.  1.100 /  2.  1.100
     libpostproc    54.  0.100 / 54.  0.100
    Hyper fast Audio and Video encoder
    usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

    Use -h to get full help or, even better, run 'man ffmpeg'

    Update

    I tried to stream from a video file, just to be sure that the issue is not related to the webcam.

    #Console 1
    ffmpeg -i out.mp4 -f rtsp -rtsp_transport tcp rtsp://localhost:8888/live.sdp

    #Console 2
    ffplay -rtsp_flags listen rtsp://localhost:8888/live.sdp?tcp

    The output for both consoles are as follows :

    Console 1 :

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.47.101
     Duration: 00:01:02.57, start: 0.000000, bitrate: 172 kb/s
       Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuv422p, 320x240, 169 kb/s, 30 fps, 30 tbr, 10000k tbn, 60 tbc (default)
       Metadata:
         handler_name    : VideoHandler
    [rtsp @ 00000000024c1700] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Output #0, rtsp, to 'rtsp://localhost:8888/live.sdp':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.47.101
       Stream #0:0(und): Video: mpeg4, yuv420p, 320x240, q=2-31, 200 kb/s, 30 fps, 90k tbn, 30 tbc (default)
       Metadata:
         handler_name    : VideoHandler
         encoder         : Lavc57.54.100 mpeg4
       Side data:
         cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
    Press [q] to stop, [?] for help

    Console 2 :

    [rtsp @ 00000000001ccde0] WARNING: Path /live.sdp differs from expected /live.sdp?tcp
       Last message repeated 1 times
    [rtsp @ 00000000001ccde0] Updating control URI to rtsp://localhost:8888/live.sdp
    [rtsp @ 00000000001ccde0] Could not find codec parameters for stream 0 (Video: mpeg4 (Simple Profile), none, 320x240 [SAR 1:1 DAR 4:3]): unspecified pixel format
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    Input #0, rtsp, from 'rtsp://localhost:8888/live.sdp?tcp':
     Metadata:
       title           : No Name
     Duration: N/A, bitrate: N/A
       Stream #0:0: Video: mpeg4 (Simple Profile), none, 320x240 [SAR 1:1 DAR 4:3], 30 tbr, 90k tbn, 30 tbc
       nan M-V:    nan fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0

    The same crash happened with ffmpeg.exe, and ffplay continued waiting for data. I tried the same commands on a Linux virtual machine, and it worked fine.

    Any ideas ?

    Update

    Here’s what I’ve got from gdb :

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.47.101
     Duration: 00:01:02.57, start: 0.000000, bitrate: 172 kb/s
       Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuv422p, 320x240, 169 kb/s, 30 fps, 30 tbr, 10000k tbn, 60 tbc (default)
       Metadata:
         handler_name    : VideoHandler
    [New Thread 15408.0x3f28]
    [New Thread 15408.0x86c]
    [New Thread 15408.0x23c8]
    [New Thread 15408.0xf48]
    [New Thread 15408.0x354c]
    [New Thread 15408.0xf24]
    [New Thread 15408.0x1e4c]
    [New Thread 15408.0x257c]
    [New Thread 15408.0x22a4]
    [New Thread 15408.0xc88]
    [New Thread 15408.0x40bc]
    [New Thread 15408.0x1520]
    [New Thread 15408.0x2584]
    [New Thread 15408.0x1a64]
    [New Thread 15408.0x3934]
    [New Thread 15408.0x4010]
    [New Thread 15408.0x3d28]
    [New Thread 15408.0x288c]
    [New Thread 15408.0x1e50]
    [New Thread 15408.0x630]
    [New Thread 15408.0x4128]
    [New Thread 15408.0x3fa0]
    [New Thread 15408.0x20ec]
    [New Thread 15408.0x4bcc]
    [New Thread 15408.0x17b4]
    [New Thread 15408.0x1204]
    [New Thread 15408.0x2dc8]
    [rtsp @ 0000000000e458e0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    [New Thread 15408.0x1d14]
    Output #0, rtsp, to 'rtsp://localhost:8888/live.sdp':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.47.101
       Stream #0:0(und): Video: mpeg4, yuv420p, 320x240, q=2-31, 200 kb/s, 30 fps, 90k tbn, 30 tbc (default)
       Metadata:
         handler_name    : VideoHandler
         encoder         : Lavc57.54.100 mpeg4
       Side data:
         cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
    Press [q] to stop, [?] for help

    Program received signal SIGSEGV, Segmentation fault.
    0x00007ff82d95292f in avpriv_mpegts_parse_close () from E:\Dev\Library\ffmpeg-20160819-2a3720b-win64-shared\bin\avformat-57.dll

    And the backtrace :

    (gdb) bt
    #0  0x00007ff82d95292f in avpriv_mpegts_parse_close () from E:\Dev\Library\ffmpeg-20160819-2a3720b-win64-shared\bin\avformat-57.dll
    #1  0x00007ff82d956a1b in avformat-57!av_get_output_timestamp () from E:\Dev\Library\ffmpeg-20160819-2a3720b-win64-shared\bin\avformat-57.dll
    #2  0x00007ff82d9a5dbe in ff_rtsp_parse_line () from E:\Dev\Library\ffmpeg-20160819-2a3720b-win64-shared\bin\avformat-57.dll
    #3  0x00007ff82d955e6d in avformat-57!av_interleaved_write_frame () from E:\Dev\Library\ffmpeg-20160819-2a3720b-win64-shared\bin\avformat-57.dll
    #4  0x000000014001af78 in ?? ()
    #5  0x000000014001bda9 in ?? ()
    #6  0x000000014001e642 in ?? ()
    #7  0x00000001400201f1 in ?? ()
    #8  0x000000014004bd47 in ?? ()
    #9  0x00000001400013ed in ?? ()
    #10 0x000000014000152b in ?? ()
    #11 0x00007ff85e2b8102 in KERNEL32!BaseThreadInitThunk () from C:\Windows\system32\kernel32.dll
    #12 0x00007ff85edac264 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
    #13 0x0000000000000000 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)
    (gdb)

    Update 2

    Here’s using ffmpeg_g.exe

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.47.101
     Duration: 00:01:02.57, start: 0.000000, bitrate: 172 kb/s
       Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuv422p, 320x240, 169 kb/s, 30 fps, 30 tbr, 10000k tbn, 60 tbc (default)
       Metadata:
         handler_name    : VideoHandler
    [New Thread 14052.0x3560]
    [New Thread 14052.0x24b4]
    [New Thread 14052.0x3554]
    [New Thread 14052.0x1a3c]
    [New Thread 14052.0x2e64]
    [New Thread 14052.0xd0c]
    [New Thread 14052.0x29e4]
    [New Thread 14052.0x3724]
    [New Thread 14052.0x36f8]
    [New Thread 14052.0x36f0]
    [New Thread 14052.0x78]
    [New Thread 14052.0x1578]
    [New Thread 14052.0x36a0]
    [New Thread 14052.0x3688]
    [New Thread 14052.0x369c]
    [New Thread 14052.0x1f84]
    [New Thread 14052.0x2094]
    [New Thread 14052.0x2f14]
    [New Thread 14052.0x2c54]
    [New Thread 14052.0x3624]
    [New Thread 14052.0x2d44]
    [New Thread 14052.0x3424]
    [New Thread 14052.0x1dd4]
    [New Thread 14052.0x20c4]
    [New Thread 14052.0x34d8]
    [New Thread 14052.0x34e4]
    [New Thread 14052.0x3528]
    [rtsp @ 0000000000f75a80] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    [New Thread 14052.0x3564]
    Output #0, rtsp, to 'rtsp://localhost:8888/live.sdp':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.47.101
       Stream #0:0(und): Video: mpeg4, yuv420p, 320x240, q=2-31, 200 kb/s, 30 fps, 90k tbn, 30 tbc (default)
       Metadata:
         handler_name    : VideoHandler
         encoder         : Lavc57.54.100 mpeg4
       Side data:
         cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
    Press [q] to stop, [?] for help

    Program received signal SIGSEGV, Segmentation fault.
    0x00007ffeecd8292f in avpriv_mpegts_parse_close ()
      from E:\Dev\Library\ffmpeg-20160819-2a3720b-win64-shared\bin\avformat-57.dll
    (gdb) bt
    #0  0x00007ffeecd8292f in avpriv_mpegts_parse_close ()
      from E:\Dev\Library\ffmpeg-20160819-2a3720b-win64-shared\bin\avformat-57.dll
    #1  0x00007ffeecd86a1b in avformat-57!av_get_output_timestamp ()
      from E:\Dev\Library\ffmpeg-20160819-2a3720b-win64-shared\bin\avformat-57.dll
    #2  0x00007ffeecdd5dbe in ff_rtsp_parse_line ()
      from E:\Dev\Library\ffmpeg-20160819-2a3720b-win64-shared\bin\avformat-57.dll
    #3  0x00007ffeecd85e6d in avformat-57!av_interleaved_write_frame
       ()
      from E:\Dev\Library\ffmpeg-20160819-2a3720b-win64-shared\bin\avformat-57.dll
    #4  0x000000014001af78 in ?? ()
    #5  0x000000014001bda9 in ?? ()
    #6  0x000000014001e642 in ?? ()
    #7  0x00000001400201f1 in ?? ()
    #8  0x000000014004bd47 in ?? ()
    #9  0x00000001400013ed in ?? ()
    ---Type <return> to continue, or q <return> to quit---  
    </return></return>

    Update 3

    After building my own ffmpeg using the --enable-debug flag, I’m back at it again. Still getting the same error though. Any ideas ? At this point, it seems like there’s something wrong with my computer settings.

    ffmpeg version N-81392-ga453bbb Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 5.3.1 (GCC) 20160211
     configuration: --prefix=/home/ytan/Dev/build-mingw/ffmpeg/ --enable-cross-compile --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw64 --pkg-config-flags=--static --enable-shared --disable-static --enable-libvpx --enable-libvorbis --enable-libmp3lame --enable-openssl --enable-pic --enable-debug --extra-ldlibflags='-static -pthread'
     libavutil      55. 29.100 / 55. 29.100
     libavcodec     57. 54.100 / 57. 54.100
     libavformat    57. 47.101 / 57. 47.101
     libavdevice    57.  0.102 / 57.  0.102
     libavfilter     6. 52.100 /  6. 52.100
     libswscale      4.  1.100 /  4.  1.100
     libswresample   2.  1.100 /  2.  1.100
    [New Thread 6352.0x1e6c]
    [New Thread 6352.0x12fc]
    [New Thread 6352.0x1f70]
    [New Thread 6352.0x17b0]
    [New Thread 6352.0xdac]
    Input #0, dshow, from 'video=BisonCam, NB Pro':
     Duration: N/A, start: 377578.440000, bitrate: N/A
       Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 320x240, 30 fps, 30 tbr, 10000k tbn, 10000k tbc
    [New Thread 6352.0x544]
    [New Thread 6352.0x1d00]
    [New Thread 6352.0x1f14]
    [New Thread 6352.0x1bb0]
    [New Thread 6352.0xf08]
    [New Thread 6352.0x7c8]
    [New Thread 6352.0x12d0]
    [New Thread 6352.0x504]
    [New Thread 6352.0x1a74]
    [libvpx @ 0000000002f0dc40] v1.6.0-384-g4a25b59
    [rtsp @ 0000000002f0aac0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    [New Thread 6352.0x11dc]
    Output #0, rtsp, to 'rtsp://127.0.0.1:8554/demo':
     Metadata:
       encoder         : Lavf57.47.101
       Stream #0:0: Video: vp8 (libvpx), yuv420p, 320x240, q=-1--1, 100 kb/s, 10 fps, 90k tbn, 10 tbc
       Metadata:
         encoder         : Lavc57.54.100 libvpx
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo (native) -> vp8 (libvpx))
    Press [q] to stop, [?] for help

    Program received signal SIGSEGV, Segmentation fault.
    0x00007ff894fd08af in avpriv_mpegts_parse_close () from E:\Dev\Library\ffmpeg\bin\avformat-57.dll
    (gdb) bt
    #0  0x00007ff894fd08af in avpriv_mpegts_parse_close () from E:\Dev\Library\ffmpeg\bin\avformat-57.dll
    #1  0x00007ff894fd499b in avformat-57!av_get_output_timestamp () from E:\Dev\Library\ffmpeg\bin\avformat-57.dll
    #2  0x00007ff89502dbae in ff_rtsp_parse_line () from E:\Dev\Library\ffmpeg\bin\avformat-57.dll
    #3  0x00007ff894fd3ded in avformat-57!av_interleaved_write_frame () from E:\Dev\Library\ffmpeg\bin\avformat-57.dll
    #4  0x000000014001ab18 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)
    (gdb) thread apply all bt

    Thread 19 (Thread 6352.0x11dc):
    #0  0x00007ff8c4804e74 in ntdll!ZwRemoveIoCompletion () from C:\Windows\SYSTEM32\ntdll.dll
    #1  0x00007ff8c0663e49 in Tcpip4_WSHStringToAddress () from C:\Windows\system32\mswsock.dll
    #2  0x00007ff8c3e58102 in KERNEL32!BaseThreadInitThunk () from C:\Windows\system32\kernel32.dll
    #3  0x00007ff8c47bc264 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
    #4  0x0000000000000000 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)

    Thread 18 (Thread 6352.0x1a74):
    #0  0x00007ff8c4808404 in ntdll!ZwWaitForAlertByThreadId () from C:\Windows\SYSTEM32\ntdll.dll
    #1  0x00007ff8c47c7810 in ntdll!RtlSleepConditionVariableCS () from C:\Windows\SYSTEM32\ntdll.dll
    #2  0x00007ff8c0e2bb47 in SleepConditionVariableCS () from C:\Windows\system32\KernelBase.dll
    #3  0x00007ff896f59420 in avfilter_graph_parse_ptr () from E:\Dev\Library\ffmpeg\bin\avfilter-6.dll
    #4  0x00007ff896f5935f in avfilter_graph_parse_ptr () from E:\Dev\Library\ffmpeg\bin\avfilter-6.dll
    #5  0x00007ff8c38ab097 in msvcrt!_beginthreadex () from C:\Windows\system32\msvcrt.dll
    #6  0x00007ff8c38ab16c in msvcrt!_endthreadex () from C:\Windows\system32\msvcrt.dll
    #7  0x00007ff8c3e58102 in KERNEL32!BaseThreadInitThunk () from C:\Windows\system32\kernel32.dll
    #8  0x00007ff8c47bc264 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
    #9  0x0000000000000000 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)

    Thread 17 (Thread 6352.0x504):
    #0  0x00007ff8c4808404 in ntdll!ZwWaitForAlertByThreadId () from C:\Windows\SYSTEM32\ntdll.dll
    #1  0x00007ff8c47c7810 in ntdll!RtlSleepConditionVariableCS () from C:\Windows\SYSTEM32\ntdll.dll
    #2  0x00007ff8c0e2bb47 in SleepConditionVariableCS () from C:\Windows\system32\KernelBase.dll
    #3  0x00007ff896f59420 in avfilter_graph_parse_ptr () from E:\Dev\Library\ffmpeg\bin\avfilter-6.dll
    #4  0x00007ff896f5935f in avfilter_graph_parse_ptr () from E:\Dev\Library\ffmpeg\bin\avfilter-6.dll
    #5  0x00007ff8c38ab097 in msvcrt!_beginthreadex () from C:\Windows\system32\msvcrt.dll
    ---Type <return> to continue, or q <return> to quit---
    #6  0x00007ff8c38ab16c in msvcrt!_endthreadex () from C:\Windows\system32\msvcrt.dll
    #7  0x00007ff8c3e58102 in KERNEL32!BaseThreadInitThunk () from C:\Windows\system32\kernel32.dll
    #8  0x00007ff8c47bc264 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
    #9  0x0000000000000000 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)

    Thread 16 (Thread 6352.0x12d0):
    #0  0x00007ff8c4808404 in ntdll!ZwWaitForAlertByThreadId () from C:\Windows\SYSTEM32\ntdll.dll
    #1  0x00007ff8c47c7810 in ntdll!RtlSleepConditionVariableCS () from C:\Windows\SYSTEM32\ntdll.dll
    #2  0x00007ff8c0e2bb47 in SleepConditionVariableCS () from C:\Windows\system32\KernelBase.dll
    #3  0x00007ff896f59420 in avfilter_graph_parse_ptr () from E:\Dev\Library\ffmpeg\bin\avfilter-6.dll
    #4  0x00007ff896f5935f in avfilter_graph_parse_ptr () from E:\Dev\Library\ffmpeg\bin\avfilter-6.dll
    #5  0x00007ff8c38ab097 in msvcrt!_beginthreadex () from C:\Windows\system32\msvcrt.dll
    #6  0x00007ff8c38ab16c in msvcrt!_endthreadex () from C:\Windows\system32\msvcrt.dll
    #7  0x00007ff8c3e58102 in KERNEL32!BaseThreadInitThunk () from C:\Windows\system32\kernel32.dll
    #8  0x00007ff8c47bc264 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
    #9  0x0000000000000000 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)

    Thread 15 (Thread 6352.0x7c8):
    #0  0x00007ff8c4808404 in ntdll!ZwWaitForAlertByThreadId () from C:\Windows\SYSTEM32\ntdll.dll
    #1  0x00007ff8c47c7810 in ntdll!RtlSleepConditionVariableCS () from C:\Windows\SYSTEM32\ntdll.dll
    #2  0x00007ff8c0e2bb47 in SleepConditionVariableCS () from C:\Windows\system32\KernelBase.dll
    #3  0x00007ff896f59420 in avfilter_graph_parse_ptr () from E:\Dev\Library\ffmpeg\bin\avfilter-6.dll
    #4  0x00007ff896f5935f in avfilter_graph_parse_ptr () from E:\Dev\Library\ffmpeg\bin\avfilter-6.dll
    #5  0x00007ff8c38ab097 in msvcrt!_beginthreadex () from C:\Windows\system32\msvcrt.dll
    #6  0x00007ff8c38ab16c in msvcrt!_endthreadex () from C:\Windows\system32\msvcrt.dll
    #7  0x00007ff8c3e58102 in KERNEL32!BaseThreadInitThunk () from C:\Windows\system32\kernel32.dll
    #8  0x00007ff8c47bc264 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
    ---Type <return> to continue, or q <return> to quit---
    #9  0x0000000000000000 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)

    Thread 14 (Thread 6352.0xf08):
    #0  0x00007ff8c4808404 in ntdll!ZwWaitForAlertByThreadId () from C:\Windows\SYSTEM32\ntdll.dll
    #1  0x00007ff8c47c7810 in ntdll!RtlSleepConditionVariableCS () from C:\Windows\SYSTEM32\ntdll.dll
    #2  0x00007ff8c0e2bb47 in SleepConditionVariableCS () from C:\Windows\system32\KernelBase.dll
    #3  0x00007ff896f59420 in avfilter_graph_parse_ptr () from E:\Dev\Library\ffmpeg\bin\avfilter-6.dll
    #4  0x00007ff896f5935f in avfilter_graph_parse_ptr () from E:\Dev\Library\ffmpeg\bin\avfilter-6.dll
    #5  0x00007ff8c38ab097 in msvcrt!_beginthreadex () from C:\Windows\system32\msvcrt.dll
    #6  0x00007ff8c38ab16c in msvcrt!_endthreadex () from C:\Windows\system32\msvcrt.dll
    #7  0x00007ff8c3e58102 in KERNEL32!BaseThreadInitThunk () from C:\Windows\system32\kernel32.dll
    #8  0x00007ff8c47bc264 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
    #9  0x0000000000000000 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)

    Thread 13 (Thread 6352.0x1bb0):
    #0  0x00007ff8c4808404 in ntdll!ZwWaitForAlertByThreadId () from C:\Windows\SYSTEM32\ntdll.dll
    #1  0x00007ff8c47c7810 in ntdll!RtlSleepConditionVariableCS () from C:\Windows\SYSTEM32\ntdll.dll
    #2  0x00007ff8c0e2bb47 in SleepConditionVariableCS () from C:\Windows\system32\KernelBase.dll
    #3  0x00007ff896f59420 in avfilter_graph_parse_ptr () from E:\Dev\Library\ffmpeg\bin\avfilter-6.dll
    #4  0x00007ff896f5935f in avfilter_graph_parse_ptr () from E:\Dev\Library\ffmpeg\bin\avfilter-6.dll
    #5  0x00007ff8c38ab097 in msvcrt!_beginthreadex () from C:\Windows\system32\msvcrt.dll
    #6  0x00007ff8c38ab16c in msvcrt!_endthreadex () from C:\Windows\system32\msvcrt.dll
    #7  0x00007ff8c3e58102 in KERNEL32!BaseThreadInitThunk () from C:\Windows\system32\kernel32.dll
    #8  0x00007ff8c47bc264 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
    #9  0x0000000000000000 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)

    ---Type <return> to continue, or q <return> to quit---
    Thread 12 (Thread 6352.0x1f14):
    #0  0x00007ff8c4808404 in ntdll!ZwWaitForAlertByThreadId () from C:\Windows\SYSTEM32\ntdll.dll
    #1  0x00007ff8c47c7810 in ntdll!RtlSleepConditionVariableCS () from C:\Windows\SYSTEM32\ntdll.dll
    #2  0x00007ff8c0e2bb47 in SleepConditionVariableCS () from C:\Windows\system32\KernelBase.dll
    #3  0x00007ff896f59420 in avfilter_graph_parse_ptr () from E:\Dev\Library\ffmpeg\bin\avfilter-6.dll
    #4  0x00007ff896f5935f in avfilter_graph_parse_ptr () from E:\Dev\Library\ffmpeg\bin\avfilter-6.dll
    #5  0x00007ff8c38ab097 in msvcrt!_beginthreadex () from C:\Windows\system32\msvcrt.dll
    #6  0x00007ff8c38ab16c in msvcrt!_endthreadex () from C:\Windows\system32\msvcrt.dll
    #7  0x00007ff8c3e58102 in KERNEL32!BaseThreadInitThunk () from C:\Windows\system32\kernel32.dll
    #8  0x00007ff8c47bc264 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
    #9  0x0000000000000000 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)

    Thread 11 (Thread 6352.0x1d00):
    #0  0x00007ff8c4808404 in ntdll!ZwWaitForAlertByThreadId () from C:\Windows\SYSTEM32\ntdll.dll
    #1  0x00007ff8c47c7810 in ntdll!RtlSleepConditionVariableCS () from C:\Windows\SYSTEM32\ntdll.dll
    #2  0x00007ff8c0e2bb47 in SleepConditionVariableCS () from C:\Windows\system32\KernelBase.dll
    #3  0x00007ff896f59420 in avfilter_graph_parse_ptr () from E:\Dev\Library\ffmpeg\bin\avfilter-6.dll
    #4  0x00007ff896f5935f in avfilter_graph_parse_ptr () from E:\Dev\Library\ffmpeg\bin\avfilter-6.dll
    #5  0x00007ff8c38ab097 in msvcrt!_beginthreadex () from C:\Windows\system32\msvcrt.dll
    #6  0x00007ff8c38ab16c in msvcrt!_endthreadex () from C:\Windows\system32\msvcrt.dll
    #7  0x00007ff8c3e58102 in KERNEL32!BaseThreadInitThunk () from C:\Windows\system32\kernel32.dll
    #8  0x00007ff8c47bc264 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
    #9  0x0000000000000000 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)

    Thread 10 (Thread 6352.0x544):
    #0  0x00007ff8c4808404 in ntdll!ZwWaitForAlertByThreadId () from C:\Windows\SYSTEM32\ntdll.dll
    #1  0x00007ff8c47c7810 in ntdll!RtlSleepConditionVariableCS () from C:\Windows\SYSTEM32\ntdll.dll
    ---Type <return> to continue, or q <return> to quit---
    #2  0x00007ff8c0e2bb47 in SleepConditionVariableCS () from C:\Windows\system32\KernelBase.dll
    #3  0x00007ff896f59420 in avfilter_graph_parse_ptr () from E:\Dev\Library\ffmpeg\bin\avfilter-6.dll
    #4  0x00007ff896f5935f in avfilter_graph_parse_ptr () from E:\Dev\Library\ffmpeg\bin\avfilter-6.dll
    #5  0x00007ff8c38ab097 in msvcrt!_beginthreadex () from C:\Windows\system32\msvcrt.dll
    #6  0x00007ff8c38ab16c in msvcrt!_endthreadex () from C:\Windows\system32\msvcrt.dll
    #7  0x00007ff8c3e58102 in KERNEL32!BaseThreadInitThunk () from C:\Windows\system32\kernel32.dll
    #8  0x00007ff8c47bc264 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
    #9  0x0000000000000000 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)

    Thread 9 (Thread 6352.0xdac):
    #0  0x00007ff8c48058a4 in ntdll!ZwWaitForMultipleObjects () from C:\Windows\SYSTEM32\ntdll.dll
    #1  0x00007ff8c0e53b2f in WaitForMultipleObjectsEx () from C:\Windows\system32\KernelBase.dll
    #2  0x00007ff8a2d4428b in ksproxy!DllUnregisterServer () from C:\Windows\System32\ksproxy.ax
    #3  0x00007ff8c3e58102 in KERNEL32!BaseThreadInitThunk () from C:\Windows\system32\kernel32.dll
    #4  0x00007ff8c47bc264 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
    #5  0x0000000000000000 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)

    Thread 8 (Thread 6352.0x17b0):
    #0  0x00007ff8c4804dd4 in ntdll!ZwWaitForSingleObject () from C:\Windows\SYSTEM32\ntdll.dll
    #1  0x00007ff8c0e2aadf in WaitForSingleObjectEx () from C:\Windows\system32\KernelBase.dll
    #2  0x00007ff8a2d5a8bb in ksproxy!KsResolveRequiredAttributes () from C:\Windows\System32\ksproxy.ax
    #3  0x00007ff8c3e58102 in KERNEL32!BaseThreadInitThunk () from C:\Windows\system32\kernel32.dll
    #4  0x00007ff8c47bc264 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
    #5  0x0000000000000000 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)

    Thread 7 (Thread 6352.0x1f70):
    ---Type <return> to continue, or q <return> to quit---
    #0  0x00007ff8c4804dd4 in ntdll!ZwWaitForSingleObject () from C:\Windows\SYSTEM32\ntdll.dll
    #1  0x00007ff8c0e2aadf in WaitForSingleObjectEx () from C:\Windows\system32\KernelBase.dll
    #2  0x00007ff896241b63 in ?? () from C:\Windows\System32\quartz.dll
    #3  0x00007ff8c3e58102 in KERNEL32!BaseThreadInitThunk () from C:\Windows\system32\kernel32.dll
    #4  0x00007ff8c47bc264 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
    #5  0x0000000000000000 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)

    Thread 6 (Thread 6352.0x12fc):
    #0  0x00007ff8c48058a4 in ntdll!ZwWaitForMultipleObjects () from C:\Windows\SYSTEM32\ntdll.dll
    #1  0x00007ff8c0e53b2f in WaitForMultipleObjectsEx () from C:\Windows\system32\KernelBase.dll
    #2  0x00007ff8c0e53a2e in WaitForMultipleObjects () from C:\Windows\system32\KernelBase.dll
    #3  0x00007ff8a2d5b312 in ksproxy!KsResolveRequiredAttributes () from C:\Windows\System32\ksproxy.ax
    #4  0x00007ff8c3e58102 in KERNEL32!BaseThreadInitThunk () from C:\Windows\system32\kernel32.dll
    #5  0x00007ff8c47bc264 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
    #6  0x0000000000000000 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)

    Thread 5 (Thread 6352.0x1e6c):
    #0  0x00007ff8c32a1f74 in USER32!InvalidateRect () from C:\Windows\system32\user32.dll
    #1  0x00007ff8c3292e15 in USER32!GetMessageW () from C:\Windows\system32\user32.dll
    #2  0x00007ff89628ac1d in QUARTZ!AMGetErrorTextW () from C:\Windows\System32\quartz.dll
    #3  0x00007ff8c3e58102 in KERNEL32!BaseThreadInitThunk () from C:\Windows\system32\kernel32.dll
    #4  0x00007ff8c47bc264 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
    #5  0x0000000000000000 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)

    Thread 4 (Thread 6352.0x1a7c):
    #0  0x00007ff8c4808464 in ntdll!ZwWaitForWorkViaWorkerFactory () from C:\Windows\SYSTEM32\ntdll.dll
    ---Type <return> to continue, or q <return> to quit---
    #1  0x00007ff8c478b2e8 in ntdll!RtlAcquireSRWLockShared () from C:\Windows\SYSTEM32\ntdll.dll
    #2  0x00007ff8c3e58102 in KERNEL32!BaseThreadInitThunk () from C:\Windows\system32\kernel32.dll
    #3  0x00007ff8c47bc264 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
    #4  0x0000000000000000 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)

    Thread 3 (Thread 6352.0x13b0):
    #0  0x00007ff8c4808464 in ntdll!ZwWaitForWorkViaWorkerFactory () from C:\Windows\SYSTEM32\ntdll.dll
    #1  0x00007ff8c478b2e8 in ntdll!RtlAcquireSRWLockShared () from C:\Windows\SYSTEM32\ntdll.dll
    #2  0x00007ff8c3e58102 in KERNEL32!BaseThreadInitThunk () from C:\Windows\system32\kernel32.dll
    #3  0x00007ff8c47bc264 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
    #4  0x0000000000000000 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)

    Thread 2 (Thread 6352.0x214c):
    #0  0x00007ff8c4808464 in ntdll!ZwWaitForWorkViaWorkerFactory () from C:\Windows\SYSTEM32\ntdll.dll
    #1  0x00007ff8c478b2e8 in ntdll!RtlAcquireSRWLockShared () from C:\Windows\SYSTEM32\ntdll.dll
    #2  0x00007ff8c3e58102 in KERNEL32!BaseThreadInitThunk () from C:\Windows\system32\kernel32.dll
    #3  0x00007ff8c47bc264 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
    #4  0x0000000000000000 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)

    Thread 1 (Thread 6352.0xc70):
    #0  0x00007ff894fd08af in avpriv_mpegts_parse_close () from E:\Dev\Library\ffmpeg\bin\avformat-57.dll
    #1  0x00007ff894fd499b in avformat-57!av_get_output_timestamp () from E:\Dev\Library\ffmpeg\bin\avformat-57.dll
    #2  0x00007ff89502dbae in ff_rtsp_parse_line () from E:\Dev\Library\ffmpeg\bin\avformat-57.dll
    #3  0x00007ff894fd3ded in avformat-57!av_interleaved_write_frame () from E:\Dev\Library\ffmpeg\bin\avformat-57.dll
    #4  0x000000014001ab18 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)
    </return></return></return></return></return></return></return></return></return></return></return></return>
  • FFmpeg using png with tranparency and exclusion blending mode

    27 août 2016, par moorej

    I’m trying to use the exclusion blending mode to blend together a video and a png with transparency. I’ve looked around quite a bit but I can’t find a solution that works for me. Here’s the ffmpeg command :

    ffmpeg -i movie.mkv -i text_white_bg_trans.png -filter_complex\
     "[1:v]setsar=sar=1,format=rgba[txt]; [0:v]format=rgba[mo]; [mo][txt]blend=all_mode='exclusion'"  out_exclusion.mkv

    Edit : and the console output :

    ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers
     built with Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
     configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libsoxr --enable-libspeex --enable-libass --enable-libbluray --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --disable-indev=jack --disable-outdev=xv --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --enable-vda --enable-videotoolbox --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid
     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
     libavresample   3.  0.  0 /  3.  0.  0
     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 'movie.mkv':
     Metadata:
       ENCODER         : Lavf57.25.100
     Duration: 00:00:11.88, start: 0.000000, bitrate: 5143 kb/s
       Stream #0:0: Video: h264 (High), yuv420p, 1640x1232, SAR 1:1 DAR 205:154, 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
       Metadata:
         ENCODER         : Lavc57.24.102 libx264
         DURATION        : 00:00:11.880000000
    Input #1, png_pipe, from 'text_white_bg_trans.png':
     Duration: N/A, bitrate: N/A
       Stream #1:0: Video: png, rgba(pc), 1640x1232, 25 tbr, 25 tbn, 25 tbc
    File 'out_exclusion.mkv' already exists. Overwrite ? [y/N] y
    No pixel format specified, yuv444p for H.264 encoding chosen.
    Use -pix_fmt yuv420p for compatibility with outdated media players.
    [libx264 @ 0x7fb10a01e200] using SAR=1/1
    [libx264 @ 0x7fb10a01e200] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 0x7fb10a01e200] profile High 4:4:4 Predictive, level 4.0, 4:4:4 8-bit
    [libx264 @ 0x7fb10a01e200] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, matroska, to 'out_exclusion.mkv':
     Metadata:
       encoder         : Lavf57.25.100
       Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv444p, 1640x1232 [SAR 1:1 DAR 205:154], q=-1--1, 25 fps, 1k tbn, 25 tbc (default)
       Metadata:
         encoder         : Lavc57.24.102 libx264
       Side data:
         unknown side data type 10 (24 bytes)
    Stream mapping:
     Stream #0:0 (h264) -> format
     Stream #1:0 (png) -> setsar
     blend -> Stream #0:0 (libx264)
    Press [q] to stop, [?] for help
    frame=   24 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=  frame=   47 fps= 40 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=  frame=   61 fps= 36 q=28.0 size=      96kB time=00:00:00.12 bitrate=6567.3kbitsframe=   70 fps= 32 q=28.0 size=     264kB time=00:00:00.48 bitrate=4513.9kbitsframe=   83 fps= 30 q=28.0 size=     498kB time=00:00:01.00 bitrate=4079.5kbitsframe=   95 fps= 29 q=28.0 size=     691kB time=00:00:01.48 bitrate=3827.5kbitsframe=  106 fps= 28 q=28.0 size=     896kB time=00:00:01.92 bitrate=3823.7kbitsframe=  118 fps= 27 q=28.0 size=    1132kB time=00:00:02.40 bitrate=3863.7kbitsframe=  130 fps= 26 q=28.0 size=    1338kB time=00:00:02.88 bitrate=3806.1kbitsframe=  142 fps= 26 q=28.0 size=    1588kB time=00:00:03.36 bitrate=3871.7kbitsframe=  154 fps= 25 q=28.0 size=    1808kB time=00:00:03.84 bitrate=3856.9kbitsframe=  166 fps= 25 q=28.0 size=    2062kB time=00:00:04.32 bitrate=3910.9kbitsframe=  178 fps= 24 q=28.0 size=    2328kB time=00:00:04.80 bitrate=3972.8kbitsframe=  190 fps= 24 q=28.0 size=    2620kB time=00:00:05.28 bitrate=4064.7kbitsframe=  203 fps= 24 q=28.0 size=    2886kB time=00:00:05.80 bitrate=4076.0kbitsframe=  215 fps= 24 q=28.0 size=    3132kB time=00:00:06.28 bitrate=4085.9kbitsframe=  226 fps= 24 q=28.0 size=    3357kB time=00:00:06.72 bitrate=4092.5kbitsframe=  238 fps= 24 q=28.0 size=    3589kB time=00:00:07.20 bitrate=4083.9kbitsframe=  250 fps= 23 q=28.0 size=    3794kB time=00:00:07.68 bitrate=4047.3kbitsframe=  260 fps= 23 q=28.0 size=    3978kB time=00:00:08.08 bitrate=4032.7kbitsframe=  272 fps= 23 q=28.0 size=    4212kB time=00:00:08.56 bitrate=4031.0kbitsframe=  284 fps= 23 q=28.0 size=    4453kB time=00:00:09.04 bitrate=4035.3kbitsframe=  295 fps= 23 q=28.0 size=    4632kB time=00:00:09.48 bitrate=4002.9kbitsframe=  297 fps= 20 q=-1.0 Lsize=    5559kB time=00:00:11.80 bitrate=3859.4kbits/s speed=0.808x    
    video:5556kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.053747%
    [libx264 @ 0x7fb10a01e200] frame I:2     Avg QP:21.70  size: 56001
    [libx264 @ 0x7fb10a01e200] frame P:178   Avg QP:23.12  size: 24833
    [libx264 @ 0x7fb10a01e200] frame B:117   Avg QP:25.78  size:  9886
    [libx264 @ 0x7fb10a01e200] consecutive B-frames: 29.3% 49.8% 14.1%  6.7%
    [libx264 @ 0x7fb10a01e200] mb I  I16..4:  9.5% 75.0% 15.5%
    [libx264 @ 0x7fb10a01e200] mb P  I16..4:  4.0% 14.8%  1.0%  P16..4: 43.3% 12.0%  4.5%  0.0%  0.0%    skip:20.4%
    [libx264 @ 0x7fb10a01e200] mb B  I16..4:  0.6%  1.9%  0.1%  B16..8: 48.5%  4.2%  0.3%  direct: 0.6%  skip:43.8%  L0:42.5% L1:55.6% BI: 1.9%
    [libx264 @ 0x7fb10a01e200] 8x8 transform intra:74.8% inter:85.5%
    [libx264 @ 0x7fb10a01e200] coded y,u,v intra: 31.3% 0.0% 0.0% inter: 15.0% 0.0% 0.0%
    [libx264 @ 0x7fb10a01e200] i16 v,h,dc,p: 30% 32% 13% 25%
    [libx264 @ 0x7fb10a01e200] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 22% 32%  3%  4%  3%  6%  3%  3%
    [libx264 @ 0x7fb10a01e200] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 33% 16%  3%  4%  3%  9%  4%  2%
    [libx264 @ 0x7fb10a01e200] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 0x7fb10a01e200] ref P L0: 72.2% 17.9%  7.5%  2.5%
    [libx264 @ 0x7fb10a01e200] ref B L0: 90.9%  8.6%  0.5%
    [libx264 @ 0x7fb10a01e200] ref B L1: 98.6%  1.4%
    [libx264 @ 0x7fb10a01e200] kb/s:3830.94

    Edit : Here’s a frame from the output.

    The output video is B&W rather than the original color (not sure why). The rectangle in the image is located where there is a block of text on a png with a transparent background. The png is the same size as the video.

    I’m expecting something more like this :
    enter image description here

    @Mulvya suggestion fixed the issue with color but I’m still seeing some problems with transparency being handled. I’m attaching a few different images below that each create different problems. All created in Photoshop CC (therein may lie the problem).

    A transparent background with a separate text layer that is then exported by Save->png, Photoshop appears to merge these two layers but differently than when "merge layers" is chosen before export. The exported image looks like the B&W image I posted above but with color.

    The in the second I merge the layers before exporting. It appears the entire image is treated as white.

    In the third I draw "hello" on a transparent layer with a "soft" brush using different grays then export. Transparent areas are rendered as white, gray or translucent areas opaque or with a strange dithering "effect."

    It seems I’m moving outside the realm of StackOverflow, but I’m not sure where this post would be better suited.
    1
    1
    2
    2
    3
    3

  • HTTP Livestreaming with ffmpeg

    25 août 2016, par Hugo14453

    Some context : I have an MKV file, I am attempting to stream it to http://localhost:8090/test.flv as an flv file.

    The stream begins and then immediately ends.

    The command I am using is :

    sudo ffmpeg -re -i input.mkv -c:v libx264 -maxrate 1000k -bufsize 2000k -an -bsf:v h264_mp4toannexb -g 50 http://localhost:8090/test.flv

    A breakdown of what I believe these options do incase this post becomes useful for someone else :

    sudo

    Run as root

    ffmpeg

    The stream command thingy

    -re

    Stream in real-time

    -i input.mkv

    Input option and path to input file

    -c:v libx264

    Use codec libx264 for conversion

    -maxrate 1000k -bufsize 2000k

    No idea, some options for conversion, seems to help

    -an -bsf:v h264_mp4toannexb

    Audio options I think, not sure really. Also seems to help

    -g 50

    Still no idea, maybe frame rateframerateframerateframerate ?

    http://localhost:8090/test.flv

    Output using http protocol to localhost on port 8090 as a file called test.flv

    Anyway the actual issue I have is that it begins to stream for about a second and then immediately ends.

    The mpeg command result :

    ffmpeg version N-80901-gfebc862 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
     configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab
     libavutil      55. 28.100 / 55. 28.100
     libavcodec     57. 48.101 / 57. 48.101
     libavformat    57. 41.100 / 57. 41.100
     libavdevice    57.  0.102 / 57.  0.102
     libavfilter     6. 47.100 /  6. 47.100
     libavresample   3.  0.  0 /  3.  0.  0
     libswscale      4.  1.100 /  4.  1.100
     libswresample   2.  1.100 /  2.  1.100
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, matroska,webm, from 'input.mkv':
     Metadata:
       encoder         : libebml v1.3.0 + libmatroska v1.4.0
       creation_time   : 1970-01-01 00:00:02
     Duration: 00:01:32.26, start: 0.000000, bitrate: 4432 kb/s
       Stream #0:0(eng): Video: h264 (High 10), yuv420p10le, 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
       Stream #0:1(nor): Audio: flac, 48000 Hz, stereo, s16 (default)
    [libx264 @ 0x2e1c380] using SAR=1/1
    [libx264 @ 0x2e1c380] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 0x2e1c380] profile High, level 4.0
    [libx264 @ 0x2e1c380] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=50 keyint_min=5 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=1000 vbv_bufsize=2000 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
    [flv @ 0x2e3f0a0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Output #0, flv, to 'http://localhost:8090/test.flv':
     Metadata:
       encoder         : Lavf57.41.100
       Stream #0:0(eng): Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 23.98 fps, 1k tbn, 23.98 tbc (default)
       Metadata:
         encoder         : Lavc57.48.101 libx264
       Side data:
         cpb: bitrate max/min/avg: 1000000/0/0 buffer size: 2000000 vbv_delay: -1
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    Killed   26 fps= 26 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   0x  

    The ffserver outputs :

    Sat Aug 20 12:40:11 2016 File '/test.flv' not found
    Sat Aug 20 12:40:11 2016 [SERVER IP] - - [POST] "/test.flv HTTP/1.1" 404 189

    The config file is :

    #Sample ffserver configuration file

    # Port on which the server is listening. You must select a different
    # port from your standard HTTP web server if it is running on the same
    # computer.
    Port 8090

    # Address on which the server is bound. Only useful if you have
    # several network interfaces.
    BindAddress 0.0.0.0

    # Number of simultaneous HTTP connections that can be handled. It has
    # to be defined *before* the MaxClients parameter, since it defines the
    # MaxClients maximum limit.
    MaxHTTPConnections 2000

    # Number of simultaneous requests that can be handled. Since FFServer
    # is very fast, it is more likely that you will want to leave this high
    # and use MaxBandwidth, below.
    MaxClients 1000

    # This the maximum amount of kbit/sec that you are prepared to
    # consume when streaming to clients.
    MaxBandwidth 1000

    # Access log file (uses standard Apache log file format)
    # '-' is the standard output.
    CustomLog -

    # Suppress that if you want to launch ffserver as a daemon.
    #NoDaemon


    ##################################################################
    # Definition of the live feeds. Each live feed contains one video
    # and/or audio sequence coming from an ffmpeg encoder or another
    # ffserver. This sequence may be encoded simultaneously with several
    # codecs at several resolutions.

    <feed>

    ACL allow 192.168.0.0 192.168.255.255

    # You must use 'ffmpeg' to send a live feed to ffserver. In this
    # example, you can type:
    #
    #ffmpeg http://localhost:8090/test.ffm

    # ffserver can also do time shifting. It means that it can stream any
    # previously recorded live stream. The request should contain:
    # "http://xxxx?date=[YYYY-MM-DDT][[HH:]MM:]SS[.m...]".You must specify
    # a path where the feed is stored on disk. You also specify the
    # maximum size of the feed, where zero means unlimited. Default:
    # File=/tmp/feed_name.ffm FileMaxSize=5M
    File /tmp/feed1.ffm
    FileMaxSize 200m

    # You could specify
    # ReadOnlyFile /saved/specialvideo.ffm
    # This marks the file as readonly and it will not be deleted or updated.

    # Specify launch in order to start ffmpeg automatically.
    # First ffmpeg must be defined with an appropriate path if needed,
    # after that options can follow, but avoid adding the http:// field
    #Launch ffmpeg

    # Only allow connections from localhost to the feed.
       ACL allow 127.0.0.1

    </feed>


    ##################################################################
    # Now you can define each stream which will be generated from the
    # original audio and video stream. Each format has a filename (here
    # 'test1.mpg'). FFServer will send this stream when answering a
    # request containing this filename.

    <stream>

    # coming from live feed 'feed1'
    Feed feed1.ffm

    # Format of the stream : you can choose among:
    # mpeg       : MPEG-1 multiplexed video and audio
    # mpegvideo  : only MPEG-1 video
    # mp2        : MPEG-2 audio (use AudioCodec to select layer 2 and 3 codec)
    # ogg        : Ogg format (Vorbis audio codec)
    # rm         : RealNetworks-compatible stream. Multiplexed audio and video.
    # ra         : RealNetworks-compatible stream. Audio only.
    # mpjpeg     : Multipart JPEG (works with Netscape without any plugin)
    # jpeg       : Generate a single JPEG image.
    # asf        : ASF compatible streaming (Windows Media Player format).
    # swf        : Macromedia Flash compatible stream
    # avi        : AVI format (MPEG-4 video, MPEG audio sound)
    Format mpeg

    # Bitrate for the audio stream. Codecs usually support only a few
    # different bitrates.
    AudioBitRate 32

    # Number of audio channels: 1 = mono, 2 = stereo
    AudioChannels 2

    # Sampling frequency for audio. When using low bitrates, you should
    # lower this frequency to 22050 or 11025. The supported frequencies
    # depend on the selected audio codec.
    AudioSampleRate 44100

    # Bitrate for the video stream
    VideoBitRate 64

    # Ratecontrol buffer size
    VideoBufferSize 40

    # Number of frames per second
    VideoFrameRate 3

    # Size of the video frame: WxH (default: 160x128)
    # The following abbreviations are defined: sqcif, qcif, cif, 4cif, qqvga,
    # qvga, vga, svga, xga, uxga, qxga, sxga, qsxga, hsxga, wvga, wxga, wsxga,
    # wuxga, woxga, wqsxga, wquxga, whsxga, whuxga, cga, ega, hd480, hd720,
    # hd1080
    VideoSize hd1080

    # Transmit only intra frames (useful for low bitrates, but kills frame rate).
    #VideoIntraOnly

    # If non-intra only, an intra frame is transmitted every VideoGopSize
    # frames. Video synchronization can only begin at an intra frame.
    VideoGopSize 12

    # More MPEG-4 parameters
    # VideoHighQuality
    # Video4MotionVector

    # Choose your codecs:
    #AudioCodec mp2
    #VideoCodec mpeg1video

    # Suppress audio
    #NoAudio

    # Suppress video
    #NoVideo

    #VideoQMin 3
    #VideoQMax 31

    # Set this to the number of seconds backwards in time to start. Note that
    # most players will buffer 5-10 seconds of video, and also you need to allow
    # for a keyframe to appear in the data stream.
    #Preroll 15

    # ACL:

    # You can allow ranges of addresses (or single addresses)
    ACL ALLOW localhost

    # You can deny ranges of addresses (or single addresses)
    #ACL DENY <first address="address">

    # You can repeat the ACL allow/deny as often as you like. It is on a per
    # stream basis. The first match defines the action. If there are no matches,
    # then the default is the inverse of the last ACL statement.
    #
    # Thus 'ACL allow localhost' only allows access from localhost.
    # 'ACL deny 1.0.0.0 1.255.255.255' would deny the whole of network 1 and
    # allow everybody else.

    </first></stream>


    ##################################################################
    # Example streams


    # Multipart JPEG

    #<stream>
    #Feed feed1.ffm
    #Format mpjpeg
    #VideoFrameRate 2
    #VideoIntraOnly
    #NoAudio
    #Strict -1
    #</stream>


    # Single JPEG

    #<stream>
    #Feed feed1.ffm
    #Format jpeg
    #VideoFrameRate 2
    #VideoIntraOnly
    ##VideoSize 352x240
    #NoAudio
    #Strict -1
    #</stream>


    # Flash

    #<stream>
    #Feed feed1.ffm
    #Format swf
    #VideoFrameRate 2
    #VideoIntraOnly
    #NoAudio
    #</stream>


    # ASF compatible

    <stream>
    Feed feed1.ffm
    Format asf
    VideoFrameRate 15
    VideoSize 352x240
    VideoBitRate 256
    VideoBufferSize 40
    VideoGopSize 30
    AudioBitRate 64
    StartSendOnKey
    </stream>


    # MP3 audio

    #<stream>
    #Feed feed1.ffm
    #Format mp2
    #AudioCodec mp3
    #AudioBitRate 64
    #AudioChannels 1
    #AudioSampleRate 44100
    #NoVideo
    #</stream>


    # Ogg Vorbis audio

    #<stream>
    #Feed feed1.ffm
    #Title "Stream title"
    #AudioBitRate 64
    #AudioChannels 2
    #AudioSampleRate 44100
    #NoVideo
    #</stream>


    # Real with audio only at 32 kbits

    #<stream>
    #Feed feed1.ffm
    #Format rm
    #AudioBitRate 32
    #NoVideo
    #NoAudio
    #</stream>


    # Real with audio and video at 64 kbits

    #<stream>
    #Feed feed1.ffm
    #Format rm
    #AudioBitRate 32
    #VideoBitRate 128
    #VideoFrameRate 25
    #VideoGopSize 25
    #NoAudio
    #</stream>


    ##################################################################
    # A stream coming from a file: you only need to set the input
    # filename and optionally a new format. Supported conversions:
    #    AVI -> ASF

    #<stream>
    #File "/usr/local/httpd/htdocs/tlive.rm"
    #NoAudio
    #</stream>

    #<stream>
    #File "/usr/local/httpd/htdocs/test.asf"
    #NoAudio
    #Author "Me"
    #Copyright "Super MegaCorp"
    #Title "Test stream from disk"
    #Comment "Test comment"
    #</stream>


    ##################################################################
    # RTSP examples
    #
    # You can access this stream with the RTSP URL:
    #   rtsp://localhost:5454/test1-rtsp.mpg
    #
    # A non-standard RTSP redirector is also created. Its URL is:
    #   http://localhost:8090/test1-rtsp.rtsp

    #<stream>
    #Format rtp
    #File "/usr/local/httpd/htdocs/test1.mpg"
    #</stream>


    # Transcode an incoming live feed to another live feed,
    # using libx264 and video presets

    #<stream>
    #Format rtp
    #Feed feed1.ffm
    #VideoCodec libx264
    #VideoFrameRate 24
    #VideoBitRate 100
    #VideoSize 480x272
    #AVPresetVideo default
    #AVPresetVideo baseline
    #AVOptionVideo flags +global_header
    #
    #AudioCodec libfaac
    #AudioBitRate 32
    #AudioChannels 2
    #AudioSampleRate 22050
    #AVOptionAudio flags +global_header
    #</stream>

    ##################################################################
    # SDP/multicast examples
    #
    # If you want to send your stream in multicast, you must set the
    # multicast address with MulticastAddress. The port and the TTL can
    # also be set.
    #
    # An SDP file is automatically generated by ffserver by adding the
    # 'sdp' extension to the stream name (here
    # http://localhost:8090/test1-sdp.sdp). You should usually give this
    # file to your player to play the stream.
    #
    # The 'NoLoop' option can be used to avoid looping when the stream is
    # terminated.

    #<stream>
    #Format rtp
    #File "/usr/local/httpd/htdocs/test1.mpg"
    #MulticastAddress 224.124.0.1
    #MulticastPort 5000
    #MulticastTTL 16
    #NoLoop
    #</stream>


    ##################################################################
    # Special streams

    # Server status

    <stream>
    Format status

    # Only allow local people to get the status
    ACL allow localhost
    ACL allow 192.168.0.0 192.168.255.255

    #FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
    </stream>


    # Redirect index.html to the appropriate site

    <redirect>
    URL http://www.ffmpeg.org/
    </redirect>


    #http://www.ffmpeg.org/

    Any help is greatly appreciated, I will do my best draw a picture of the best answer based on their username.