Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (7)

  • L’espace de configuration de MediaSPIP

    29 novembre 2010, par

    L’espace de configuration de MediaSPIP est réservé aux administrateurs. Un lien de menu "administrer" est généralement affiché en haut de la page [1].
    Il permet de configurer finement votre site.
    La navigation de cet espace de configuration est divisé en trois parties : la configuration générale du site qui permet notamment de modifier : les informations principales concernant le site (...)

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (5680)

  • FFmpeg audio doesnt work in converted videos but in pc it does

    28 octobre 2013, par Dirk Swarz

    I use :

    if($ext == "avi" && $convert_avi == true)
                       {
                           $convert_source = _VIDEOS_DIR_PATH.$new_name;
                           $conv_name = substr(md5($file['name'].rand(1,888)), 2, 10).".mp4";
                           $converted_file  = _VIDEOS_DIR_PATH.$conv_name;
                           $ffmpeg_command = 'ffmpeg -i '.$convert_source.' -acodec libmp3lame -vcodec libx264 -s 1280x720 -ar 44100 -async 44100 -r 29.970 -ac 2 -qscale 5 '.$converted_file;
                           echo exec($ffmpeg_command);
                           $sql = "UPDATE pm_temp SET url = '".$conv_name."' WHERE url = '".$new_name."' LIMIT 1";
                           $result = @mysql_query($sql);
                           unlink($convert_source);    
                       }

    This code to convert avi to mp4
    ffmpeg concole output :

    root@1tb:~# ffmpeg -i sample.avi -acodec libmp3lame -vcodec libx264 -s 1280x720 -ar 44100 -async 44100 -r 29.970 -ac 2 -qscale 5 goodsample.mp4
    ffmpeg version 0.7.15, Copyright (c) 2000-2013 the FFmpeg developers
     built on Feb 22 2013 07:18:58 with gcc 4.4.5
     configuration: --enable-libdc1394 --prefix=/usr --extra-cflags='-Wall -g ' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-avfilter --enable-libdirac --disable-decoder=libdirac --enable-libfreetype --enable-libschroedinger --disable-encoder=libschroedinger -                                                                                                                                                             s
     libavutil    50. 43. 0 / 50. 43. 0
     libavcodec   52.123. 0 / 52.123. 0
     libavformat  52.111. 0 / 52.111. 0
     libavdevice  52.  5. 0 / 52.  5. 0
     libavfilter   1. 80. 0 /  1. 80. 0
     libswscale    0. 14. 1 /  0. 14. 1
     libpostproc  51.  2. 0 / 51.  2. 0
    [mp3 @ 0x191d4100] Header missing
    [mpeg4 @ 0x191d1dc0] Invalid and inefficient vfw-avi packed B frames detected
    Input #0, avi, from 'sample.avi':
     Metadata:
       encoder         : VirtualDubMod 1.5.10.2 (build 2540/release)
     Duration: 00:01:01.81, start: 0.000000, bitrate: 1194 kb/s
       Stream #0.0: Video: mpeg4, yuv420p, 640x352 [PAR 1:1 DAR 20:11], 23.98 tbr,
       Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 128 kb/s
    [buffer @ 0x191d1c80] w:640 h:352 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
    [scale @ 0x191d6880] w:640 h:352 fmt:yuv420p -> w:1280 h:720 fmt:yuv420p flags:0
    [libx264 @ 0x191ce5a0] Default settings detected, using medium profile
    [libx264 @ 0x191ce5a0] using SAR=45/44
    [libx264 @ 0x191ce5a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle S
    [libx264 @ 0x191ce5a0] profile High, level 3.1
    [libx264 @ 0x191ce5a0] 264 - core 118 - H.264/MPEG-4 AVC codec - Copyleft 2003-2                                                                                                                                                             6 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_off                                                                                                                                                             1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_l
    Output #0, mp4, to 'goodsample.mp4':
     Metadata:
       encoder         : Lavf52.111.0
       Stream #0.0: Video: libx264, yuv420p, 1280x720 [PAR 45:44 DAR 20:11], q=2-31
       Stream #0.1: Audio: libmp3lame, 44100 Hz, stereo, s16, 64 kb/s
    Stream mapping:
     Stream #0.0 -> #0.0
     Stream #0.1 -> #0.1
    Press [q] to stop, [?] for help
    [mp3 @ 0x191d4100] Header missing
    Error while decoding stream #0.1
    [mpeg4 @ 0x191d1dc0] Invalid and inefficient vfw-avi packed B frames detected
    [mp3 @ 0x191d4100] incomplete frame 9467kB time=00:01:00.32 bitrate=1285.5kbits/
    Error while decoding stream #0.1
    frame= 1852 fps= 20 q=29.0 Lsize=    9652kB time=00:01:01.72 bitrate=1280.9kbits
    video:9121kB audio:483kB global headers:0kB muxing overhead 0.499688%
    frame I:11    Avg QP:16.78  size: 51456
    [libx264 @ 0x191ce5a0] frame P:784   Avg QP:20.81  size:  8954
    [libx264 @ 0x191ce5a0] frame B:1057  Avg QP:26.06  size:  1659
    [libx264 @ 0x191ce5a0] consecutive B-frames: 22.0%  3.1%  7.5% 67.4%
    [libx264 @ 0x191ce5a0] mb I  I16..4: 31.1% 59.8%  9.1%
    [libx264 @ 0x191ce5a0] mb P  I16..4:  1.8%  2.6%  0.2%  P16..4: 24.3%  7.0%  4.0
    [libx264 @ 0x191ce5a0] mb B  I16..4:  0.1%  0.1%  0.0%  B16..8: 22.7%  0.8%  0.2
    [libx264 @ 0x191ce5a0] 8x8 transform intra:57.0% inter:72.6%
    [libx264 @ 0x191ce5a0] coded y,uvDC,uvAC intra: 44.4% 33.3% 10.3% inter: 7.6% 5.
    [libx264 @ 0x191ce5a0] i16 v,h,dc,p: 68% 14%  8% 10%
    [libx264 @ 0x191ce5a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 14% 27%  5%  7%  7%  6
    [libx264 @ 0x191ce5a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 14% 14%  6% 10%  9%  7
    [libx264 @ 0x191ce5a0] i8c dc,h,v,p: 67% 13% 17%  3%
    [libx264 @ 0x191ce5a0] Weighted P-Frames: Y:1.9% UV:0.4%
    [libx264 @ 0x191ce5a0] ref P L0: 62.2% 12.8% 10.3% 14.5%  0.2%
    [libx264 @ 0x191ce5a0] ref B L0: 88.1%  5.5%  6.4%
    [libx264 @ 0x191ce5a0] ref B L1: 95.7%  4.3%
    [libx264 @ 0x191ce5a0] kb/s:1209.03

    I know there is couple errors tough, but i dont know hot to fix it. Also i would be very thankfull if someone can help reduce video size but is not main problem video weights as original avi but sill.

  • FFMPEG - latest build doesn't work, earlier build does

    21 juin 2020, par rossmcm

    I have been using FFMPEG to overlay coloured rectangles on a video. I updated FFMPEG and it no longer works. No error is issued, it just doesn't do the job - the resulting video is the same as the input video. Here's the script :

    


    FFMpeg -y -i Input.mp4 -filter_complex \
  "nullsrc=size=1920x1080,  \
  drawbox=x=200:y=100:w=300:h=150:t=20:c=yellow,  fade=in:st=10:d=1:alpha=1, fade=out:st=20:d=2:alpha=1 [tmp1]; \ 
  nullsrc=size=1920x1080,  \
  drawbox=x=240:y=140:w=300:h=150:t=20:c=red,  fade=in:st=15:d=1:alpha=1, fade=out:st=25:d=2:alpha=1 [tmp2]; \
  [tmp1][tmp2] overlay=0:0:shortest=1[tmp3]; \
  [0:v][tmp3] overlay=0:0:shortest=1" \
  Output.mp4


    


    The output video should be the input video with a yellow rectangle added from T=10 to T=20 and a red rectangle from T=15 to T=25, fading them in and out.

    


    The version that was working (3.4) was one that came with an ImageMagick installation. The version I updated it to was 4.2.3. I tried it on various other builds I had lying around and it only works with 3.4.

    


    It seems unlikely that this is a regression so I haven't submitted a bug report. I figure it's more likely that I'm not doing something correctly and 3.4 is more lenient on its interpretation of my command.

    


    Whatever, I prefer to be working with a current build, so I invite comments on what the reasons might be.

    


    Console dump of 3.4 run

    


    ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 7.2.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Input.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:01:48.67, start: 0.000000, bitrate: 1693 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 1562 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 126 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 (h264) -> overlay:main (graph 0)
  overlay (graph 0) -> Stream #0:0 (libx264)
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 000001f0d4a0e6a0] using SAR=1/1
[libx264 @ 000001f0d4a0e6a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000001f0d4a0e6a0] profile High, level 4.0
[libx264 @ 000001f0d4a0e6a0] 264 - core 152 r2851 ba24899 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'Output-34.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.83.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
    Metadata:
      encoder         : Lavc57.107.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) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      encoder         : Lavc57.107.100 aac
frame= 3260 fps= 25 q=-1.0 Lsize=   21461kB time=00:01:48.56 bitrate=1619.3kbits/s speed=0.828x
video:19713kB audio:1634kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.534457%
[libx264 @ 000001f0d4a0e6a0] frame I:14    Avg QP:17.68  size:208205
[libx264 @ 000001f0d4a0e6a0] frame P:844   Avg QP:21.55  size: 16867
[libx264 @ 000001f0d4a0e6a0] frame B:2402  Avg QP:28.40  size:  1263
[libx264 @ 000001f0d4a0e6a0] consecutive B-frames:  0.7%  2.9%  0.4% 96.0%
[libx264 @ 000001f0d4a0e6a0] mb I  I16..4: 14.0% 39.6% 46.4%
[libx264 @ 000001f0d4a0e6a0] mb P  I16..4:  0.4%  0.7%  0.2%  P16..4: 20.2%  9.1%  4.6%  0.0%  0.0%    skip:64.8%
[libx264 @ 000001f0d4a0e6a0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 12.4%  0.4%  0.1%  direct: 0.1%  skip:87.1%  L0:42.9% L1:55.2% BI: 1.9%
[libx264 @ 000001f0d4a0e6a0] 8x8 transform intra:45.2% inter:68.3%
[libx264 @ 000001f0d4a0e6a0] coded y,uvDC,uvAC intra: 64.4% 81.6% 45.1% inter: 2.9% 4.2% 0.1%
[libx264 @ 000001f0d4a0e6a0] i16 v,h,dc,p: 32% 26%  6% 37%
[libx264 @ 000001f0d4a0e6a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 20% 15%  5%  6%  7%  7%  7%  8%
[libx264 @ 000001f0d4a0e6a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 28%  8%  4%  6%  6%  6%  5%  5%
[libx264 @ 000001f0d4a0e6a0] i8c dc,h,v,p: 37% 25% 28% 10%
[libx264 @ 000001f0d4a0e6a0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000001f0d4a0e6a0] ref P L0: 70.4% 15.3% 10.8%  3.5%
[libx264 @ 000001f0d4a0e6a0] ref B L0: 93.1%  6.0%  0.9%
[libx264 @ 000001f0d4a0e6a0] ref B L1: 97.8%  2.2%
[libx264 @ 000001f0d4a0e6a0] kb/s:1486.03
[aac @ 000001f0d4a10a20] Qavg: 1586.609


    


    And 4.2.3

    


    ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.1 (GCC) 20200523
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Input.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:01:48.67, start: 0.000000, bitrate: 1693 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 1562 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 126 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 (h264) -> overlay:main (graph 0)
  overlay (graph 0) -> Stream #0:0 (libx264)
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 000001e7b4531d40] using SAR=1/1
[libx264 @ 000001e7b4531d40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000001e7b4531d40] profile High, level 4.0, 4:2:0, 8-bit
[libx264 @ 000001e7b4531d40] 264 - core 160 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - 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=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'Output-423.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
    Metadata:
      encoder         : Lavc58.54.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) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      encoder         : Lavc58.54.100 aac
frame= 3260 fps= 28 q=-1.0 Lsize=   21425kB time=00:01:48.56 bitrate=1616.7kbits/s speed=0.917x
video:19686kB audio:1625kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.535352%
[libx264 @ 000001e7b4531d40] frame I:14    Avg QP:17.68  size:208355
[libx264 @ 000001e7b4531d40] frame P:844   Avg QP:21.54  size: 16838
[libx264 @ 000001e7b4531d40] frame B:2402  Avg QP:28.43  size:  1261
[libx264 @ 000001e7b4531d40] consecutive B-frames:  0.7%  2.9%  0.4% 96.0%
[libx264 @ 000001e7b4531d40] mb I  I16..4: 13.9% 39.7% 46.4%
[libx264 @ 000001e7b4531d40] mb P  I16..4:  0.4%  0.7%  0.2%  P16..4: 20.2%  9.1%  4.6%  0.0%  0.0%    skip:64.8%
[libx264 @ 000001e7b4531d40] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 12.4%  0.4%  0.1%  direct: 0.1%  skip:87.1%  L0:42.9% L1:55.2% BI: 1.9%
[libx264 @ 000001e7b4531d40] 8x8 transform intra:45.3% inter:68.3%
[libx264 @ 000001e7b4531d40] coded y,uvDC,uvAC intra: 65.2% 82.4% 45.8% inter: 2.9% 4.2% 0.1%
[libx264 @ 000001e7b4531d40] i16 v,h,dc,p: 32% 24%  6% 38%
[libx264 @ 000001e7b4531d40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 19% 14%  5%  6%  7%  7%  7%  8%
[libx264 @ 000001e7b4531d40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 28%  8%  4%  6%  6%  6%  5%  5%
[libx264 @ 000001e7b4531d40] i8c dc,h,v,p: 37% 24% 28% 11%
[libx264 @ 000001e7b4531d40] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000001e7b4531d40] ref P L0: 70.4% 15.3% 10.8%  3.5%
[libx264 @ 000001e7b4531d40] ref B L0: 93.1%  6.0%  0.9%
[libx264 @ 000001e7b4531d40] ref B L1: 97.8%  2.2%
[libx264 @ 000001e7b4531d40] kb/s:1483.98
[aac @ 000001e7b47fa800] Qavg: 1462.566


    


  • How to compress video size without changing much quality and without changing framerate (Ffmpeg) ?

    19 septembre 2020, par WebDiva

    I am using this command to compress my videos :

    


    ffmpeg -y -i video.mp4 -vcodec libx264 -crf 24 -preset ultrafast compressed.mp4



    


    Although it works okay, there is a slight increase in duration because I am changing the framerate of videos, and we need the video to be the exact duration. Is there a way to compress videos without changing the framerate ? any help would be appreciated. Thank you.

    


    Log :

    


    ffmpeg version git-2020-08-31-4a11a6f Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.2.1 (GCC) 20200805
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --enable-librav1e --enable-libsvtav1 --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 58.100 / 56. 58.100
  libavcodec     58.101.101 / 58.101.101
  libavformat    58. 51.101 / 58. 51.101
  libavdevice    58. 11.101 / 58. 11.101
  libavfilter     7. 87.100 /  7. 87.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1600498063375.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2020-09-19T06:47:54.000000Z
    com.android.version: 10
  Duration: 00:00:10.53, start: 0.000000, bitrate: 4613 kb/s
    Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 776x1440, 4611 kb/s, SAR 1:1 DAR 97:180, 19.11 fps, 16.42 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      creation_time   : 2020-09-19T06:47:54.000000Z
      handler_name    : VideoHandle
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 000001e25a673ac0] using SAR=1/1
[libx264 @ 000001e25a673ac0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000001e25a673ac0] profile Constrained Baseline, level 3.2, 4:2:0, 8-bit
[libx264 @ 000001e25a673ac0] 264 - core 161 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 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=16 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=24.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, mp4, to 'compressed.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    com.android.version: 10
    encoder         : Lavf58.51.101
    Stream #0:0(eng): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 776x1440 [SAR 1:1 DAR 97:180], q=-1--1, 16.42 fps, 12608 tbn, 16.42 tbc (default)
    Metadata:
      creation_time   : 2020-09-19T06:47:54.000000Z
      handler_name    : VideoHandle
      encoder         : Lavc58.101.101 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame=  181 fps= 95 q=-1.0 Lsize=    5244kB time=00:00:10.96 bitrate=3918.2kbits/s dup=1 drop=29 speed=5.76x
video:5243kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.030269%
[libx264 @ 000001e25a673ac0] frame I:1     Avg QP:21.00  size: 92845
[libx264 @ 000001e25a673ac0] frame P:180   Avg QP:22.42  size: 29306
[libx264 @ 000001e25a673ac0] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 000001e25a673ac0] mb P  I16..4: 35.6%  0.0%  0.0%  P16..4: 39.9%  0.0%  0.0%  0.0%  0.0%    skip:24.6%
[libx264 @ 000001e25a673ac0] coded y,uvDC,uvAC intra: 34.6% 31.8% 2.5% inter: 28.7% 17.1% 0.7%
[libx264 @ 000001e25a673ac0] i16 v,h,dc,p: 38% 18% 20% 23%
[libx264 @ 000001e25a673ac0] i8c dc,h,v,p: 48% 17% 25%  9%
[libx264 @ 000001e25a673ac0] kb/s:3894.93