Recherche avancée

Médias (91)

Autres articles (21)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

Sur d’autres sites (4410)

  • ffmpeg - splitting, overlaying and selecting frame range in multiple input/outputs with complex video filter producing empty output

    11 octobre 2017, par Josep Carner

    I am trying to use ffmpeg to apply multiple filters -single input, multiple outputs-. In concrete, I am splitting the output in two, then applying an overlaying patch to one of those streams, split again and select a time range. The command I am using is :

      ffmpeg \
       -i ./dataset_test/videos/jz_10_huron_barstow.mkv \
       -an \
       -sn \
       -loglevel error \
       -filter_complex \
           "[0:v]split=2[L_in][F_in];
            [L_in]
               crop=226:307:21:74,scale=200x200,setdar=200:200,split=2\
            [L_in_0][L_in_1];\
            color=#808080:226x307,setpts=PTS-STARTPTS[L_PATCH];\
            [F_in][L_PATCH]
               overlay=21:74:shortest=1,scale=200x200,setdar=200:200,split=2\
            [F_in_0][F_in_1];\
            [F_in_0]select='between(t\,32\,212)',select='not(mod(n\,20))',setpts=(PTS-STARTPTS)/20[F_0];\
            [F_in_1]select='between(t\,213\,393)',select='not(mod(n\,20))',setpts=(PTS-STARTPTS)/20[F_1];\
            [L_in_0]select='between(t\,32\,212)',select='not(mod(n\,20))',setpts=(PTS-STARTPTS)/20[L_0];\
            [L_in_1]select='between(t\,213\,393)',select='not(mod(n\,20))',setpts=(PTS-STARTPTS)/20[L_1]\
            "\
       -map [F_0] -an -sn ./out/jz_10_huron_barstow/F/0_F.mp4\
       -map [F_1] -an -sn ./out/jz_10_huron_barstow/F/1_F.mp4\
       -map [L_0] -an -sn ./out/jz_10_huron_barstow/L/0_L.mp4\
       -map [L_1] -an -sn ./out/jz_10_huron_barstow/L/1_L.mp4\

    For some reason, 0_F.mp4 is empty and 1_F.mp4 is cropped. My intuition is that it has something to do with applying splitting + overlaying + selecting. I think at some point some filter before select is changing the PTS of the frames in some way select is not properly discarding them, but I honestly don’t know how to solve it. Some insights :

    1. L_0 and L_1 are fine (no overlay is used in those two)

    2. If I suppress L outputs everything works fine (no "split" is needed at the beginning)

    Could someone provide some light ? I don’t really know what else to try.
    The logs with loglevel 40 are (some repeated lines ommited) :

    ffmpeg version 2.8.1 Copyright (c) 2000-2015 the FFmpeg developers
     built with Apple LLVM version 9.0.0 (clang-900.0.37)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.1_1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-vda
     libavutil      54. 31.100 / 54. 31.100
     libavcodec     56. 60.100 / 56. 60.100
     libavformat    56. 40.101 / 56. 40.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 40.101 /  5. 40.101
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  2.101 /  1.  2.101
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, matroska,webm, from './dataset_test/videos/jz_10_huron_barstow.mkv':
     Metadata:
       ENCODER         : Lavf57.66.104
     Duration: 00:24:04.14, start: 0.000000, bitrate: 2117 kb/s
       Stream #0:0: Video: h264 (Main), 1 reference frame, yuv420p, 1440x900 (1440x912) [SAR 1:1 DAR 8:5], 30 fps, 30 tbr, 1k tbn, 60 tbc (default)
       Metadata:
         ENCODER         : Lavc57.83.100 h264_nvenc
         DURATION        : 00:24:04.102000000
       Stream #0:1: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s (default)
       Metadata:
         ENCODER         : Lavc57.83.100 ac3
         DURATION        : 00:24:04.135000000
    [Parsed_scale_2 @ 0x7fdfd2403d20] w:200 h:200 flags:'bilinear' interl:0
    [Parsed_setdar_3 @ 0x7fdfd240ad80] num:den syntax is deprecated, please use num/den or named options instead
    [Parsed_color_5 @ 0x7fdfd24096a0] size:226x307 rate:25/1 duration:-1.000000 sar:1/1
    [Parsed_scale_8 @ 0x7fdfd24092c0] w:200 h:200 flags:'bilinear' interl:0
    [Parsed_setdar_9 @ 0x7fdfd240b360] num:den syntax is deprecated, please use num/den or named options instead
    [Parsed_scale_2 @ 0x7fdfd2509b00] w:200 h:200 flags:'bilinear' interl:0
    [Parsed_setdar_3 @ 0x7fdfd25092c0] num:den syntax is deprecated, please use num/den or named options instead
    [Parsed_color_5 @ 0x7fdfd250a520] size:226x307 rate:25/1 duration:-1.000000 sar:1/1
    [Parsed_scale_8 @ 0x7fdfd250b620] w:200 h:200 flags:'bilinear' interl:0
    [Parsed_setdar_9 @ 0x7fdfd250a960] num:den syntax is deprecated, please use num/den or named options instead
    [graph 0 input from stream 0:0 @ 0x7fdfd2511360] w:1440 h:900 pixfmt:yuv420p tb:1/1000 fr:30/1 sar:1/1 sws_param:flags=2
    [Parsed_crop_1 @ 0x7fdfd2509c80] w:1440 h:900 sar:1/1 -> w:226 h:306 sar:1/1
    [Parsed_scale_2 @ 0x7fdfd2509b00] w:226 h:306 fmt:yuv420p sar:1/1 -> w:200 h:200 fmt:yuv420p sar:113/153 flags:0x2
    [Parsed_setdar_3 @ 0x7fdfd25092c0] w:200 h:200 dar:113/153 sar:113/153 -> dar:1/1 sar:1/1
    [Parsed_select_21 @ 0x7fdfd250a760] TB:0.001000 FRAME_RATE:30.000000 SAMPLE_RATE:nan
    [Parsed_select_18 @ 0x7fdfd250a080] TB:0.001000 FRAME_RATE:30.000000 SAMPLE_RATE:nan
    [Parsed_color_5 @ 0x7fdfd250a520] TB:0.040000 FRAME_RATE:25.000000 SAMPLE_RATE:nan
    [Parsed_overlay_7 @ 0x7fdfd250b020] main w:1440 h:900 fmt:yuv420p overlay w:226 h:306 fmt:yuva420p eof_action:endall
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Selected 1/1000 time base
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Sync level 2
    [Parsed_scale_8 @ 0x7fdfd250b620] w:1440 h:900 fmt:yuv420p sar:1/1 -> w:200 h:200 fmt:yuv420p sar:8/5 flags:0x2
    [Parsed_setdar_9 @ 0x7fdfd250a960] w:200 h:200 dar:8/5 sar:8/5 -> dar:1/1 sar:1/1
    [Parsed_select_15 @ 0x7fdfd250dd00] TB:0.001000 FRAME_RATE:30.000000 SAMPLE_RATE:nan
    [Parsed_select_12 @ 0x7fdfd250ca60] TB:0.001000 FRAME_RATE:30.000000 SAMPLE_RATE:nan
    [libx264 @ 0x7fdfd4005e00] using SAR=1/1
    [libx264 @ 0x7fdfd4005e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
    [libx264 @ 0x7fdfd4005e00] profile High, level 1.2
    [libx264 @ 0x7fdfd4005e00] 264 - core 148 r2601 a0cd7d3 - 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=6 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=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
    [libx264 @ 0x7fdfd400f600] using SAR=1/1
    [libx264 @ 0x7fdfd400f600] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
    [libx264 @ 0x7fdfd400f600] profile High, level 1.2
    [libx264 @ 0x7fdfd400f600] 264 - core 148 r2601 a0cd7d3 - 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=6 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=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
    [libx264 @ 0x7fdfd4018e00] using SAR=1/1
    [libx264 @ 0x7fdfd4018e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
    [libx264 @ 0x7fdfd4018e00] profile High, level 1.2
    [libx264 @ 0x7fdfd4018e00] 264 - core 148 r2601 a0cd7d3 - 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=6 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=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
    [libx264 @ 0x7fdfd4022600] using SAR=1/1
    [libx264 @ 0x7fdfd4022600] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
    [libx264 @ 0x7fdfd4022600] profile High, level 1.2
    [libx264 @ 0x7fdfd4022600] 264 - core 148 r2601 a0cd7d3 - 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=6 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=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, mp4, to './out/jz_10_huron_barstow/F/0_F.mp4':
     Metadata:
       encoder         : Lavf56.40.101
       Stream #0:0: Video: h264 (libx264), -1 reference frame ([33][0][0][0] / 0x0021), yuv420p, 200x200 [SAR 1:1 DAR 1:1], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
       Metadata:
         encoder         : Lavc56.60.100 libx264
    Output #1, mp4, to './out/jz_10_huron_barstow/F/1_F.mp4':
     Metadata:
       encoder         : Lavf56.40.101
       Stream #1:0: Video: h264 (libx264), -1 reference frame ([33][0][0][0] / 0x0021), yuv420p, 200x200 [SAR 1:1 DAR 1:1], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
       Metadata:
         encoder         : Lavc56.60.100 libx264
    Output #2, mp4, to './out/jz_10_huron_barstow/L/0_L.mp4':
     Metadata:
       encoder         : Lavf56.40.101
       Stream #2:0: Video: h264 (libx264), -1 reference frame ([33][0][0][0] / 0x0021), yuv420p, 200x200 [SAR 1:1 DAR 1:1], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
       Metadata:
         encoder         : Lavc56.60.100 libx264
    Output #3, mp4, to './out/jz_10_huron_barstow/L/1_L.mp4':
     Metadata:
       encoder         : Lavf56.40.101
       Stream #3:0: Video: h264 (libx264), -1 reference frame ([33][0][0][0] / 0x0021), yuv420p, 200x200 [SAR 1:1 DAR 1:1], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
       Metadata:
         encoder         : Lavc56.60.100 libx264
    Stream mapping:
     Stream #0:0 (h264) -> split
     setpts -> Stream #0:0 (libx264)
     setpts -> Stream #1:0 (libx264)
     setpts -> Stream #2:0 (libx264)
     setpts -> Stream #3:0 (libx264)
    Press [q] to stop, [?] for help
    [swscaler @ 0x7fdfd3800000] Warning: data is not aligned! This can lead to a speedloss
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 210 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 262 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 239 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 195 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 211 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 255 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 148 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 174 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 182 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 193 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:00.26 bitrate=   1.4kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 156 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:00.53 bitrate=   0.7kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 154 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:00.76 bitrate=   0.5kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 155 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:01.03 bitrate=   0.4kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 231 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:01.43 bitrate=   0.3kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 260 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:01.86 bitrate=   0.2kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 256 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:02.30 bitrate=   0.2kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 209 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:02.63 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 253 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:03.06 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 160 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:03.33 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 189 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:03.63 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 201 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:03.96 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 251 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:04.40 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 246 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:04.80 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 257 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:05.23 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 258 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:05.66 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 251 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:06.10 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 274 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:06.56 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 282 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:07.03 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 185 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    frame=    0 fps=0.0 q=0.0 q=29.0 q=29.0 q=29.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    frame=    0 fps=0.0 q=0.0 q=29.0 q=29.0 q=29.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    frame=    0 fps=0.0 q=0.0 q=29.0 q=29.0 q=29.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    frame=    0 fps=0.0 q=0.0 q=29.0 q=29.0 q=29.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    frame=    0 fps=0.0 q=0.0 q=29.0 q=29.0 q=29.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    […]  
    frame=    0 fps=0.0 q=0.0 q=29.0 q=29.0 q=29.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Sync level 1
    No more output streams to write to, finishing.
    frame=    0 fps=0.0 q=0.0 Lq=-1.0 q=-1.0 q=-1.0 size=       0kB time=00:00:08.93 bitrate=   0.2kbits/s    
    video:620kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    Input file #0 (./dataset_test/videos/jz_10_huron_barstow.mkv):
     Input stream #0:0 (video): 43323 packets read (347030822 bytes); 43323 frames decoded;
     Input stream #0:1 (audio): 4 packets read (3072 bytes);
     Total: 43327 packets (347033894 bytes) demuxed
    Output file #0 (./out/jz_10_huron_barstow/F/0_F.mp4):
     Output stream #0:0 (video): 0 frames encoded; 0 packets muxed (0 bytes);
     Total: 0 packets (0 bytes) muxed
    Output file #1 (./out/jz_10_huron_barstow/F/1_F.mp4):
     Output stream #1:0 (video): 270 frames encoded; 270 packets muxed (309743 bytes);
     Total: 270 packets (309743 bytes) muxed
    Output file #2 (./out/jz_10_huron_barstow/L/0_L.mp4):
     Output stream #2:0 (video): 270 frames encoded; 270 packets muxed (169687 bytes);
     Total: 270 packets (169687 bytes) muxed
    Output file #3 (./out/jz_10_huron_barstow/L/1_L.mp4):
     Output stream #3:0 (video): 270 frames encoded; 270 packets muxed (155502 bytes);
     Total: 270 packets (155502 bytes) muxed
    [libx264 @ 0x7fdfd400f600] frame I:2     Avg QP:25.08  size:  3204
    [libx264 @ 0x7fdfd400f600] frame P:140   Avg QP:26.63  size:  1426
    [libx264 @ 0x7fdfd400f600] frame B:128   Avg QP:28.64  size:   805
    [libx264 @ 0x7fdfd400f600] consecutive B-frames:  5.2% 94.8%  0.0%  0.0%
    [libx264 @ 0x7fdfd400f600] mb I  I16..4:  8.6% 62.7% 28.7%
    [libx264 @ 0x7fdfd400f600] mb P  I16..4:  2.5% 12.5%  3.4%  P16..4: 39.2% 21.4%  9.3%  0.0%  0.0%    skip:11.6%
    [libx264 @ 0x7fdfd400f600] mb B  I16..4:  0.5%  4.0%  1.0%  B16..8: 36.5% 16.7%  4.0%  direct: 5.5%  skip:31.8%  L0:43.4% L1:46.9% BI: 9.7%
    [libx264 @ 0x7fdfd400f600] 8x8 transform intra:68.6% inter:67.7%
    [libx264 @ 0x7fdfd400f600] coded y,uvDC,uvAC intra: 63.1% 48.6% 17.9% inter: 34.5% 21.1% 3.6%
    [libx264 @ 0x7fdfd400f600] i16 v,h,dc,p: 24% 23% 12% 41%
    [libx264 @ 0x7fdfd400f600] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 19% 26%  7%  5%  5%  7%  6%  8%
    [libx264 @ 0x7fdfd400f600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 29% 18%  6%  6%  5%  5%  4%  5%
    [libx264 @ 0x7fdfd400f600] i8c dc,h,v,p: 63% 21% 14%  3%
    [libx264 @ 0x7fdfd400f600] Weighted P-Frames: Y:14.3% UV:1.4%
    [libx264 @ 0x7fdfd400f600] ref P L0: 49.2% 20.4% 17.3% 11.2%  1.9%
    [libx264 @ 0x7fdfd400f600] ref B L0: 75.4% 24.6%
    [libx264 @ 0x7fdfd400f600] kb/s:274.71
    [libx264 @ 0x7fdfd4018e00] frame I:2     Avg QP:23.87  size:  2294
    [libx264 @ 0x7fdfd4018e00] frame P:133   Avg QP:25.45  size:   864
    [libx264 @ 0x7fdfd4018e00] frame B:135   Avg QP:28.99  size:   367
    [libx264 @ 0x7fdfd4018e00] consecutive B-frames: 17.4% 38.5% 27.8% 16.3%
    [libx264 @ 0x7fdfd4018e00] mb I  I16..4: 14.5% 54.1% 31.4%
    [libx264 @ 0x7fdfd4018e00] mb P  I16..4:  6.4%  9.6%  2.1%  P16..4: 33.3% 16.7%  5.9%  0.0%  0.0%    skip:26.0%
    [libx264 @ 0x7fdfd4018e00] mb B  I16..4:  1.6%  2.0%  0.3%  B16..8: 29.6%  9.3%  1.4%  direct: 2.2%  skip:53.6%  L0:41.9% L1:51.4% BI: 6.7%
    [libx264 @ 0x7fdfd4018e00] 8x8 transform intra:52.8% inter:73.8%
    [libx264 @ 0x7fdfd4018e00] coded y,uvDC,uvAC intra: 40.7% 41.7% 8.9% inter: 20.7% 16.6% 0.2%
    [libx264 @ 0x7fdfd4018e00] i16 v,h,dc,p: 22% 50%  8% 21%
    [libx264 @ 0x7fdfd4018e00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 30% 23%  6%  2%  2%  5%  5%  9%
    [libx264 @ 0x7fdfd4018e00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 29% 14%  5%  3%  4%  5%  6%  5%
    [libx264 @ 0x7fdfd4018e00] i8c dc,h,v,p: 62% 23% 12%  3%
    [libx264 @ 0x7fdfd4018e00] Weighted P-Frames: Y:1.5% UV:0.8%
    [libx264 @ 0x7fdfd4018e00] ref P L0: 56.1% 15.8% 17.7% 10.2%  0.1%
    [libx264 @ 0x7fdfd4018e00] ref B L0: 75.4% 20.8%  3.9%
    [libx264 @ 0x7fdfd4018e00] ref B L1: 92.6%  7.4%
    [libx264 @ 0x7fdfd4018e00] kb/s:150.22
    [libx264 @ 0x7fdfd4022600] frame I:2     Avg QP:23.86  size:  2208
    [libx264 @ 0x7fdfd4022600] frame P:139   Avg QP:24.90  size:   784
    [libx264 @ 0x7fdfd4022600] frame B:129   Avg QP:28.25  size:   322
    [libx264 @ 0x7fdfd4022600] consecutive B-frames: 17.8% 50.4% 15.6% 16.3%
    [libx264 @ 0x7fdfd4022600] mb I  I16..4: 15.7% 53.3% 31.1%
    [libx264 @ 0x7fdfd4022600] mb P  I16..4:  8.3%  9.9%  1.5%  P16..4: 33.8% 14.8%  5.0%  0.0%  0.0%    skip:26.7%
    [libx264 @ 0x7fdfd4022600] mb B  I16..4:  1.6%  1.8%  0.1%  B16..8: 28.8%  8.2%  1.1%  direct: 2.1%  skip:56.4%  L0:45.5% L1:47.6% BI: 6.9%
    [libx264 @ 0x7fdfd4022600] 8x8 transform intra:50.6% inter:75.8%
    [libx264 @ 0x7fdfd4022600] coded y,uvDC,uvAC intra: 34.0% 44.3% 10.0% inter: 18.8% 17.9% 0.4%
    [libx264 @ 0x7fdfd4022600] i16 v,h,dc,p: 18% 54%  8% 20%
    [libx264 @ 0x7fdfd4022600] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 28% 26%  6%  2%  2%  4%  5%  8%
    [libx264 @ 0x7fdfd4022600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 31% 14%  4%  2%  2%  3%  7%  5%
    [libx264 @ 0x7fdfd4022600] i8c dc,h,v,p: 60% 25% 13%  2%
    [libx264 @ 0x7fdfd4022600] Weighted P-Frames: Y:2.2% UV:0.7%
    [libx264 @ 0x7fdfd4022600] ref P L0: 57.9% 16.8% 16.1%  8.9%  0.2%
    [libx264 @ 0x7fdfd4022600] ref B L0: 76.5% 21.0%  2.5%
    [libx264 @ 0x7fdfd4022600] ref B L1: 95.0%  5.0%
    [libx264 @ 0x7fdfd4022600] kb/s:137.61
  • ffmpeg-python Unable to open .srt, .vtt files. Error initializing filter 'subtitles' with args ... Error initializing complex filters

    3 novembre 2022, par Batuhan Yılmaz

    I'm trying to build a web app where users can upload a video file and a transcript as .srt or .vtt file to get a video with subtitles. But keep getting an error with the subtitles.
    
Here's my code :

    


    import streamlit as st
from streamlit_lottie import st_lottie
from utils import write_vtt, write_srt
import ffmpeg
import requests
from typing import Iterator
from io import StringIO
import numpy as np
import pathlib
import os
import components.authenticate as authenticate


st.set_page_config(page_title="Auto Subtitled Video Generator", page_icon=":movie_camera:", layout="wide")

# Define a function that we can use to load lottie files from a link.
@st.cache(allow_output_mutation=True)
def load_lottieurl(url: str):
    r = requests.get(url)
    if r.status_code != 200:
        return None
    return r.json()


APP_DIR = pathlib.Path(__file__).parent.absolute()

LOCAL_DIR = APP_DIR / "local_transcript"
LOCAL_DIR.mkdir(exist_ok=True)
save_dir = LOCAL_DIR / "output"
save_dir.mkdir(exist_ok=True)


col1, col2 = st.columns([1, 3])
with col1:
    lottie = load_lottieurl("https://assets1.lottiefiles.com/packages/lf20_HjK9Ol.json")
    st_lottie(lottie)

with col2:
    st.write("""
    ## Auto Subtitled Video Generator 
    ##### Upload a video file and a transcript as .srt file and get a video with subtitles.""")


def getSubs(segments: Iterator[dict], format: str, maxLineWidth: int) -> str:
    segmentStream = StringIO()

    if format == 'vtt':
        write_vtt(segments, file=segmentStream, maxLineWidth=maxLineWidth)
    elif format == 'srt':
        write_srt(segments, file=segmentStream, maxLineWidth=maxLineWidth)
    else:
        raise Exception("Unknown format " + format)

    segmentStream.seek(0)
    return segmentStream.read()


def generate_subtitled_video(uploaded_file):
    with open(f"{save_dir}/input.mp4", "wb") as f:
            f.write(uploaded_file.read())
    audio = ffmpeg.input(f"{save_dir}/input.mp4")
    audio = ffmpeg.output(audio, f"{save_dir}/output.wav", acodec="pcm_s16le", ac=1, ar="16k")
    ffmpeg.run(audio, overwrite_output=True)


def main():
    video_file = st.file_uploader("File", type=["mp4", "avi", "mov", "mkv"])
    # get the name of the input_file
    if video_file is not None:
        filename = video_file.name[:-4]
    else:
        filename = None
    transcript_file = st.file_uploader("Transcript", type=["srt", "vtt"])
    if transcript_file is not None:
        transcript_name = transcript_file.name
    else:
        transcript_name = None
    if video_file is not None and transcript_file is not None:
        if transcript_name[-3:] == "vtt":
            with open(f"{save_dir}/transcript.vtt", "wb") as f:
                f.writelines(transcript_file)
                f.close()
            with open(os.path.join(os.getcwd(), f"{save_dir}/transcript.vtt"), "rb") as f:
                vtt_file = f.read()
            if st.button("Generate Video with Subtitles"):
                generate_subtitled_video(video_file)
                video_file = ffmpeg.input(f"{save_dir}/input.mp4")
                audio_file = ffmpeg.input(f"{save_dir}/output.wav")
                ffmpeg.concat(video_file.filter("subtitles", vtt_file), audio_file, v=1, a=1).output("final.mp4").global_args('-report').run(quiet=True, overwrite_output=True)
                video_with_subs = open("final.mp4", "rb")
                col3, col4 = st.columns([3, 1])
                with col3:
                    st.video(video_with_subs)
                with col4:
                    st.download_button(label="Download Video with Subtitles",
                                        data=video_with_subs,
                                        file_name=f"{filename}_with_subs.mp4")
            else:
                st.error("Please upload a video file and a transcript file.")
        elif transcript_name[-3:] == "srt":
            with open(f"{save_dir}/transcript.srt", "wb") as f:
                f.writelines(transcript_file)
                f.close()
            with open(os.path.join(os.getcwd(), f"{save_dir}/transcript.srt"), "rb") as f:
                srt_file = f.read()
                f.close()
            if st.button("Generate Video with Subtitles"):
                generate_subtitled_video(video_file)
                video_file = ffmpeg.input(f"{save_dir}/input.mp4")
                audio_file = ffmpeg.input(f"{save_dir}/output.wav")
                ffmpeg.concat(video_file.filter("subtitles", f'{save_dir}/transcript.srt'), audio_file, v=1, a=1).output("final.mp4").global_args('-report').run(quiet=True, overwrite_output=True)
                video_with_subs = open("final.mp4", "rb")

                col3, col4 = st.columns([3, 1])
                with col3:
                    st.video(video_with_subs)
                with col4:
                    st.download_button(label="Download Video with Subtitles",
                                        data=video_with_subs,
                                        file_name=f"{filename}_with_subs.mp4")
        else:
            st.error("Please upload a .srt or .vtt file")
    else:
        st.info("Please upload a video file and a transcript file")


if __name__ == "__main__":
    authenticate.set_st_state_vars()
    if st.session_state["authenticated"]:
        main()
        authenticate.button_logout()
    else:
        st.info("Please log in or sign up to use the app.")
        authenticate.button_login()
        



    


    I couldn't figure out what I'm doing wrong. Please help

    


    And the log file of ffmpeg error :

    


    ffmpeg started on 2022-11-03 at 21:29:27
Report written to "ffmpeg-20221103-212927.log"
Log level: 48
Command line:
ffmpeg -i "C:\\Users\\batuh\\Auto-Subtitled-Video-Generator - Copy2\\pages\\local_transcript\\output/input.mp4" -i "C:\\Users\\batuh\\Auto-Subtitled-Video-Generator - Copy2\\pages\\local_transcript\\output/output.wav" -filter_complex "[0]subtitles=C\\\\\\\\\\\\:\\\\\\\\\\\\\\\\Users\\\\\\\\\\\\\\\\batuh\\\\\\\\\\\\\\\\Auto-Subtitled-Video-Generator - Copy2\\\\\\\\\\\\\\\\pages\\\\\\\\\\\\\\\\local_transcript\\\\\\\\\\\\\\\\output/transcript.srt[s0];[s0][1]concat=a=1:n=1:v=1[s1]" -map "[s1]" final.mp4 -report -y
ffmpeg version 2022-10-24-git-d79c240196-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.1.0 (Rev2, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libshaderc --enable-vulkan --ena  libavutil      57. 39.101 / 57. 39.101
  libavcodec     59. 51.100 / 59. 51.100
  libavformat    59. 34.101 / 59. 34.101
  libavdevice    59.  8.101 / 59.  8.101
  libavfilter     8. 49.101 /  8. 49.101
  libswscale      6.  8.112 /  6.  8.112
  libswresample   4.  9.100 /  4.  9.100
  libpostproc    56.  7.100 / 56.  7.100
Splitting the commandline.
Reading option '-i' ... matched as input url with argument 'C:\Users\batuh\Auto-Subtitled-Video-Generator - Copy2\pages\local_transcript\output/input.mp4'.
Reading option '-i' ... matched as input url with argument 'C:\Users\batuh\Auto-Subtitled-Video-Generator - Copy2\pages\local_transcript\output/output.wav'.
Reading option '-filter_complex' ... matched as option 'filter_complex' (create a complex filtergraph) with argument '[0]subtitles=C\\\\\\:\\\\\\\\Users\\\\\\\\batuh\\\\\\\\Auto-Subtitled-Video-Generator - Copy2\\\\\\\\pages\\\\\\\\local_transcript\\\\\\\\output/transcript.srt[s0];[s0][1]concat=a=1:n=1:v=1[s1]'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '[s1]'.
Reading option 'final.mp4' ... matched as output url.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option filter_complex (create a complex filtergraph) with argument [0]subtitles=C\\\\\\:\\\\\\\\Users\\\\\\\\batuh\\\\\\\\Auto-Subtitled-Video-Generator - Copy2\\\\\\\\pages\\\\\\\\local_transcript\\\\\\\\output/transcript.srt[s0];[s0][1]concat=a=1:n=1:v=1[s1].
Applying option report (generate a report) with argument 1.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url C:\Users\batuh\Auto-Subtitled-Video-Generator - Copy2\pages\local_transcript\output/input.mp4.
Successfully parsed a group of options.
Opening an input file: C:\Users\batuh\Auto-Subtitled-Video-Generator - Copy2\pages\local_transcript\output/input.mp4.
[NULL @ 000001baaeb55300] Opening 'C:\Users\batuh\Auto-Subtitled-Video-Generator - Copy2\pages\local_transcript\output/input.mp4' for reading
[file @ 000001baaeb55800] Setting default whitelist 'file,crypto,data'
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001baaeb55300] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001baaeb55300] ISO: File Type Major Brand: mp42
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001baaeb55300] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001baaeb55300] Processing st: 0, edit list 0 - media time: 3003, duration: 8201160
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001baaeb55300] Offset DTS by 3003 to make first pts zero.
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001baaeb55300] Setting codecpar->delay to 1 for stream st: 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001baaeb55300] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001baaeb55300] Before avformat_find_stream_info() pos: 34044 bytes read:65536 seeks:0 nb_streams:2
[h264 @ 000001baaeb68bc0] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 000001baaeb68bc0] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 000001baaeb68bc0] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 000001baaeb68bc0] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 000001baaeb68bc0] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 000001baaeb68bc0] Format yuv420p chosen by get_format().
[h264 @ 000001baaeb68bc0] Reinit context to 1280x720, pix_fmt: yuv420p
[h264 @ 000001baaeb68bc0] no picture 
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001baaeb55300] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001baaeb55300] After avformat_find_stream_info() pos: 109849 bytes read:131072 seeks:0 frames:15
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\batuh\Auto-Subtitled-Video-Generator - Copy2\pages\local_transcript\output/input.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2016-08-24T03:50:36.000000Z
  Duration: 00:01:31.14, start: 0.000000, bitrate: 1149 kb/s
  Stream #0:0[0x1](und), 14, 1/90000: Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 1020 kb/s, 29.97 fps, 29.97 tbr, 90k tbn (default)
    Metadata:
      creation_time   : 2016-08-24T03:50:36.000000Z
      handler_name    : ISO Media file produced by Google Inc.
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](und), 1, 1/44100: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
    Metadata:
      creation_time   : 2016-08-24T03:50:36.000000Z
      handler_name    : ISO Media file produced by Google Inc.
      vendor_id       : [0][0][0][0]
Successfully opened the file.
Parsing a group of options: input url C:\Users\batuh\Auto-Subtitled-Video-Generator - Copy2\pages\local_transcript\output/output.wav.
Successfully parsed a group of options.
Opening an input file: C:\Users\batuh\Auto-Subtitled-Video-Generator - Copy2\pages\local_transcript\output/output.wav.
[NULL @ 000001baaec0e8c0] Opening 'C:\Users\batuh\Auto-Subtitled-Video-Generator - Copy2\pages\local_transcript\output/output.wav' for reading
[file @ 000001baaf24ee40] Setting default whitelist 'file,crypto,data'
[wav @ 000001baaec0e8c0] Format wav probed with size=2048 and score=99
[wav @ 000001baaec0e8c0] Before avformat_find_stream_info() pos: 78 bytes read:65614 seeks:1 nb_streams:1
[wav @ 000001baaec0e8c0] probing stream 0 pp:32
[wav @ 000001baaec0e8c0] probing stream 0 pp:31
[wav @ 000001baaec0e8c0] probing stream 0 pp:30
[wav @ 000001baaec0e8c0] probing stream 0 pp:29
[wav @ 000001baaec0e8c0] probing stream 0 pp:28
[wav @ 000001baaec0e8c0] probing stream 0 pp:27
[wav @ 000001baaec0e8c0] probing stream 0 pp:26
[wav @ 000001baaec0e8c0] probing stream 0 pp:25
[wav @ 000001baaec0e8c0] probing stream 0 pp:24
[wav @ 000001baaec0e8c0] probing stream 0 pp:23
[wav @ 000001baaec0e8c0] probing stream 0 pp:22
[wav @ 000001baaec0e8c0] probing stream 0 pp:21
[wav @ 000001baaec0e8c0] probing stream 0 pp:20
[wav @ 000001baaec0e8c0] probing stream 0 pp:19
[wav @ 000001baaec0e8c0] probing stream 0 pp:18
[wav @ 000001baaec0e8c0] probing stream 0 pp:17
[wav @ 000001baaec0e8c0] probing stream 0 pp:16
[wav @ 000001baaec0e8c0] probing stream 0 pp:15
[wav @ 000001baaec0e8c0] probing stream 0 pp:14
[wav @ 000001baaec0e8c0] probing stream 0 pp:13
[wav @ 000001baaec0e8c0] probing stream 0 pp:12
[wav @ 000001baaec0e8c0] probing stream 0 pp:11
[wav @ 000001baaec0e8c0] probing stream 0 pp:10
[wav @ 000001baaec0e8c0] probing stream 0 pp:9
[wav @ 000001baaec0e8c0] probing stream 0 pp:8
[wav @ 000001baaec0e8c0] probing stream 0 pp:7
[wav @ 000001baaec0e8c0] probing stream 0 pp:6
[wav @ 000001baaec0e8c0] probing stream 0 pp:5
[wav @ 000001baaec0e8c0] probing stream 0 pp:4
[wav @ 000001baaec0e8c0] probing stream 0 pp:3
[wav @ 000001baaec0e8c0] probing stream 0 pp:2
[wav @ 000001baaec0e8c0] probing stream 0 pp:1
[wav @ 000001baaec0e8c0] probed stream 0
[wav @ 000001baaec0e8c0] parser not found for codec pcm_s16le, packets or times may be invalid.
[wav @ 000001baaec0e8c0] max_analyze_duration 5000000 reached at 5120000 microseconds st:0
[wav @ 000001baaec0e8c0] After avformat_find_stream_info() pos: 176206 bytes read:262222 seeks:1 frames:42
Guessed Channel Layout for Input Stream #1.0 : mono
Input #1, wav, from 'C:\Users\batuh\Auto-Subtitled-Video-Generator - Copy2\pages\local_transcript\output/output.wav':
  Metadata:
    encoder         : Lavf59.34.101
  Duration: 00:01:31.14, bitrate: 256 kb/s
  Stream #1:0, 42, 1/16000: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, 1 channels, s16, 256 kb/s
Successfully opened the file.
[Parsed_subtitles_0 @ 000001baaeb7d040] Setting 'filename' to value 'C\:\\Users\\batuh\\Auto-Subtitled-Video-Generator - Copy2\\pages\\local_transcript\\output/transcript.srt'
[Parsed_subtitles_0 @ 000001baaeb7d040] libass API version: 0x1600010
[Parsed_subtitles_0 @ 000001baaeb7d040] libass source: commit: 0.16.0-48-g75a3dbac9bd41842a4d00b0d42c9513e2c8aec67
[Parsed_subtitles_0 @ 000001baaeb7d040] Raster: FreeType 2.12.1
[Parsed_subtitles_0 @ 000001baaeb7d040] Shaper: FriBidi 1.0.12 (SIMPLE) HarfBuzz-ng 5.3.1 (COMPLEX)
[Parsed_subtitles_0 @ 000001baaeb7d040] Initialized
[NULL @ 000001baaf473400] Opening 'C\:\\Users\\batuh\\Auto-Subtitled-Video-Generator - Copy2\\pages\\local_transcript\\output/transcript.srt' for reading
[file @ 000001baaeb7dc40] Setting default whitelist 'file,crypto,data'
[Parsed_subtitles_0 @ 000001baaeb7d040] Unable to open C\:\\Users\\batuh\\Auto-Subtitled-Video-Generator - Copy2\\pages\\local_transcript\\output/transcript.srt
[AVFilterGraph @ 000001baaf24ef40] Error initializing filter 'subtitles' with args 'C\\\:\\\\Users\\\\batuh\\\\Auto-Subtitled-Video-Generator - Copy2\\\\pages\\\\local_transcript\\\\output/transcript.srt'
Error initializing complex filters.
Invalid argument
[AVIOContext @ 000001baaeb5f880] Statistics: 131072 bytes read, 0 seeks
[AVIOContext @ 000001baaf10b2c0] Statistics: 262222 bytes read, 1 seeks



    


    I tried doing all ffmpeg related things under the generate_subtitled_video function but couldn't make it work either.

    


  • How to icecast a merged incoming icecast audio stream with local webcam ?

    20 juillet 2020, par pimpmypixel

    I have my webcam attached via usb to a server running ubuntu with icecast, webcamoid and ffmpeg. Then I have a laptop broadcasting the audio to the server.
I have tried with a mix of icecast (also via liquidsoap) and ffmpeg bash scripts, but I am not able to access a merged video.
I'm sure there must be some common/best practice to even a simple setup like this, but it's confusing to me which of them does what.
Is icecast able to do do it by itself or with relaying ? or is ffmpeg supposed to merge everything ? or is it a combination of the two ?