Recherche avancée

Médias (1)

Mot : - Tags -/publicité

Autres articles (54)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

Sur d’autres sites (3262)

  • Using ffmpeg to overlay dvdsub

    27 avril 2019, par ib11

    I am trying to overlay a dvdsub file pair (*.idx + *.sub) to a video file.

    This is the batch script with the command line I am trying to use :

    @echo off
    set srcVidFile1="myvideo.mov"
    set srcSubFile=mysub.sub
    set srcIdxFile=mysub.idx
    set destFile=D:\testsub.mp4

    ffmpeg.exe -i %srcVidFile1% -i %srcSubFile% -i %srcIdxFile%
       -filter_complex "[0:v][1:s]overlay" -c:s dvdsub -c:v
       libx264 -crf 24 -c:a aac -b:a 160K -ar 48K -strict -2 -y
       %destFile%

    This however only accepts 720x576 VOBsub files. And also the color gets inverted.

    My video however is 1080p and do have a 1920x1080 VOBsub file pair, but when I trying use them, I get an error sub2video : rectange (xxx xxx xxx xxx) overflowing 720 576

    The full output :

       ffmpeg version N-81516-gbe07c25 Copyright (c) 2000-2016 the FFmpeg developers
         built with gcc 5.4.0 (GCC)
         configuration: --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-libopenh264 --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.101 / 57. 54.101
         libavformat    57. 48.101 / 57. 48.101
         libavdevice    57.  0.102 / 57.  0.102
         libavfilter     6. 58.100 /  6. 58.100
         libswscale      4.  1.100 /  4.  1.100
         libswresample   2.  1.100 /  2.  1.100
         libpostproc    54.  0.100 / 54.  0.100
       Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'myvideo.mov':
         Metadata:
           major_brand     : qt  
           minor_version   : 537199360
           compatible_brands: qt  
           creation_time   : 2017-07-18T19:00:46.000000Z
           timecode        : 00:59:58;00
         Duration: 00:01:19.01, start: 0.000000, bitrate: 146880 kb/s
           Stream #0:0(eng): Video: dnxhd (DNXHD) (AVdn / 0x6E645641), yuv422p(tv, bt709/unknown/unknown), 1920x1080, 145344 kb/s, 29.97 fps,
    29.97 tbr, 29970 tbn, 29970 tbc (default)
           Metadata:
             creation_time   : 2017-07-18T19:00:46.000000Z
             handler_name    : Apple Alias Data Handler
             encoder         : Avid DNxHD Codec
           Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s (default)
           Metadata:
             creation_time   : 2017-07-18T19:00:46.000000Z
             handler_name    : Apple Alias Data Handler
           Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)
           Metadata:
             creation_time   : 2017-07-18T19:01:18.000000Z
             handler_name    : Apple Alias Data Handler
             timecode        : 00:59:58;00
       Input #1, mpeg, from 'mysub.sub':
         Duration: 00:00:52.88, start: 3600.042000, bitrate: 10 kb/s
           Stream #1:0[0x20]: Subtitle: dvd_subtitle
       Input #2, vobsub, from 'mysub.idx':
         Duration: N/A, bitrate: N/A
           Stream #2:0[0x0](en): Subtitle: dvd_subtitle, 1920x1080 (default)
       [mpeg @ 0000000002de4580] sub2video: using 720x576 canvas
       [libx264 @ 00000000005234c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
       [libx264 @ 00000000005234c0] profile High, level 4.0
       [libx264 @ 00000000005234c0] 264 - core 148 r2705 3f5ed56 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - 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=24.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
       [mp4 @ 00000000005218a0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
           Last message repeated 2 times
       Output #0, mp4, to 'D:\testsub.mp4':
         Metadata:
           major_brand     : qt  
           minor_version   : 537199360
           compatible_brands: qt  
           timecode        : 00:59:58;00
           encoder         : Lavf57.48.101
           Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1920x1080, q=-1--1, 0.03 fps, 11988 tbn, 29.97 tbc (default)
           Metadata:
             encoder         : Lavc57.54.101 libx264
           Side data:
             cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
           Stream #0:1(eng): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, delay 1024, padding 0, 160 kb/s (default)
           Metadata:
             creation_time   : 2017-07-18T19:00:46.000000Z
             handler_name    : Apple Alias Data Handler
             encoder         : Lavc57.54.101 aac
           Stream #0:2: Subtitle: dvd_subtitle (dvdsub) ([224][0][0][0] / 0x00E0), 720x480
           Metadata:
             encoder         : Lavc57.54.101 dvdsub
       Stream mapping:
         Stream #0:0 (dnxhd) -> overlay:main (graph 0)
         Stream #1:0 (dvdsub) -> overlay:overlay (graph 0)
         overlay (graph 0) -> Stream #0:0 (libx264)
         Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native))
         Stream #1:0 -> #0:2 (dvd_subtitle (dvdsub) -> dvd_subtitle (dvdsub))
       Press [q] to stop, [?] for help
       sub2video: rectangle (942 858 163 60) overflowing 720 576
           Last message repeated 1 times
       frame=   33 fps=0.0 q=0.0 size=       0kB time=00:00:07.08 bitrate=   0.1kbits/s speed=14.1x    
       frame=   63 fps= 62 q=30.0 size=      10kB time=00:00:07.08 bitrate=  11.1kbits/s speed=7.01x    
       frame=   91 fps= 59 q=30.0 size=      30kB time=00:00:07.08 bitrate=  34.7kbits/s speed= 4.6x    
       frame=  112 fps= 55 q=30.0 size=     197kB time=00:00:07.08 bitrate= 227.9kbits/s speed=3.45x    
       frame=  124 fps= 47 q=30.0 size=     407kB time=00:00:07.08 bitrate= 470.6kbits/s speed=2.69x    
       frame=  137 fps= 44 q=30.0 size=     639kB time=00:00:07.08 bitrate= 738.6kbits/s speed=2.26x    
       frame=  152 fps= 41 q=30.0 size=     861kB time=00:00:07.08 bitrate= 995.4kbits/s speed=1.89x    
       frame=  163 fps= 37 q=30.0 size=    1002kB time=00:00:07.08 bitrate=1158.6kbits/s speed=1.63x    
       frame=  175 fps= 36 q=30.0 size=    1412kB time=00:00:07.08 bitrate=1633.3kbits/s speed=1.46x    
       frame=  187 fps= 35 q=30.0 size=    1642kB time=00:00:07.31 bitrate=1838.4kbits/s speed=1.36x    
       frame=  202 fps= 34 q=30.0 size=    1892kB time=00:00:07.82 bitrate=1979.7kbits/s speed=1.31x    
       frame=  213 fps= 33 q=30.0 size=    2071kB time=00:00:08.19 bitrate=2071.2kbits/s speed=1.26x    
       sub2video: rectangle (419 785 1209 133) overflowing 720 576
       frame=  225 fps= 32 q=30.0 size=    2363kB time=00:00:09.54 bitrate=2028.5kbits/s speed=1.36x    
       frame=  236 fps= 31 q=30.0 size=    2554kB time=00:00:09.54 bitrate=2192.6kbits/s speed=1.26x    
       frame=  249 fps= 31 q=30.0 size=    2760kB time=00:00:09.54 bitrate=2369.7kbits/s speed=1.18x    
       frame=  262 fps= 30 q=30.0 size=    2957kB time=00:00:09.83 bitrate=2463.4kbits/s speed=1.14x    
       frame=  272 fps= 29 q=30.0 size=    3111kB time=00:00:10.15 bitrate=2509.4kbits/s speed=1.09x    
       frame=  283 fps= 29 q=30.0 size=    3796kB time=00:00:10.51 bitrate=2957.1kbits/s speed=1.07x    
       sub2video: rectangle (942 858 163 60) overflowing 720 576
       frame=  289 fps= 28 q=30.0 size=    4144kB time=00:00:13.62 bitrate=2491.4kbits/s speed=1.32x    
       frame=  297 fps= 27 q=30.0 size=    4613kB time=00:00:13.62 bitrate=2773.6kbits/s speed=1.26x    
       frame=  304 fps= 27 q=30.0 size=    5036kB time=00:00:13.62

       [---TRUNCATED REST OF FRAMES---]

       video:94601kB audio:1616kB subtitle:52kB other streams:0kB global headers:0kB muxing overhead: 0.085206%
       [libx264 @ 00000000005234c0] frame I:35    Avg QP:23.92  size:153135
       [libx264 @ 00000000005234c0] frame P:958   Avg QP:26.88  size: 69163
       [libx264 @ 00000000005234c0] frame B:1375  Avg QP:26.60  size: 18365
       [libx264 @ 00000000005234c0] consecutive B-frames: 22.2%  0.7%  1.3% 75.8%
       [libx264 @ 00000000005234c0] mb I  I16..4: 11.8% 84.0%  4.2%
       [libx264 @ 00000000005234c0] mb P  I16..4:  3.2% 22.6%  0.4%  P16..4: 40.9% 10.7%  6.7%  0.0%  0.0%    skip:15.4%
       [libx264 @ 00000000005234c0] mb B  I16..4:  0.3%  2.2%  0.0%  B16..8: 44.9%  2.2%  0.4%  direct: 2.8%  skip:47.2%  L0:45.9% L1:51.3% BI: 2.8%
       [libx264 @ 00000000005234c0] 8x8 transform intra:86.2% inter:89.3%
       [libx264 @ 00000000005234c0] coded y,uvDC,uvAC intra: 76.4% 65.9% 37.2% inter: 23.4% 29.3% 3.5%
       [libx264 @ 00000000005234c0] i16 v,h,dc,p: 18% 42%  5% 34%
       [libx264 @ 00000000005234c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10%  9% 47%  5%  6%  5%  6%  5%  6%
       [libx264 @ 00000000005234c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 18% 17%  7% 11%  9% 10%  6%  7%
       [libx264 @ 00000000005234c0] i8c dc,h,v,p: 63% 16% 16%  5%
       [libx264 @ 00000000005234c0] Weighted P-Frames: Y:5.2% UV:2.9%
       [libx264 @ 00000000005234c0] ref P L0: 50.5% 14.8% 22.5% 11.6%  0.6%
       [libx264 @ 00000000005234c0] ref B L0: 87.9%  9.7%  2.4%
       [libx264 @ 00000000005234c0] ref B L1: 95.2%  4.8%
       [libx264 @ 00000000005234c0] kb/s:9808.13
       [aac @ 0000000000524340] Qavg: 574.088

    I would like to input the 1920x1080 VOBsub file pair and overlay it on the 1080p video with 24bit original colors.

    Can somebody give me the correct command line for this ?

  • Using ffmpeg to overlay dvdsub subtitles

    7 mai 2019, par ib11

    I am trying to overlay a dvdsub file pair (*.idx + *.sub) to a video file.

    Here is the sub pair.

    This is the batch script with the command line I am trying to use :

    @echo off
    set srcVidFile1="myvideo.mov"
    set srcSubFile=mysub.sub
    set srcIdxFile=mysub.idx
    set destFile=D:\testsub.mp4

    ffmpeg.exe -i %srcVidFile1% -i %srcSubFile% -i %srcIdxFile%
       -filter_complex "[0:v][1:s]overlay" -c:s dvdsub -c:v
       libx264 -crf 24 -c:a aac -b:a 160K -ar 48K -strict -2 -y
       %destFile%

    This however only accepts 720x576 VOBsub files. And also the color gets inverted.

    My video however is 1080p and do have a 1920x1080 VOBsub file pair, but when I trying use them, I get an error sub2video : rectange (xxx xxx xxx xxx) overflowing 720 576

    Looks like adding -canvas_size 1920x1080 before -i %srcSubFile% handles the error on the canvas size. But I can’t figure out the color.

    The full output :

       ffmpeg version N-81516-gbe07c25 Copyright (c) 2000-2016 the FFmpeg developers
         built with gcc 5.4.0 (GCC)
         configuration: --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-libopenh264 --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.101 / 57. 54.101
         libavformat    57. 48.101 / 57. 48.101
         libavdevice    57.  0.102 / 57.  0.102
         libavfilter     6. 58.100 /  6. 58.100
         libswscale      4.  1.100 /  4.  1.100
         libswresample   2.  1.100 /  2.  1.100
         libpostproc    54.  0.100 / 54.  0.100
       Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'myvideo.mov':
         Metadata:
           major_brand     : qt  
           minor_version   : 537199360
           compatible_brands: qt  
           creation_time   : 2017-07-18T19:00:46.000000Z
           timecode        : 00:59:58;00
         Duration: 00:01:19.01, start: 0.000000, bitrate: 146880 kb/s
           Stream #0:0(eng): Video: dnxhd (DNXHD) (AVdn / 0x6E645641), yuv422p(tv, bt709/unknown/unknown), 1920x1080, 145344 kb/s, 29.97 fps,
    29.97 tbr, 29970 tbn, 29970 tbc (default)
           Metadata:
             creation_time   : 2017-07-18T19:00:46.000000Z
             handler_name    : Apple Alias Data Handler
             encoder         : Avid DNxHD Codec
           Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s (default)
           Metadata:
             creation_time   : 2017-07-18T19:00:46.000000Z
             handler_name    : Apple Alias Data Handler
           Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)
           Metadata:
             creation_time   : 2017-07-18T19:01:18.000000Z
             handler_name    : Apple Alias Data Handler
             timecode        : 00:59:58;00
       Input #1, mpeg, from 'mysub.sub':
         Duration: 00:00:52.88, start: 3600.042000, bitrate: 10 kb/s
           Stream #1:0[0x20]: Subtitle: dvd_subtitle
       Input #2, vobsub, from 'mysub.idx':
         Duration: N/A, bitrate: N/A
           Stream #2:0[0x0](en): Subtitle: dvd_subtitle, 1920x1080 (default)
       [mpeg @ 0000000002de4580] sub2video: using 720x576 canvas
       [libx264 @ 00000000005234c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
       [libx264 @ 00000000005234c0] profile High, level 4.0
       [libx264 @ 00000000005234c0] 264 - core 148 r2705 3f5ed56 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - 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=24.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
       [mp4 @ 00000000005218a0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
           Last message repeated 2 times
       Output #0, mp4, to 'D:\testsub.mp4':
         Metadata:
           major_brand     : qt  
           minor_version   : 537199360
           compatible_brands: qt  
           timecode        : 00:59:58;00
           encoder         : Lavf57.48.101
           Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1920x1080, q=-1--1, 0.03 fps, 11988 tbn, 29.97 tbc (default)
           Metadata:
             encoder         : Lavc57.54.101 libx264
           Side data:
             cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
           Stream #0:1(eng): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, delay 1024, padding 0, 160 kb/s (default)
           Metadata:
             creation_time   : 2017-07-18T19:00:46.000000Z
             handler_name    : Apple Alias Data Handler
             encoder         : Lavc57.54.101 aac
           Stream #0:2: Subtitle: dvd_subtitle (dvdsub) ([224][0][0][0] / 0x00E0), 720x480
           Metadata:
             encoder         : Lavc57.54.101 dvdsub
       Stream mapping:
         Stream #0:0 (dnxhd) -> overlay:main (graph 0)
         Stream #1:0 (dvdsub) -> overlay:overlay (graph 0)
         overlay (graph 0) -> Stream #0:0 (libx264)
         Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native))
         Stream #1:0 -> #0:2 (dvd_subtitle (dvdsub) -> dvd_subtitle (dvdsub))
       Press [q] to stop, [?] for help
       sub2video: rectangle (942 858 163 60) overflowing 720 576
           Last message repeated 1 times
       frame=   33 fps=0.0 q=0.0 size=       0kB time=00:00:07.08 bitrate=   0.1kbits/s speed=14.1x    
       frame=   63 fps= 62 q=30.0 size=      10kB time=00:00:07.08 bitrate=  11.1kbits/s speed=7.01x    
       frame=   91 fps= 59 q=30.0 size=      30kB time=00:00:07.08 bitrate=  34.7kbits/s speed= 4.6x    
       frame=  112 fps= 55 q=30.0 size=     197kB time=00:00:07.08 bitrate= 227.9kbits/s speed=3.45x    
       frame=  124 fps= 47 q=30.0 size=     407kB time=00:00:07.08 bitrate= 470.6kbits/s speed=2.69x    
       frame=  137 fps= 44 q=30.0 size=     639kB time=00:00:07.08 bitrate= 738.6kbits/s speed=2.26x    
       frame=  152 fps= 41 q=30.0 size=     861kB time=00:00:07.08 bitrate= 995.4kbits/s speed=1.89x    
       frame=  163 fps= 37 q=30.0 size=    1002kB time=00:00:07.08 bitrate=1158.6kbits/s speed=1.63x    
       frame=  175 fps= 36 q=30.0 size=    1412kB time=00:00:07.08 bitrate=1633.3kbits/s speed=1.46x    
       frame=  187 fps= 35 q=30.0 size=    1642kB time=00:00:07.31 bitrate=1838.4kbits/s speed=1.36x    
       frame=  202 fps= 34 q=30.0 size=    1892kB time=00:00:07.82 bitrate=1979.7kbits/s speed=1.31x    
       frame=  213 fps= 33 q=30.0 size=    2071kB time=00:00:08.19 bitrate=2071.2kbits/s speed=1.26x    
       sub2video: rectangle (419 785 1209 133) overflowing 720 576
       frame=  225 fps= 32 q=30.0 size=    2363kB time=00:00:09.54 bitrate=2028.5kbits/s speed=1.36x    
       frame=  236 fps= 31 q=30.0 size=    2554kB time=00:00:09.54 bitrate=2192.6kbits/s speed=1.26x    
       frame=  249 fps= 31 q=30.0 size=    2760kB time=00:00:09.54 bitrate=2369.7kbits/s speed=1.18x    
       frame=  262 fps= 30 q=30.0 size=    2957kB time=00:00:09.83 bitrate=2463.4kbits/s speed=1.14x    
       frame=  272 fps= 29 q=30.0 size=    3111kB time=00:00:10.15 bitrate=2509.4kbits/s speed=1.09x    
       frame=  283 fps= 29 q=30.0 size=    3796kB time=00:00:10.51 bitrate=2957.1kbits/s speed=1.07x    
       sub2video: rectangle (942 858 163 60) overflowing 720 576
       frame=  289 fps= 28 q=30.0 size=    4144kB time=00:00:13.62 bitrate=2491.4kbits/s speed=1.32x    
       frame=  297 fps= 27 q=30.0 size=    4613kB time=00:00:13.62 bitrate=2773.6kbits/s speed=1.26x    
       frame=  304 fps= 27 q=30.0 size=    5036kB time=00:00:13.62

       [---TRUNCATED REST OF FRAMES---]

       video:94601kB audio:1616kB subtitle:52kB other streams:0kB global headers:0kB muxing overhead: 0.085206%
       [libx264 @ 00000000005234c0] frame I:35    Avg QP:23.92  size:153135
       [libx264 @ 00000000005234c0] frame P:958   Avg QP:26.88  size: 69163
       [libx264 @ 00000000005234c0] frame B:1375  Avg QP:26.60  size: 18365
       [libx264 @ 00000000005234c0] consecutive B-frames: 22.2%  0.7%  1.3% 75.8%
       [libx264 @ 00000000005234c0] mb I  I16..4: 11.8% 84.0%  4.2%
       [libx264 @ 00000000005234c0] mb P  I16..4:  3.2% 22.6%  0.4%  P16..4: 40.9% 10.7%  6.7%  0.0%  0.0%    skip:15.4%
       [libx264 @ 00000000005234c0] mb B  I16..4:  0.3%  2.2%  0.0%  B16..8: 44.9%  2.2%  0.4%  direct: 2.8%  skip:47.2%  L0:45.9% L1:51.3% BI: 2.8%
       [libx264 @ 00000000005234c0] 8x8 transform intra:86.2% inter:89.3%
       [libx264 @ 00000000005234c0] coded y,uvDC,uvAC intra: 76.4% 65.9% 37.2% inter: 23.4% 29.3% 3.5%
       [libx264 @ 00000000005234c0] i16 v,h,dc,p: 18% 42%  5% 34%
       [libx264 @ 00000000005234c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10%  9% 47%  5%  6%  5%  6%  5%  6%
       [libx264 @ 00000000005234c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 18% 17%  7% 11%  9% 10%  6%  7%
       [libx264 @ 00000000005234c0] i8c dc,h,v,p: 63% 16% 16%  5%
       [libx264 @ 00000000005234c0] Weighted P-Frames: Y:5.2% UV:2.9%
       [libx264 @ 00000000005234c0] ref P L0: 50.5% 14.8% 22.5% 11.6%  0.6%
       [libx264 @ 00000000005234c0] ref B L0: 87.9%  9.7%  2.4%
       [libx264 @ 00000000005234c0] ref B L1: 95.2%  4.8%
       [libx264 @ 00000000005234c0] kb/s:9808.13
       [aac @ 0000000000524340] Qavg: 574.088

    Original subtitle :
    Subtitle image

    Rendered frame :
    Rendered frame

    I would like to input the 1920x1080 VOBsub file pair and overlay it on the 1080p video with 24bit original colors.

    Can somebody give me the correct command line for this ?

    And as it seems that the VOBsub are low res, is there any means that allow overlaying 1920x1080 24 bit pngs using ffmpeg ?

  • ffmpeg : trim / concat results in different length videos

    4 mai 2019, par Mads Lee Jensen

    Im experimenting with the trim and concat filters.

    I wanted to simply split up a video into X chunks, and concat it again. I expected the result would be a video with same frames / duration.

    So i have a video encoded with 1 fps and contains 3 frames, the duration of this video is 3 seconds.

    i run the following script

    ffmpeg -y -i fps.mp4 -an -filter_complex "[0:v]trim=0:1[v1];[0:v]trim=1:2[v2];[0:v]trim=2:3[v3];[v1][v2][v3]  concat=n=3:v=1 [out]" -map [out] out.mp4

    The result is a video with a duration of 4 seconds to inspect the problem i called :

    ffprobe -print_format json -show_frames out.mp4

    It shows that there is now 4 frames ?? (here is the dump)

    ffprobe version 4.1.3 Copyright (c) 2007-2019 the FFmpeg developers
     built with Apple LLVM version 10.0.1 (clang-1001.0.46.3)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/openjdk-12.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/openjdk-12.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
     libavutil      56. 22.100 / 56. 22.100
     libavcodec     58. 35.100 / 58. 35.100
     libavformat    58. 20.100 / 58. 20.100
     libavdevice    58.  5.100 / 58.  5.100
     libavfilter     7. 40.101 /  7. 40.101
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  3.100 /  5.  3.100
     libswresample   3.  3.100 /  3.  3.100
     libpostproc    55.  3.100 / 55.  3.100
    {
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.20.100
     Duration: 00:00:04.00, start: 0.000000, bitrate: 4 kb/s
       Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv444p, 100x100, 2 kb/s, 1 fps, 1 tbr, 16384 tbn, 2 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       "frames": [
           {
               "media_type": "video",
               "stream_index": 0,
               "key_frame": 1,
               "pkt_pts": 0,
               "pkt_pts_time": "0.000000",
               "pkt_dts": 0,
               "pkt_dts_time": "0.000000",
               "best_effort_timestamp": 0,
               "best_effort_timestamp_time": "0.000000",
               "pkt_duration": 16384,
               "pkt_duration_time": "1.000000",
               "pkt_pos": "48",
               "pkt_size": "857",
               "width": 100,
               "height": 100,
               "pix_fmt": "yuv444p",
               "pict_type": "I",
               "coded_picture_number": 0,
               "display_picture_number": 0,
               "interlaced_frame": 0,
               "top_field_first": 0,
               "repeat_pict": 0,
               "chroma_location": "left"
           },
           {
               "media_type": "video",
               "stream_index": 0,
               "key_frame": 0,
               "pkt_pts": 16384,
               "pkt_pts_time": "1.000000",
               "pkt_dts": 16384,
               "pkt_dts_time": "1.000000",
               "best_effort_timestamp": 16384,
               "best_effort_timestamp_time": "1.000000",
               "pkt_duration": 16384,
               "pkt_duration_time": "1.000000",
               "pkt_pos": "1053",
               "pkt_size": "146",
               "width": 100,
               "height": 100,
               "pix_fmt": "yuv444p",
               "pict_type": "B",
               "coded_picture_number": 2,
               "display_picture_number": 0,
               "interlaced_frame": 0,
               "top_field_first": 0,
               "repeat_pict": 0,
               "chroma_location": "left"
           },
           {
               "media_type": "video",
               "stream_index": 0,
               "key_frame": 0,
               "pkt_pts": 32768,
               "pkt_pts_time": "2.000000",
               "best_effort_timestamp": 32768,
               "best_effort_timestamp_time": "2.000000",
               "pkt_duration": 16384,
               "pkt_duration_time": "1.000000",
               "pkt_pos": "1199",
               "pkt_size": "19",
               "width": 100,
               "height": 100,
               "pix_fmt": "yuv444p",
               "pict_type": "B",
               "coded_picture_number": 3,
               "display_picture_number": 0,
               "interlaced_frame": 0,
               "top_field_first": 0,
               "repeat_pict": 0,
               "chroma_location": "left"
           },
           {
               "media_type": "video",
               "stream_index": 0,
               "key_frame": 0,
               "pkt_pts": 49152,
               "pkt_pts_time": "3.000000",
               "best_effort_timestamp": 49152,
               "best_effort_timestamp_time": "3.000000",
               "pkt_duration": 16384,
               "pkt_duration_time": "1.000000",
               "pkt_pos": "905",
               "pkt_size": "148",
               "width": 100,
               "height": 100,
               "pix_fmt": "yuv444p",
               "pict_type": "P",
               "coded_picture_number": 1,
               "display_picture_number": 0,
               "interlaced_frame": 0,
               "top_field_first": 0,
               "repeat_pict": 0,
               "chroma_location": "left"
           }
       ]
    }

    I tried different things, and everything seems to work fine if i split a 2 second video (still 1 fps) up and concat again. But something goes wrong when going beyond that ?

    Here is output from ffmpeg -i fps.mp4

    ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
     built with Apple LLVM version 10.0.1 (clang-1001.0.46.3)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/openjdk-12.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/openjdk-12.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
     libavutil      56. 22.100 / 56. 22.100
     libavcodec     58. 35.100 / 58. 35.100
     libavformat    58. 20.100 / 58. 20.100
     libavdevice    58.  5.100 / 58.  5.100
     libavfilter     7. 40.101 /  7. 40.101
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  3.100 /  5.  3.100
     libswresample   3.  3.100 /  3.  3.100
     libpostproc    55.  3.100 / 55.  3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'scripts/fps.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.20.100
     Duration: 00:00:03.00, start: 0.000000, bitrate: 7 kb/s
       Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), gbrp(tv, gbr/unknown/unknown), 100x100, 4 kb/s, 1 fps, 1 tbr, 16384 tbn, 2 tbc (default)
       Metadata:
         handler_name    : VideoHandler