Recherche avancée

Médias (1)

Mot : - Tags -/iphone

Autres articles (111)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • 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.

  • Que fait exactement ce script ?

    18 janvier 2011, par

    Ce script est écrit en bash. Il est donc facilement utilisable sur n’importe quel serveur.
    Il n’est compatible qu’avec une liste de distributions précises (voir Liste des distributions compatibles).
    Installation de dépendances de MediaSPIP
    Son rôle principal est d’installer l’ensemble des dépendances logicielles nécessaires coté serveur à savoir :
    Les outils de base pour pouvoir installer le reste des dépendances Les outils de développements : build-essential (via APT depuis les dépôts officiels) ; (...)

Sur d’autres sites (9502)

  • FFmpeg Time Skipping after concat

    18 septembre 2017, par Manul Hüttinger

    i am trying to concatenate videos and in my resulting Videos i have the issue that at the concat edges my video is skipping/glitching.


    General Workflow

    in general my workflow looks like this

    1. Stream via ffmpeg
    2. capture stream and segment all 2 mins in to TS files
    3. concat TS file to MP4 video
    4. cut MP4 video at the desired Timestamps

    Detailed Look at Step 4

    as i am handling 2-hours+ videos i don’t want to re-encode the whole video. So i am looking for the closest I Frames to my In and Outpoint and cut 1 Frame before/after. As my result i get 3 Videos (front/middle/back). Now it is only needed to re-encode front and back and concat all three Videos.
    So far the theory


    General Observations

    As i look at my resulting video, i obeservated the following.
    frontpart duration is e.g. 3.2 secs. i skip framewise through the Video and get nice and clean timestamps ( 00:00:02.620, 00:00:02:660 )
    As soon as i get to my cutting edge the timestamps are skipping some frames and changing (00:00:03.200, 00:00:03.408 ,00:00:03.409). When i look only at the single frame images, their are no missing/dropped frames

    when i concat my TS files, the results contains a messed up frame rate e.g from constant 25 F/s to 25.0096 F/s


    FFMPEG instructions

    FRONT Video

    ffmpeg -ss 232.52 -i src.mp4 -t 3.24 -filter_complex "setpts=PTS-STARTPTS" -vcodec libx264 -profile:v baseline -level 31 -bf 0  -f mp4 -y front.mp4
    ffmpeg version n3.3 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
     configuration: --prefix=/usr --extra-cflags=-I/usr/include --extra-ldflags=-L/usr/lib --bindir=/usr/local/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-libssh --enable-openssl
     libavutil      55. 58.100 / 55. 58.100
     libavcodec     57. 89.100 / 57. 89.100
     libavformat    57. 71.100 / 57. 71.100
     libavdevice    57.  6.100 / 57.  6.100
     libavfilter     6. 82.100 /  6. 82.100
     libswscale      4.  6.100 /  4.  6.100
     libswresample   2.  7.100 /  2.  7.100
     libpostproc    54.  5.100 / 54.  5.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'src.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf55.33.100
     Duration: 01:06:00.33, start: 0.000000, bitrate: 610 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x464 [SAR 1:1 DAR 80:29], 537 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 65 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Stream mapping:
     Stream #0:0 (h264) -> setpts (graph 0)
     setpts (graph 0) -> Stream #0:0 (libx264)
     Stream #0:1 -> #0:1 (aac (native) -> aac (native))
    Press [q] to stop, [?] for help
    [libx264 @ 0x31ea160] using SAR=1/1
    [libx264 @ 0x31ea160] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX LZCNT
    [libx264 @ 0x31ea160] profile Constrained Baseline, level 3.1
    [libx264 @ 0x31ea160] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=0 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 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 'front.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.71.100
       Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1280x464 [SAR 1:1 DAR 80:29], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
       Metadata:
         encoder         : Lavc57.89.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
       Stream #0:1(und): Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz, mono, fltp, 69 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
         encoder         : Lavc57.89.100 aac
    frame=   81 fps= 31 q=-1.0 Lsize=     151kB time=00:00:03.25 bitrate= 379.5kbits/s speed=1.23x
    video:119kB audio:28kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.531915%
    [libx264 @ 0x31ea160] frame I:1     Avg QP:17.43  size: 38268
    [libx264 @ 0x31ea160] frame P:80    Avg QP:21.05  size:  1038
    [libx264 @ 0x31ea160] mb I  I16..4: 71.4%  0.0% 28.6%
    [libx264 @ 0x31ea160] mb P  I16..4:  0.2%  0.0%  0.0%  P16..4:  7.8%  1.8%  0.6%  0.0%  0.0%    skip:89.6%
    [libx264 @ 0x31ea160] coded y,uvDC,uvAC intra: 21.8% 40.8% 23.1% inter: 1.6% 4.2% 0.2%
    [libx264 @ 0x31ea160] i16 v,h,dc,p: 66% 25%  5%  4%
    [libx264 @ 0x31ea160] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 28% 15%  4%  4%  5%  4%  5%  4%
    [libx264 @ 0x31ea160] i8c dc,h,v,p: 51% 24% 21%  4%
    [libx264 @ 0x31ea160] ref P L0: 74.3% 15.2% 10.5%
    [libx264 @ 0x31ea160] kb/s:299.56
    [aac @ 0x31edfa0] Qavg: 123.323

    MIDDLE Video

    ffmpeg -ss 235.88 -i src.mp4 -c copy -t 1492.96 -f mp4 -y middle.mp4
    ffmpeg version n3.3 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
     configuration: --prefix=/usr --extra-cflags=-I/usr/include --extra-ldflags=-L/usr/lib --bindir=/usr/local/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-libssh --enable-openssl
     libavutil      55. 58.100 / 55. 58.100
     libavcodec     57. 89.100 / 57. 89.100
     libavformat    57. 71.100 / 57. 71.100
     libavdevice    57.  6.100 / 57.  6.100
     libavfilter     6. 82.100 /  6. 82.100
     libswscale      4.  6.100 /  4.  6.100
     libswresample   2.  7.100 /  2.  7.100
     libpostproc    54.  5.100 / 54.  5.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'src.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf55.33.100
     Duration: 01:06:00.33, start: 0.000000, bitrate: 610 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x464 [SAR 1:1 DAR 80:29], 537 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 65 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Output #0, mp4, to 'middle.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.71.100
       Stream #0:0(und): Video: h264 (Main) ([33][0][0][0] / 0x0021), yuv420p, 1280x464 [SAR 1:1 DAR 80:29], q=2-31, 537 kb/s, 25 fps, 25 tbr, 90k tbn, 90k tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz, mono, fltp, 65 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    frame=37329 fps=16333 q=-1.0 Lsize=  113774kB time=00:24:52.95 bitrate= 624.3kbits/s speed= 653x
    video:100359kB audio:12095kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.173957%

    BACK Video

    ffmpeg -ss 1728.88 -i 'src.mp4' -t 3.9199999999998 -filter_complex "setpts=PTS-STARTPTS" -vcodec libx264 -profile:v baseline -level 31 -bf 0  -f mp4 -y back.mp4
    ffmpeg version n3.3 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
     configuration: --prefix=/usr --extra-cflags=-I/usr/include --extra-ldflags=-L/usr/lib --bindir=/usr/local/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-libssh --enable-openssl
     libavutil      55. 58.100 / 55. 58.100
     libavcodec     57. 89.100 / 57. 89.100
     libavformat    57. 71.100 / 57. 71.100
     libavdevice    57.  6.100 / 57.  6.100
     libavfilter     6. 82.100 /  6. 82.100
     libswscale      4.  6.100 /  4.  6.100
     libswresample   2.  7.100 /  2.  7.100
     libpostproc    54.  5.100 / 54.  5.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'src.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf55.33.100
     Duration: 01:06:00.33, start: 0.000000, bitrate: 610 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x464 [SAR 1:1 DAR 80:29], 537 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 65 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Stream mapping:
     Stream #0:0 (h264) -> setpts (graph 0)
     setpts (graph 0) -> Stream #0:0 (libx264)
     Stream #0:1 -> #0:1 (aac (native) -> aac (native))
    Press [q] to stop, [?] for help
    [libx264 @ 0x2672160] using SAR=1/1
    [libx264 @ 0x2672160] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX LZCNT
    [libx264 @ 0x2672160] profile Constrained Baseline, level 3.1
    [libx264 @ 0x2672160] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=0 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 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 'back.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.71.100
       Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1280x464 [SAR 1:1 DAR 80:29], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
       Metadata:
         encoder         : Lavc57.89.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
       Stream #0:1(und): Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz, mono, fltp, 69 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
         encoder         : Lavc57.89.100 aac
    frame=   98 fps= 27 q=-1.0 Lsize=     268kB time=00:00:03.92 bitrate= 559.2kbits/s speed=1.07x
    video:230kB audio:33kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.538479%
    [libx264 @ 0x2672160] frame I:1     Avg QP:19.57  size:112129
    [libx264 @ 0x2672160] frame P:97    Avg QP:21.68  size:  1270
    [libx264 @ 0x2672160] mb I  I16..4: 35.4%  0.0% 64.6%
    [libx264 @ 0x2672160] mb P  I16..4:  0.2%  0.0%  0.1%  P16..4:  6.9%  2.0%  0.8%  0.0%  0.0%    skip:90.1%
    [libx264 @ 0x2672160] coded y,uvDC,uvAC intra: 54.4% 69.1% 54.2% inter: 2.0% 3.6% 0.3%
    [libx264 @ 0x2672160] i16 v,h,dc,p: 63% 23%  8%  6%
    [libx264 @ 0x2672160] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 17% 11%  6%  8%  9%  7%  8%  8%
    [libx264 @ 0x2672160] i8c dc,h,v,p: 50% 18% 24%  7%
    [libx264 @ 0x2672160] ref P L0: 81.8% 11.5%  6.7%
    [libx264 @ 0x2672160] kb/s:480.15
    [aac @ 0x2675fa0] Qavg: 119.994

    CONCAT Videos

    ffmpeg -f concat -safe 0 -i concat.txt -c copy -r 25 -y /concat.mp4
    ffmpeg version n3.3 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
     configuration: --prefix=/usr --extra-cflags=-I/usr/include --extra-ldflags=-L/usr/lib --bindir=/usr/local/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-libssh --enable-openssl
     libavutil      55. 58.100 / 55. 58.100
     libavcodec     57. 89.100 / 57. 89.100
     libavformat    57. 71.100 / 57. 71.100
     libavdevice    57.  6.100 / 57.  6.100
     libavfilter     6. 82.100 /  6. 82.100
     libswscale      4.  6.100 /  4.  6.100
     libswresample   2.  7.100 /  2.  7.100
     libpostproc    54.  5.100 / 54.  5.100
    Input #0, concat, from 'concat.txt':
     Duration: N/A, start: 0.000000, bitrate: N/A
       Stream #0:0: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1280x464 [SAR 1:1 DAR 80:29], 25 fps, 25 tbr, 90k tbn, 50 tbc
       Stream #0:1(und): Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, mono, fltp, 74 kb/s
    Output #0, mp4, to 'concat.mp4':
     Metadata:
       encoder         : Lavf57.71.100
       Stream #0:0: Video: h264 (Constrained Baseline) ([33][0][0][0] / 0x0021), yuv420p(progressive), 1280x464 [SAR 1:1 DAR 80:29], q=2-31, 25 fps, 25 tbr, 12800 tbn, 25 tbc
       Stream #0:1(und): Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz, mono, fltp, 74 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    frame=37508 fps=7256 q=-1.0 Lsize=  114285kB time=00:25:00.59 bitrate= 623.9kbits/s speed= 290x
    video:100672kB audio:12598kB subtitle:0kB other streams:0kB global headers:1kB muxing overhead: 0.896435%

    thank you very much.
    If needed i can provide samples

    Manu

  • FFmpeg skipping time after concat

    19 septembre 2017, par Manul Hüttinger

    I am trying to concatenate videos and in my resulting Videos I have the issue that at the concat edges my video is skipping/glitching.


    General Workflow

    in general my workflow looks like this

    1. Stream via ffmpeg
    2. capture stream and segment all 2 mins in to TS files
    3. concat TS file to MP4 video
    4. cut MP4 video at the desired Timestamps

    Detailed Look at Step 4

    as I am handling 2-hours+ videos I don’t want to re-encode the whole video. So I am looking for the closest I Frames to my In and Outpoint and cut 1 Frame before/after. As my result I get 3 Videos (front/middle/back). Now it is only needed to re-encode front and back and concat all three Videos.
    So far the theory


    General Observations

    As I look at my resulting video, I obeservated the following.
    frontpart duration is e.g. 3.2 secs. I skip framewise through the Video and get nice and clean timestamps ( 00:00:02.620, 00:00:02:660 )
    As soon as I get to my cutting edge the timestamps are skipping some frames and changing (00:00:03.200, 00:00:03.408 ,00:00:03.409). When I look only at the single frame images, their are no missing/dropped frames

    when I concat my TS files, the results contains a messed up frame rate e.g from constant 25 F/s to 25.0096 F/s


    FFMPEG instructions

    FRONT Video

    ffmpeg -ss 232.52 -i src.mp4 -t 3.24 -filter_complex "setpts=PTS-STARTPTS" -vcodec libx264 -profile:v baseline -level 31 -bf 0  -f mp4 -y front.mp4
    ffmpeg version n3.3 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
     configuration: --prefix=/usr --extra-cflags=-I/usr/include --extra-ldflags=-L/usr/lib --bindir=/usr/local/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-libssh --enable-openssl
     libavutil      55. 58.100 / 55. 58.100
     libavcodec     57. 89.100 / 57. 89.100
     libavformat    57. 71.100 / 57. 71.100
     libavdevice    57.  6.100 / 57.  6.100
     libavfilter     6. 82.100 /  6. 82.100
     libswscale      4.  6.100 /  4.  6.100
     libswresample   2.  7.100 /  2.  7.100
     libpostproc    54.  5.100 / 54.  5.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'src.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf55.33.100
     Duration: 01:06:00.33, start: 0.000000, bitrate: 610 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x464 [SAR 1:1 DAR 80:29], 537 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 65 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Stream mapping:
     Stream #0:0 (h264) -> setpts (graph 0)
     setpts (graph 0) -> Stream #0:0 (libx264)
     Stream #0:1 -> #0:1 (aac (native) -> aac (native))
    Press [q] to stop, [?] for help
    [libx264 @ 0x31ea160] using SAR=1/1
    [libx264 @ 0x31ea160] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX LZCNT
    [libx264 @ 0x31ea160] profile Constrained Baseline, level 3.1
    [libx264 @ 0x31ea160] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=0 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 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 'front.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.71.100
       Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1280x464 [SAR 1:1 DAR 80:29], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
       Metadata:
         encoder         : Lavc57.89.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
       Stream #0:1(und): Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz, mono, fltp, 69 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
         encoder         : Lavc57.89.100 aac
    frame=   81 fps= 31 q=-1.0 Lsize=     151kB time=00:00:03.25 bitrate= 379.5kbits/s speed=1.23x
    video:119kB audio:28kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.531915%
    [libx264 @ 0x31ea160] frame I:1     Avg QP:17.43  size: 38268
    [libx264 @ 0x31ea160] frame P:80    Avg QP:21.05  size:  1038
    [libx264 @ 0x31ea160] mb I  I16..4: 71.4%  0.0% 28.6%
    [libx264 @ 0x31ea160] mb P  I16..4:  0.2%  0.0%  0.0%  P16..4:  7.8%  1.8%  0.6%  0.0%  0.0%    skip:89.6%
    [libx264 @ 0x31ea160] coded y,uvDC,uvAC intra: 21.8% 40.8% 23.1% inter: 1.6% 4.2% 0.2%
    [libx264 @ 0x31ea160] i16 v,h,dc,p: 66% 25%  5%  4%
    [libx264 @ 0x31ea160] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 28% 15%  4%  4%  5%  4%  5%  4%
    [libx264 @ 0x31ea160] i8c dc,h,v,p: 51% 24% 21%  4%
    [libx264 @ 0x31ea160] ref P L0: 74.3% 15.2% 10.5%
    [libx264 @ 0x31ea160] kb/s:299.56
    [aac @ 0x31edfa0] Qavg: 123.323

    MIDDLE Video

    ffmpeg -ss 235.88 -i src.mp4 -c copy -t 1492.96 -f mp4 -y middle.mp4
    ffmpeg version n3.3 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
     configuration: --prefix=/usr --extra-cflags=-I/usr/include --extra-ldflags=-L/usr/lib --bindir=/usr/local/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-libssh --enable-openssl
     libavutil      55. 58.100 / 55. 58.100
     libavcodec     57. 89.100 / 57. 89.100
     libavformat    57. 71.100 / 57. 71.100
     libavdevice    57.  6.100 / 57.  6.100
     libavfilter     6. 82.100 /  6. 82.100
     libswscale      4.  6.100 /  4.  6.100
     libswresample   2.  7.100 /  2.  7.100
     libpostproc    54.  5.100 / 54.  5.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'src.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf55.33.100
     Duration: 01:06:00.33, start: 0.000000, bitrate: 610 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x464 [SAR 1:1 DAR 80:29], 537 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 65 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Output #0, mp4, to 'middle.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.71.100
       Stream #0:0(und): Video: h264 (Main) ([33][0][0][0] / 0x0021), yuv420p, 1280x464 [SAR 1:1 DAR 80:29], q=2-31, 537 kb/s, 25 fps, 25 tbr, 90k tbn, 90k tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz, mono, fltp, 65 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    frame=37329 fps=16333 q=-1.0 Lsize=  113774kB time=00:24:52.95 bitrate= 624.3kbits/s speed= 653x
    video:100359kB audio:12095kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.173957%

    BACK Video

    ffmpeg -ss 1728.88 -i 'src.mp4' -t 3.9199999999998 -filter_complex "setpts=PTS-STARTPTS" -vcodec libx264 -profile:v baseline -level 31 -bf 0  -f mp4 -y back.mp4
    ffmpeg version n3.3 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
     configuration: --prefix=/usr --extra-cflags=-I/usr/include --extra-ldflags=-L/usr/lib --bindir=/usr/local/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-libssh --enable-openssl
     libavutil      55. 58.100 / 55. 58.100
     libavcodec     57. 89.100 / 57. 89.100
     libavformat    57. 71.100 / 57. 71.100
     libavdevice    57.  6.100 / 57.  6.100
     libavfilter     6. 82.100 /  6. 82.100
     libswscale      4.  6.100 /  4.  6.100
     libswresample   2.  7.100 /  2.  7.100
     libpostproc    54.  5.100 / 54.  5.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'src.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf55.33.100
     Duration: 01:06:00.33, start: 0.000000, bitrate: 610 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x464 [SAR 1:1 DAR 80:29], 537 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 65 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Stream mapping:
     Stream #0:0 (h264) -> setpts (graph 0)
     setpts (graph 0) -> Stream #0:0 (libx264)
     Stream #0:1 -> #0:1 (aac (native) -> aac (native))
    Press [q] to stop, [?] for help
    [libx264 @ 0x2672160] using SAR=1/1
    [libx264 @ 0x2672160] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX LZCNT
    [libx264 @ 0x2672160] profile Constrained Baseline, level 3.1
    [libx264 @ 0x2672160] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=0 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 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 'back.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.71.100
       Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1280x464 [SAR 1:1 DAR 80:29], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
       Metadata:
         encoder         : Lavc57.89.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
       Stream #0:1(und): Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz, mono, fltp, 69 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
         encoder         : Lavc57.89.100 aac
    frame=   98 fps= 27 q=-1.0 Lsize=     268kB time=00:00:03.92 bitrate= 559.2kbits/s speed=1.07x
    video:230kB audio:33kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.538479%
    [libx264 @ 0x2672160] frame I:1     Avg QP:19.57  size:112129
    [libx264 @ 0x2672160] frame P:97    Avg QP:21.68  size:  1270
    [libx264 @ 0x2672160] mb I  I16..4: 35.4%  0.0% 64.6%
    [libx264 @ 0x2672160] mb P  I16..4:  0.2%  0.0%  0.1%  P16..4:  6.9%  2.0%  0.8%  0.0%  0.0%    skip:90.1%
    [libx264 @ 0x2672160] coded y,uvDC,uvAC intra: 54.4% 69.1% 54.2% inter: 2.0% 3.6% 0.3%
    [libx264 @ 0x2672160] i16 v,h,dc,p: 63% 23%  8%  6%
    [libx264 @ 0x2672160] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 17% 11%  6%  8%  9%  7%  8%  8%
    [libx264 @ 0x2672160] i8c dc,h,v,p: 50% 18% 24%  7%
    [libx264 @ 0x2672160] ref P L0: 81.8% 11.5%  6.7%
    [libx264 @ 0x2672160] kb/s:480.15
    [aac @ 0x2675fa0] Qavg: 119.994

    CONCAT Videos

    ffmpeg -f concat -safe 0 -i concat.txt -c copy -r 25 -y /concat.mp4
    ffmpeg version n3.3 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
     configuration: --prefix=/usr --extra-cflags=-I/usr/include --extra-ldflags=-L/usr/lib --bindir=/usr/local/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-libssh --enable-openssl
     libavutil      55. 58.100 / 55. 58.100
     libavcodec     57. 89.100 / 57. 89.100
     libavformat    57. 71.100 / 57. 71.100
     libavdevice    57.  6.100 / 57.  6.100
     libavfilter     6. 82.100 /  6. 82.100
     libswscale      4.  6.100 /  4.  6.100
     libswresample   2.  7.100 /  2.  7.100
     libpostproc    54.  5.100 / 54.  5.100
    Input #0, concat, from 'concat.txt':
     Duration: N/A, start: 0.000000, bitrate: N/A
       Stream #0:0: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1280x464 [SAR 1:1 DAR 80:29], 25 fps, 25 tbr, 90k tbn, 50 tbc
       Stream #0:1(und): Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, mono, fltp, 74 kb/s
    Output #0, mp4, to 'concat.mp4':
     Metadata:
       encoder         : Lavf57.71.100
       Stream #0:0: Video: h264 (Constrained Baseline) ([33][0][0][0] / 0x0021), yuv420p(progressive), 1280x464 [SAR 1:1 DAR 80:29], q=2-31, 25 fps, 25 tbr, 12800 tbn, 25 tbc
       Stream #0:1(und): Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz, mono, fltp, 74 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    frame=37508 fps=7256 q=-1.0 Lsize=  114285kB time=00:25:00.59 bitrate= 623.9kbits/s speed= 290x
    video:100672kB audio:12598kB subtitle:0kB other streams:0kB global headers:1kB muxing overhead: 0.896435%

    If needed I can provide samples.

  • Uncaught ReferenceError : CCapture is not defined ?

    13 octobre 2024, par The Dead Man

    I have a simple app to create a canvas and render it. I am using capture js and FFmpeg module for converting videos in my app, but when I run the app I get the following reference error :

    



    Uncaught ReferenceError: CCapture is not defined
    at test.js:67`


    



    Here is test.js :

    



    (function() {
  "use strict";

  var framesPerSecond = 60;
  var numFrames = 20; //framesPerSecond * 60 * 2;
  var thickness = 100;
  var speed = 4;
  var frameNum = 0;

  var canvas = document.getElementById("c");
  var ctx = canvas.getContext("2d");
  canvas.width = 1280;
  canvas.height = 720;

  var progressElem = document.getElementById("progress");
  var progressNode = document.createTextNode("");
  progressElem.appendChild(progressNode);

  function onProgress(progress) {
    progressNode.nodeValue = (progress * 100).toFixed(1) + "%";
  }

  function showVideoLink(url, size) {
    size = size ? (" [size: " + (size / 1024 / 1024).toFixed(1) + "meg]") : " [unknown size]";
    var a = document.createElement("a");
    a.href = url;
    var filename = url;
    var slashNdx = filename.lastIndexOf("/");
    if (slashNdx >= 0) {
      filename = filename.substr(slashNdx + 1);
    }
    a.download = filename;
    a.appendChild(document.createTextNode(url + size));
    document.body.appendChild(a);
  }

  var capturer = new CCapture( {
    format: 'ffmpegserver',
    //workersPath: "3rdparty/",
    //format: 'gif',
    verbose: false,
    framerate: framesPerSecond,
    onProgress: onProgress,
    //extension: ".mp4",
    //codec: "libx264",
  } );
  capturer.start();

  function drawLines(ctx) {
    for (var xx = -canvas.width; xx < canvas.width; xx += 2) {
      var l = (xx - (-canvas.width)) / (canvas.width * 2);
      ctx.beginPath();
      ctx.moveTo(xx, -canvas.height);
      ctx.lineTo(xx,  canvas.height);
      ctx.strokeStyle = "hsla(" + ((l * 360 * 24) % 360) + ",100%,50%,0.5)";
      ctx.stroke();
    }
  }

  function render(time) {
    ctx.fillStyle = "#000";
    ctx.fillRect(0, 0, canvas.width, canvas.height);

    ctx.fillStyle = "#FFF";
    for (var xx = 0; xx < canvas.width + thickness * 2; xx += thickness * 2) {
      var x = xx - (frameNum * speed % (thickness * 2));
      ctx.fillRect(x, 0, thickness, canvas.height);
    }

    ctx.save();
    ctx.globalCompositeOperation = "difference";

    ctx.font = "400px sans-serif";
    ctx.textAlign = "center";
    ctx.textBaseline = "middle";
    ctx.fillText(frameNum, canvas.width / 2, canvas.height / 2);


    ctx.save();
    ctx.translate(canvas.width * 0.5, canvas.height * 0.5);
    ctx.rotate(frameNum * 0.01);
    ctx.translate(canvas.width * 0.25, 0);
    drawLines(ctx);
    ctx.restore();

    ctx.save();
    ctx.translate(canvas.width * 0.5, canvas.height * 0.5);
    ctx.rotate(frameNum * -0.013);
    ctx.translate(canvas.width * 0.37, 0);
    drawLines(ctx);
    ctx.restore();

    ctx.restore();

    capturer.capture(canvas);

    ++frameNum;
    if (frameNum === numFrames) {
      capturer.stop();
      capturer.save(showVideoLink);
    } else {
      requestAnimationFrame(render);
    }
  }
  requestAnimationFrame(render);
}());