Recherche avancée

Médias (3)

Mot : - Tags -/spip

Autres articles (112)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

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

Sur d’autres sites (9803)

  • Getting small file size from ffmpeg [duplicate]

    20 février 2020, par sukach

    I am not an ffmpeg expert. I am trying to get some movies converted to a smaller DIVX file for a cheap portable DVD player for a family trip. The movies are for my kids so I’m not too concerned about quality.

    The DVD player is a 10.1", 1024x600 screen. It says it supports DIVX/MPEG2 files. It took me a lot of experimentation to get the right ffmpeg settings to even get it to work, but I found another answer that provided a very complex set of parameters that ultimately worked.

    I have converted about 20 movies with this setting and every one results in a file size of 1.1GB. I have tried different file sizes and crf settings and it is the same every time.

    Here is an example. First, the original file :

    General
    Complete name                            : Charlotte's Web.m4v
    Format                                   : MPEG-4
    Format profile                           : Base Media / Version 2
    Codec ID                                 : mp42 (isom/iso2/avc1/mp41)
    File size                                : 4.17 GiB
    Duration                                 : 1 h 36 min
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 6 161 kb/s
    Movie name                               : Charlotte's Web
    Performer                                : Julia Roberts, Steve Buscemi, John Cleese, Oprah Winfrey, Cedric the Entertainer, Reba McEntire, Kathy Bates, Robert Redford, Thomas Haden Church, André Benjamin, Dominic Scott Kay, Sam Shepard, Abraham Benrubi, Dakota Fanning, Kevin Anderson, Essie Davis, Siobhan Fallon, Louis Corbett, Robyn Arthur, Julian O'Donnell, Gary Basaraba, Nate Mooney, Nicholas Bell, Beau Bridges, Teague Rook, Julia Zemiro, Denise Kirby, Robert Plazek, Joseph Lotesto, Michael Roland, Don Bridges, Ian Watkin, Joel McCrary, Brian Stepanek, Fred Tatasciore, Bradley White, Maia Kirkpatrick, Jennessa Rose, Briana Hodge, Dale Azzopardi, Geoff Burgess, Ella Scott Lynch, Greg Marian, Stefano Mazzeo, Elizabeth Saunders
    Director                                 : Gary Winick
    Actor                                    : Julia Roberts / Steve Buscemi / John Cleese / Oprah Winfrey / Cedric the Entertainer / Reba McEntire / Kathy Bates / Robert Redford / Thomas Haden Church / André Benjamin / Dominic Scott Kay / Sam Shepard / Abraham Benrubi / Dakota Fanning / Kevin Anderson / Essie Davis / Siobhan Fallon / Louis Corbett / Robyn Arthur / Julian O'Donnell / Gary Basaraba / Nate Mooney / Nicholas Bell / Beau Bridges / Teague Rook / Julia Zemiro / Denise Kirby / Robert Plazek / Joseph Lotesto / Michael Roland / Don Bridges / Ian Watkin / Joel McCrary / Brian Stepanek / Fred Tatasciore / Bradley White / Maia Kirkpatrick / Jennessa Rose / Briana Hodge / Dale Azzopardi / Geoff Burgess / Ella Scott Lynch / Greg Marian / Stefano Mazzeo / Elizabeth Saunders
    Screenplay by                            : Karey Kirkpatrick / Susannah Grant / Earl Hamner / Jr. / E.B. White
    Producer                                 : Julia Pistor / Jordan Kerner / Paul Neesan / Edgar M. Bronfman / Bernard Williams / Tony Winley
    Genre                                    : Comedy
    ContentType                              : Short Film
    Description                              : Wilbur the pig is scared of the end of the season, because he knows that come that time, he will end up on the dinner table. He hatches a plan with Charlotte, a spider that lives in his pen, to ensure that this will never happen.
    Recorded date                            : UTC 2006-12-15 11:00:00
    Encoded date                             : UTC 2017-01-23 02:37:54
    Tagged date                              : UTC 2017-01-24 01:19:52
    Writing application                      : HandBrake 1.0.1 2016122900
    Cover                                    : Yes
    LongDescription                          : Wilbur the pig is scared of the end of the season, because he knows that come that time, he will end up on the dinner table. He hatches a plan with Charlotte, a spider that lives in his pen, to ensure that this will never happen.
    ContentRating                            : mpaa|G|100|

    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L4
    Format settings                          : CABAC / 4 Ref Frames
    Format settings, CABAC                   : Yes
    Format settings, ReFrames                : 4 frames
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 1 h 36 min
    Bit rate                                 : 5 691 kb/s
    Width                                    : 1 920 pixels
    Height                                   : 1 080 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Variable
    Frame rate                               : 23.976 (24000/1001) FPS
    Minimum frame rate                       : 23.974 FPS
    Maximum frame rate                       : 23.981 FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.114
    Stream size                              : 3.86 GiB (92%)
    Writing library                          : x264 core 148 r2708 86b7198
    Encoding settings                        : cabac=1 / ref=3 / deblock=1:-1:-1 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-3 / 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=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=22.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=25000 / vbv_bufsize=31250 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
    Encoded date                             : UTC 2017-01-23 02:37:54
    Tagged date                              : UTC 2017-01-23 02:37:54
    Color range                              : Limited
    Color primaries                          : BT.709
    Transfer characteristics                 : BT.709
    Matrix coefficients                      : BT.709
    Menus                                    : 4

    Here is the first encode settings :

    ffmpeg -i "$1" -sn -c:a libmp3lame -ar 48000 -ab 128k -ac 2 -c:v mpeg4 -crf 24 -vtag DIVX -vf scale=1024x600:force_original_aspect_ratio=decrease -mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 30 -vb 1500k "$2"

    And the resulting mediainfo :

    General
    Complete name                            : Charlotte's Web (2006) - DIVX.avi
    Format                                   : AVI
    Format/Info                              : Audio Video Interleave
    Format profile                           : OpenDML
    File size                                : 1.11 GiB
    Duration                                 : 1 h 36 min
    Overall bit rate                         : 1 644 kb/s
    Movie name                               : Charlotte's Web
    Director                                 : Julia Roberts, Steve Buscemi, John Cleese, Oprah Winfrey, Cedric the Entertainer, Reba McEntire, Kathy Bates, Robert Redford, Thomas Haden Church, André Benjamin, Dominic Scott Kay, Sam Shepard, Abraham Benrubi, Dakota Fanning, Kevin Anderson, Essie Davis, Siobhan Fallon, Louis Corbett, Robyn Arthur, Julian O'Donnell, Gary Basaraba, Nate Mooney, Nicholas Bell, Beau Bridges, Teague Rook, Julia Zemiro, Denise Kirby, Robert Plazek, Joseph Lotesto, Michael Roland, Don Bridges, Ian Watkin, Joel McCrary, Brian Stepanek, Fred Tatasciore, Bradley White, Maia Kirkpatrick, Jennessa Rose, Briana Hodge, Dale Azzopardi, Geoff Burgess, Ella Scott Lynch, Greg Marian, Stefano Mazzeo, Elizabeth Saunders
    Genre                                    : Comedy
    Recorded date                            : UTC 2006-12-15 11:00:00
    Writing application                      : Lavf57.56.100

    Video
    ID                                       : 0
    Format                                   : MPEG-4 Visual
    Format profile                           : Simple@L1
    Format settings, BVOP                    : No
    Format settings, QPel                    : No
    Format settings, GMC                     : No warppoints
    Format settings, Matrix                  : Default (H.263)
    Codec ID                                 : DIVX
    Codec ID/Info                            : Project Mayo
    Codec ID/Hint                            : DivX 4
    Duration                                 : 1 h 36 min
    Bit rate                                 : 1 500 kb/s
    Width                                    : 1 024 pixels
    Height                                   : 576 pixels
    Display aspect ratio                     : 16:9
    Frame rate                               : 23.976 (24000/1001) FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Compression mode                         : Lossy
    Bits/(Pixel*Frame)                       : 0.106
    Stream size                              : 1.02 GiB (91%)
    Writing library                          : Lavc57.64.100

    Here was my attempt at a smaller file size (lower crf and smaller scale setting) :

    ffmpeg -i "Charlotte's Web.m4v" -sn -c:a libmp3lame -ar 48000 -ab 128k -ac 2 -c:v mpeg4 -crf 30 -vtag DIVX -vf scale=800:480 -mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 30 -vb 1500k "Charlotte's Web (2006) - DIVX 2.avi"

    And the resulting mediainfo :

    General
    Complete name                            : Charlotte's Web (2006) - DIVX 2.avi
    Format                                   : AVI
    Format/Info                              : Audio Video Interleave
    Format profile                           : OpenDML
    File size                                : 1.11 GiB
    Duration                                 : 1 h 36 min
    Overall bit rate                         : 1 643 kb/s
    Movie name                               : Charlotte's Web
    Director                                 : Julia Roberts, Steve Buscemi, John Cleese, Oprah Winfrey, Cedric the Entertainer, Reba McEntire, Kathy Bates, Robert Redford, Thomas Haden Church, André Benjamin, Dominic Scott Kay, Sam Shepard, Abraham Benrubi, Dakota Fanning, Kevin Anderson, Essie Davis, Siobhan Fallon, Louis Corbett, Robyn Arthur, Julian O'Donnell, Gary Basaraba, Nate Mooney, Nicholas Bell, Beau Bridges, Teague Rook, Julia Zemiro, Denise Kirby, Robert Plazek, Joseph Lotesto, Michael Roland, Don Bridges, Ian Watkin, Joel McCrary, Brian Stepanek, Fred Tatasciore, Bradley White, Maia Kirkpatrick, Jennessa Rose, Briana Hodge, Dale Azzopardi, Geoff Burgess, Ella Scott Lynch, Greg Marian, Stefano Mazzeo, Elizabeth Saunders
    Genre                                    : Comedy
    Recorded date                            : UTC 2006-12-15 11:00:00
    Writing application                      : Lavf57.56.100

    Video
    ID                                       : 0
    Format                                   : MPEG-4 Visual
    Format profile                           : Simple@L1
    Format settings, BVOP                    : No
    Format settings, QPel                    : No
    Format settings, GMC                     : No warppoints
    Format settings, Matrix                  : Default (H.263)
    Codec ID                                 : DIVX
    Codec ID/Info                            : Project Mayo
    Codec ID/Hint                            : DivX 4
    Duration                                 : 1 h 36 min
    Bit rate                                 : 1 499 kb/s
    Width                                    : 800 pixels
    Height                                   : 480 pixels
    Display aspect ratio                     : 16:9
    Frame rate                               : 23.976 (24000/1001) FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Compression mode                         : Lossy
    Bits/(Pixel*Frame)                       : 0.163
    Stream size                              : 1.02 GiB (91%)
    Writing library                          : Lavc57.64.100

    Same file size but lower resolution.

    Any ideas on what the best settings to achieve my goal ?

  • ffmpeg converting .vob to .mp4 --- colors are washed out

    28 mai 2021, par Blattla

    I am very new to ffmpeg. Currently I am trying to convert old family movies from vob to mp4.
After getting some help I used this command :

    


    ffmpeg -i 1998.vob -codec:v libx264 -crf 17 -pix_fmt yuv420p -codec:a aac -movflags +faststart 1998.mp4


    


    Two things that still bug me. The output is almost 20% larger than the input and the colors are washed out. Although the movies are old and of low quality (grainy, rather flat colors, ...) the colors in the output movie are less intense than in the original one. Larger file size would be ok for me but do you have any idea which part of my command might cause the color issue ?

    


    ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with Apple clang version 12.0.0 (clang-1200.0.32.29)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.4_1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, mpeg, from '1995.vob':
  Duration: 00:00:14.64, start: 0.232178, bitrate: 1676252 kb/s
  Stream #0:0[0x1bf]: Data: dvd_nav_packet
  Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, bt470bg, top first), 704x576 [SAR 12:11 DAR 4:3], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Side data:
      cpb: bitrate max/min/avg: 9548800/0/0 buffer size: 1835008 vbv_delay: N/A
  Stream #0:2[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s
File '999.mp4' already exists. Overwrite? [y/N] y
Stream mapping:
  Stream #0:1 -> #0:0 (mpeg2video (native) -> h264 (libx264))
  Stream #0:2 -> #0:1 (ac3 (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x7ff666814400] using SAR=12/11
[libx264 @ 0x7ff666814400] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7ff666814400] profile High, level 3.0, 4:2:0, 8-bit
[libx264 @ 0x7ff666814400] 264 - core 161 r3049 55d517b - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - 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=17.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '999.mp4':
  Metadata:
    encoder         : Lavf58.76.100
  Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt470bg, top coded first (swapped)), 704x576 [SAR 12:11 DAR 4:3], q=2-31, 25 fps, 12800 tbn
    Metadata:
      encoder         : Lavc58.134.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
  Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc58.134.100 aac
frame=    1 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=   59 fps=0.0 q=22.0 size=     256kB time=00:00:02.04 bitrate=1024.2kbits/frame=   75 fps= 72 q=22.0 size=    1024kB time=00:00:02.68 bitrate=3120.9kbits/frame=   95 fps= 61 q=22.0 size=    2048kB time=00:00:03.45 bitrate=4854.6kbits/frame=  112 fps= 54 q=22.0 size=    2816kB time=00:00:04.18 bitrate=5517.2kbits/frame=  131 fps= 51 q=22.0 size=    4096kB time=00:00:04.92 bitrate=6809.0kbits/frame=  149 fps= 48 q=22.0 size=    4864kB time=00:00:05.65 bitrate=7048.3kbits/frame=  169 fps= 47 q=22.0 size=    6144kB time=00:00:06.42 bitrate=7838.3kbits/frame=  183 fps= 44 q=22.0 size=    6912kB time=00:00:07.04 bitrate=8043.1kbits/frame=  203 fps= 43 q=22.0 size=    7936kB time=00:00:07.80 bitrate=8326.3kbits/frame=  221 fps= 42 q=22.0 size=    8960kB time=00:00:08.51 bitrate=8623.2kbits/frame=  240 fps= 42 q=22.0 size=    9984kB time=00:00:09.28 bitrate=8813.5kbits/frame=  261 fps= 41 q=22.0 size=   11264kB time=00:00:10.06 bitrate=9164.0kbits/frame=  278 fps= 40 q=22.0 size=   12288kB time=00:00:10.81 bitrate=9306.9kbits/frame=  294 fps= 40 q=22.0 size=   13568kB time=00:00:11.45 bitrate=9702.3kbits/frame=  311 fps= 39 q=22.0 size=   14592kB time=00:00:12.09 bitrate=9882.4kbits/frame=  329 fps= 39 q=22.0 size=   15616kB time=00:00:12.86 bitrate=9944.5kbits/frame=  347 fps= 39 q=22.0 size=   16640kB time=00:00:13.56 bitrate=10046.8kbitsframe=  366 fps= 38 q=22.0 size=   17920kB time=00:00:14.33 bitrate=10240.0kbitsframe=  385 fps= 38 q=22.0 size=   19200kB time=00:00:15.12 bitrate=10398.9kbitsframe=  400 fps= 38 q=22.0 size=   20224kB time=00:00:15.63 bitrate=10594.9kbitsframe=  418 fps= 38 q=22.0 size=   21504kB time=00:00:16.34 bitrate=10780.1kbitsframe=  431 fps= 37 q=22.0 size=   22528kB time=00:00:16.89 bitrate=10922.7kbitsframe=  447 fps= 37 q=22.0 size=   23808kB time=00:00:17.53 bitrate=11122.0kbitsframe=  466 fps= 37 q=22.0 size=   25088kB time=00:00:18.26 bitrate=11254.5kbitsframe=  479 fps= 36 q=22.0 size=   25856kB time=00:00:18.81 bitrate=11257.1kbitsframe=  497 fps= 36 q=22.0 size=   27136kB time=00:00:19.54 bitrate=11375.8kbitsframe=  513 fps= 36 q=22.0 size=   28416kB time=00:00:20.16 bitrate=11546.8kbitsframe=  530 fps= 36 q=22.0 size=   29440kB time=00:00:20.92 bitrate=11523.9kbitsframe=  546 fps= 36 q=22.0 size=   30464kB time=00:00:21.56 bitrate=11570.9kbitsframe=  564 fps= 36 q=22.0 size=   31744kB time=00:00:22.10 bitrate=11766.1kbitsframe=  580 fps= 36 q=19.0 size=   32512kB time=00:00:22.80 bitrate=11678.8kbitsframe=  598 fps= 36 q=22.0 size=   33792kB time=00:00:23.57 bitrate=11743.1kbitsframe=  614 fps= 35 q=22.0 size=   34560kB time=00:00:24.25 bitrate=11672.0kbitsframe=  630 fps= 35 q=22.0 size=   35328kB time=00:00:24.85 bitrate=11644.6kbitsframe=  646 fps= 35 q=22.0 size=   36096kB time=00:00:25.42 bitrate=11628.3kbitsframe=  662 fps= 35 q=22.0 size=   37376kB time=00:00:26.17 bitrate=11697.1kbitsframe=  682 fps= 35 q=22.0 size=   38400kB time=00:00:26.90 bitrate=11693.6kbitsframe=  699 fps= 35 q=22.0 size=   39424kB time=00:00:27.66 bitrate=11672.2kbitsframe=  719 fps= 35 q=22.0 size=   40704kB time=00:00:28.41 bitrate=11734.5kbitsframe=  736 fps= 35 q=22.0 size=   41728kB time=00:00:29.14 bitrate=11730.3kbitsframe=  753 fps= 35 q=22.0 size=   42752kB time=00:00:29.71 bitrate=11785.2kbitsframe=  764 fps= 35 q=22.0 size=   43520kB time=00:00:30.20 bitrate=11802.0kbitsframe=  776 fps= 35 q=22.0 size=   44544kB time=00:00:30.72 bitrate=11878.4kbitsframe=  786 fps= 34 q=22.0 size=   45312kB time=00:00:31.06 bitrate=11950.4kbitsframe=  799 fps= 34 q=22.0 size=   46080kB time=00:00:31.57 bitrate=11955.9kbitsframe=  815 fps= 34 q=22.0 size=   47104kB time=00:00:32.14 bitrate=12002.6kbitsframe=  830 fps= 34 q=22.0 size=   48128kB time=00:00:32.78 bitrate=12024.2kbitsframe=  839 fps= 33 q=22.0 size=   48640kB time=00:00:33.15 bitrate=12019.2kbitsframe=  847 fps= 33 q=22.0 size=   49152kB time=00:00:33.49 bitrate=12021.9kbitsframe=  858 fps= 33 q=22.0 size=   49920kB time=00:00:33.98 bitrate=12033.5kbitsframe=  867 fps= 32 q=22.0 size=   50688kB time=00:00:34.30 bitrate=12104.6kbitsframe=  880 fps= 32 q=22.0 size=   51456kB time=00:00:34.88 bitrate=12085.1kbitsframe=  898 fps= 32 q=22.0 size=   52480kB time=00:00:35.54 bitrate=12096.2kbitsframe=  913 fps= 32 q=22.0 size=   53504kB time=00:00:36.18 bitrate=12114.1kbitsframe=  923 fps= 32 q=22.0 size=   54016kB time=00:00:36.54 bitrate=12108.7kbitsframe=  940 fps= 32 q=22.0 size=   55040kB time=00:00:37.20 bitrate=12118.9kbitsframe=  958 fps= 32 q=22.0 size=   55808kB time=00:00:37.90 bitrate=12059.8kbitsframe=  975 fps= 32 q=22.0 size=   56832kB time=00:00:38.61 bitrate=12057.2kbitsframe=  994 fps= 32 q=22.0 size=   58112kB time=00:00:39.38 bitrate=12088.3kbitsframe= 1012 fps= 32 q=22.0 size=   59136kB time=00:00:40.02 bitrate=12104.6kbitsframe= 1026 fps= 32 q=22.0 size=   59904kB time=00:00:40.64 bitrate=12075.1kbitsframe= 1038 fps= 31 q=22.0 size=   60928kB time=00:00:41.21 bitrate=12109.9kbitsframe= 1046 fps= 31 q=22.0 size=   61440kB time=00:00:41.53 bitrate=12117.6kbitsframe= 1057 fps= 31 q=22.0 size=   61952kB time=00:00:41.87 bitrate=12119.0kbitsframe= 1071 fps= 31 q=22.0 size=   62976kB time=00:00:42.45 bitrate=12152.2kbitsframe= 1083 fps= 31 q=22.0 size=   63488kB time=00:00:42.90 bitrate=12123.0kbitsframe= 1096 fps= 31 q=22.0 size=   64256kB time=00:00:43.41 bitrate=12125.0kbitsframe= 1110 fps= 31 q=22.0 size=   65280kB time=00:00:44.09 bitrate=12127.5kbitsframe= 1126 fps= 31 q=22.0 size=   66048kB time=00:00:44.62 bitrate=12123.5kbitsframe= 1131 fps= 30 q=19.0 size=   66560kB time=00:00:44.86 bitrate=12153.6kbitsframe= 1147 fps= 30 q=22.0 size=   67584kB time=00:00:45.46 bitrate=12178.4kbitsframe= 1155 fps= 30 q=22.0 size=   68096kB time=00:00:45.88 bitrate=12156.6kbitsframe= 1167 fps= 30 q=22.0 size=   68864kB time=00:00:46.33 bitrate=12174.9kbitsframe= 1175 fps= 30 q=22.0 size=   69376kB time=00:00:46.59 bitrate=12198.0kbitsframe= 1184 fps= 30 q=22.0 size=   70144kB time=00:00:46.93 bitrate=12243.3kbitsframe= 1196 fps= 30 q=22.0 size=   70912kB time=00:00:47.44 bitrate=12243.8kbitsframe= 1211 fps= 30 q=22.0 size=   71936kB time=00:00:48.06 bitrate=12260.7kbitsframe= 1226 fps= 30 q=22.0 size=   73216kB time=00:00:48.66 bitrate=12325.7kbitsframe= 1240 fps= 29 q=22.0 size=   73984kB time=00:00:49.17 bitrate=12325.3kbitsframe= 1256 fps= 29 q=22.0 size=   75264kB time=00:00:49.85 bitrate=12366.9kbitsframe= 1271 fps= 29 q=22.0 size=   76032kB time=00:00:50.43 bitrate=12350.4kbitsframe= 1280 fps= 29 q=22.0 size=   76800kB time=00:00:50.81 bitrate=12380.9kbitsframe= 1288 fps= 29 q=22.0 size=   77312kB time=00:00:51.13 bitrate=12385.4kbitsframe= 1295 fps= 29 q=22.0 size=   77824kB time=00:00:51.39 bitrate=12405.3kbitsframe= 1303 fps= 29 q=22.0 size=   78080kB time=00:00:51.73 bitrate=12364.0kbitsframe= 1316 fps= 29 q=22.0 size=   78848kB time=00:00:52.28 bitrate=12353.2kbitsframe= 1331 fps= 29 q=22.0 size=   79872kB time=00:00:52.86 bitrate=12377.3kbitsframe= 1349 fps= 29 q=22.0 size=   80896kB time=00:00:53.56 bitrate=12371.2kbitsframe= 1364 fps= 29 q=22.0 size=   81920kB time=00:00:54.14 bitrate=12394.5kbitsframe= 1379 fps= 29 q=22.0 size=   82944kB time=00:00:54.74 bitrate=12412.5kbitsframe= 1396 fps= 29 q=22.0 size=   83968kB time=00:00:55.38 bitrate=12420.5kbitsframe= 1417 fps= 29 q=22.0 size=   84992kB time=00:00:56.27 bitrate=12371.9kbitsframe= 1438 fps= 29 q=22.0 size=   86016kB time=00:00:57.10 bitrate=12338.5kbitsframe= 1458 fps= 29 q=22.0 size=   87040kB time=00:00:57.92 bitrate=12310.6kbitsframe= 1478 fps= 29 q=22.0 size=   88064kB time=00:00:58.64 bitrate=12301.4kbitsframe= 1498 fps= 29 q=22.0 size=   89088kB time=00:00:59.47 bitrate=12270.4kbits[mp4 @ 0x7ff666813200] Starting second pass: moving the moov atom to the beginning of the file
frame= 1500 fps= 28 q=-1.0 Lsize=   91853kB time=00:00:59.98 bitrate=12543.2kbits/s speed=1.13x    
video:90866kB audio:941kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.049858%
[libx264 @ 0x7ff666814400] frame I:12    Avg QP:18.57  size:116766
[libx264 @ 0x7ff666814400] frame P:426   Avg QP:20.52  size: 87768
[libx264 @ 0x7ff666814400] frame B:1062  Avg QP:23.56  size: 51088
[libx264 @ 0x7ff666814400] consecutive B-frames:  2.5%  6.4%  9.0% 82.1%
[libx264 @ 0x7ff666814400] mb I  I16..4:  1.0% 87.7% 11.3%
[libx264 @ 0x7ff666814400] mb P  I16..4:  0.5% 23.0%  4.2%  P16..4: 25.2% 30.8% 16.1%  0.0%  0.0%    skip: 0.1%
[libx264 @ 0x7ff666814400] mb B  I16..4:  0.1%  1.3%  0.6%  B16..8: 37.5% 21.2%  9.4%  direct:28.6%  skip: 1.4%  L0:31.5% L1:22.8% BI:45.8%
[libx264 @ 0x7ff666814400] 8x8 transform intra:80.8% inter:75.0%
[libx264 @ 0x7ff666814400] coded y,uvDC,uvAC intra: 97.5% 95.0% 63.3% inter: 90.0% 62.4% 12.3%
[libx264 @ 0x7ff666814400] i16 v,h,dc,p: 36% 46%  6% 12%
[libx264 @ 0x7ff666814400] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 16% 25%  5%  6%  7%  7%  8% 12%
[libx264 @ 0x7ff666814400] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 29% 12%  6%  7%  6% 10%  7% 13%
[libx264 @ 0x7ff666814400] i8c dc,h,v,p: 36% 30% 20% 14%
[libx264 @ 0x7ff666814400] Weighted P-Frames: Y:29.3% UV:14.1%
[libx264 @ 0x7ff666814400] ref P L0: 39.8% 15.4% 21.2% 19.9%  3.8%
[libx264 @ 0x7ff666814400] ref B L0: 76.4% 19.1%  4.5%
[libx264 @ 0x7ff666814400] ref B L1: 90.7%  9.3%
[libx264 @ 0x7ff666814400] kb/s:12406.19
[aac @ 0x7ff666815c00] Qavg: 181.322


    


  • Use ffmpeg to extract picture from m4v file

    31 octobre 2017, par Brian

    I used a program called MetaZ on my mac to tag all my video files (m4v). I am now trying to use these m4v files in Kodi which requires .nfo files and separate picture files for movie posters, etc. I want to extract the picture that is already in the m4v file.

    When I use ffprobe -show_streams, I can see that index4 is a png file (codec_name=png). How do I extract it ? I believe ffmpeg can do it, but can’t figure out how.

    Here is the output from ffprobe :

    Brians-Mac-mini:PythonScript brianjhille$ ffprobe -show_streams badwords.m4v
    ffprobe version N-88046-g0cb8369-tessus Copyright (c) 2007-2017 the FFmpeg developers
     built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
     configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
     libavutil      56.  0.100 / 56.  0.100
     libavcodec     58.  0.100 / 58.  0.100
     libavformat    58.  0.100 / 58.  0.100
     libavdevice    58.  0.100 / 58.  0.100
     libavfilter     7.  0.100 /  7.  0.100
     libswscale      5.  0.100 /  5.  0.100
     libswresample   3.  0.100 /  3.  0.100
     libpostproc    55.  0.100 / 55.  0.100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fd67b002a00] stream 0, timescale not set
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'badwords.m4v':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: mp42isomavc1
       creation_time   : 2014-10-20T13:01:06.000000Z
       iTunEXTC        : mpaa|R|400|
       title           : Bad Words
       artist          : Jason Bateman, Kathryn Hahn, Allison Janney, Philip Baker Hall, Rohan Chand, Ben Falcone, Patricia Belcher, Beth Grant, Rachel Harris, Steve Witting, Greg Cromer
       date            : 2013-09-06T11:00:00Z
       track           : 0
       disc            : 0
       season_number   : 0
       episode_sort    : 0
       description     : A spelling bee loser sets out to exact revenge by finding a loophole and attempting to win as an adult.
       synopsis        : A spelling bee loser sets out to exact revenge by finding a loophole and attempting to win as an adult.
       encoder         : HandBrake 0.9.9 2013052900
       hd_video        : 0
       media_type      : 9
       genre           : Comedy
       iTunMOVI        : <?xml version="1.0" encoding="UTF-8"?>
                       :
                       : <plist version="1.0">
                       : <dict>
                       :   <key>cast</key>
                       :   <array>
                       :       <dict>
                       :           <key>name</key>
                       :           <string>Jason Bateman</string>
                       :       </dict>
                       :       <dict>
                       :           <key>name</key>
                       :           <string>Kathryn Hahn</string>
                       :       </dict>
                       :       <dict>
                       :           <key>name</key>
                       :           <string>Allison Janney</string>
                       :       </dict>
                       :       <dict>
                       :           <key>name</key>
                       :           <string>Philip Baker Hall</string>
                       :       </dict>
                       :       <dict>
                       :           <key>name</key>
                       :           <string>Rohan Chand</string>
                       :       </dict>
                       :       <dict>
                       :           <key>name</key>
                       :           <string>Ben Falcone</string>
                       :       </dict>
                       :       <dict>
                       :           <key>name</key>
                       :           <string>Patricia Belcher</string>
                       :       </dict>
                       :       <dict>
                       :           <key>name</key>
                       :           <string>Beth Grant</string>
                       :       </dict>
                       :       <dict>
                       :           <key>name</key>
                       :           <string>Rachel Harris</string>
                       :       </dict>
                       :       <dict>
                       :           <key>name</key>
                       :           <string>Steve Witting</string>
                       :       </dict>
                       :       <dict>
                       :           <key>name</key>
                       :           <string>Greg Cromer</string>
                       :       </dict>
                       :   </array>
                       : </dict>
                       : </plist>
                       :
     Duration: 01:29:02.84, start: 0.000000, bitrate: 1339 kb/s
       Chapter #0:0: start 0.000000, end 348.214000
       Metadata:
         title           : Chapter 1
       Chapter #0:1: start 348.214000, end 676.542000
       Metadata:
         title           : Chapter 2
       Chapter #0:2: start 676.542000, end 860.058000
       Metadata:
         title           : Chapter 3
       Chapter #0:3: start 860.058000, end 1171.836000
       Metadata:
         title           : Chapter 4
       Chapter #0:4: start 1171.836000, end 1441.839000
       Metadata:
         title           : Chapter 5
       Chapter #0:5: start 1441.839000, end 1632.129000
       Metadata:
         title           : Chapter 6
       Chapter #0:6: start 1632.129000, end 1925.422000
       Metadata:
         title           : Chapter 7
       Chapter #0:7: start 1925.422000, end 2167.030000
       Metadata:
         title           : Chapter 8
       Chapter #0:8: start 2167.030000, end 2409.605000
       Metadata:
         title           : Chapter 9
       Chapter #0:9: start 2409.605000, end 2748.276000
       Metadata:
         title           : Chapter 10
       Chapter #0:10: start 2748.276000, end 2917.945000
       Metadata:
         title           : Chapter 11
       Chapter #0:11: start 2917.945000, end 3309.502000
       Metadata:
         title           : Chapter 12
       Chapter #0:12: start 3309.502000, end 3634.660000
       Metadata:
         title           : Chapter 13
       Chapter #0:13: start 3634.660000, end 3942.434000
       Metadata:
         title           : Chapter 14
       Chapter #0:14: start 3942.434000, end 4101.626000
       Metadata:
         title           : Chapter 15
       Chapter #0:15: start 4101.626000, end 4336.193000
       Metadata:
         title           : Chapter 16
       Chapter #0:16: start 4336.193000, end 4620.643000
       Metadata:
         title           : Chapter 17
       Chapter #0:17: start 4620.643000, end 4873.729000
       Metadata:
         title           : Chapter 18
       Chapter #0:18: start 4873.729000, end 5153.341000
       Metadata:
         title           : Chapter 19
       Chapter #0:19: start 5153.341000, end 5342.796000
       Metadata:
         title           : Chapter 20
       Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709), 720x356 [SAR 32:27 DAR 640:267], 716 kb/s, 23.98 fps, 59.94 tbr, 90k tbn, 180k tbc (default)
       Metadata:
         creation_time   : 2014-10-20T13:01:06.000000Z
         encoder         : JVT/AVC Coding
       Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 159 kb/s (default)
       Metadata:
         creation_time   : 2014-10-20T13:01:06.000000Z
       Stream #0:2(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 448 kb/s
       Metadata:
         creation_time   : 2014-10-20T13:01:06.000000Z
       Side data:
         audio service type: main
       Stream #0:3(und): Data: bin_data (text / 0x74786574)
       Metadata:
         creation_time   : 2014-10-21T13:42:00.000000Z
       Stream #0:4: Video: png, rgb24(pc), 1400x2100, 90k tbr, 90k tbn, 90k tbc
    Unsupported codec with id 100359 for input stream 3
    [STREAM]
    index=0
    codec_name=h264
    codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
    profile=Constrained Baseline
    codec_type=video
    codec_time_base=40071281/1921695000
    codec_tag_string=avc1
    codec_tag=0x31637661
    width=720
    height=356
    coded_width=720
    coded_height=356
    has_b_frames=0
    sample_aspect_ratio=32:27
    display_aspect_ratio=640:267
    pix_fmt=yuv420p
    level=30
    color_range=tv
    color_space=smpte170m
    color_transfer=bt709
    color_primaries=smpte170m
    chroma_location=left
    field_order=unknown
    timecode=N/A
    refs=1
    is_avc=true
    nal_length_size=4
    id=N/A
    r_frame_rate=60000/1001
    avg_frame_rate=960847500/40071281
    time_base=1/90000
    start_pts=0
    start_time=0.000000
    duration_ts=480855372
    duration=5342.837467
    bit_rate=716167
    max_bit_rate=N/A
    bits_per_raw_sample=8
    nb_frames=128113
    nb_read_frames=N/A
    nb_read_packets=N/A
    DISPOSITION:default=1
    DISPOSITION:dub=0
    DISPOSITION:original=0
    DISPOSITION:comment=0
    DISPOSITION:lyrics=0
    DISPOSITION:karaoke=0
    DISPOSITION:forced=0
    DISPOSITION:hearing_impaired=0
    DISPOSITION:visual_impaired=0
    DISPOSITION:clean_effects=0
    DISPOSITION:attached_pic=0
    DISPOSITION:timed_thumbnails=0
    TAG:creation_time=2014-10-20T13:01:06.000000Z
    TAG:language=und
    TAG:encoder=JVT/AVC Coding
    [/STREAM]
    [STREAM]
    index=1
    codec_name=aac
    codec_long_name=AAC (Advanced Audio Coding)
    profile=LC
    codec_type=audio
    codec_time_base=1/48000
    codec_tag_string=mp4a
    codec_tag=0x6134706d
    sample_fmt=fltp
    sample_rate=48000
    channels=2
    channel_layout=stereo
    bits_per_sample=0
    id=N/A
    r_frame_rate=0/0
    avg_frame_rate=0/0
    time_base=1/48000
    start_pts=0
    start_time=0.000000
    duration_ts=256454656
    duration=5342.805333
    bit_rate=159788
    max_bit_rate=321176
    bits_per_raw_sample=N/A
    nb_frames=250444
    nb_read_frames=N/A
    nb_read_packets=N/A
    DISPOSITION:default=1
    DISPOSITION:dub=0
    DISPOSITION:original=0
    DISPOSITION:comment=0
    DISPOSITION:lyrics=0
    DISPOSITION:karaoke=0
    DISPOSITION:forced=0
    DISPOSITION:hearing_impaired=0
    DISPOSITION:visual_impaired=0
    DISPOSITION:clean_effects=0
    DISPOSITION:attached_pic=0
    DISPOSITION:timed_thumbnails=0
    TAG:creation_time=2014-10-20T13:01:06.000000Z
    TAG:language=eng
    [/STREAM]
    [STREAM]
    index=2
    codec_name=ac3
    codec_long_name=ATSC A/52A (AC-3)
    profile=unknown
    codec_type=audio
    codec_time_base=1/48000
    codec_tag_string=ac-3
    codec_tag=0x332d6361
    sample_fmt=fltp
    sample_rate=48000
    channels=6
    channel_layout=5.1(side)
    bits_per_sample=0
    dmix_mode=-1
    ltrt_cmixlev=-1.000000
    ltrt_surmixlev=-1.000000
    loro_cmixlev=-1.000000
    loro_surmixlev=-1.000000
    id=N/A
    r_frame_rate=0/0
    avg_frame_rate=0/0
    time_base=1/48000
    start_pts=0
    start_time=0.000000
    duration_ts=256453632
    duration=5342.784000
    bit_rate=448000
    max_bit_rate=N/A
    bits_per_raw_sample=N/A
    nb_frames=166962
    nb_read_frames=N/A
    nb_read_packets=N/A
    DISPOSITION:default=0
    DISPOSITION:dub=0
    DISPOSITION:original=0
    DISPOSITION:comment=0
    DISPOSITION:lyrics=0
    DISPOSITION:karaoke=0
    DISPOSITION:forced=0
    DISPOSITION:hearing_impaired=0
    DISPOSITION:visual_impaired=0
    DISPOSITION:clean_effects=0
    DISPOSITION:attached_pic=0
    DISPOSITION:timed_thumbnails=0
    TAG:creation_time=2014-10-20T13:01:06.000000Z
    TAG:language=eng
    [SIDE_DATA]
    side_data_type=Audio Service Type
    [/SIDE_DATA]
    [/STREAM]
    [STREAM]
    index=3
    codec_name=bin_data
    codec_long_name=binary data
    profile=unknown
    codec_type=data
    codec_tag_string=text
    codec_tag=0x74786574
    id=N/A
    r_frame_rate=0/0
    avg_frame_rate=0/0
    time_base=1/1000
    start_pts=0
    start_time=0.000000
    duration_ts=5342837
    duration=5342.837000
    bit_rate=N/A
    max_bit_rate=N/A
    bits_per_raw_sample=N/A
    nb_frames=20
    nb_read_frames=N/A
    nb_read_packets=N/A
    DISPOSITION:default=0
    DISPOSITION:dub=0
    DISPOSITION:original=0
    DISPOSITION:comment=0
    DISPOSITION:lyrics=0
    DISPOSITION:karaoke=0
    DISPOSITION:forced=0
    DISPOSITION:hearing_impaired=0
    DISPOSITION:visual_impaired=0
    DISPOSITION:clean_effects=0
    DISPOSITION:attached_pic=0
    DISPOSITION:timed_thumbnails=0
    TAG:creation_time=2014-10-21T13:42:00.000000Z
    TAG:language=und
    [/STREAM]
    [STREAM]
    index=4
    codec_name=png
    codec_long_name=PNG (Portable Network Graphics) image
    profile=unknown
    codec_type=video
    codec_time_base=0/1
    codec_tag_string=[0][0][0][0]
    codec_tag=0x0000
    width=1400
    height=2100
    coded_width=1400
    coded_height=2100
    has_b_frames=0
    sample_aspect_ratio=0:1
    display_aspect_ratio=0:1
    pix_fmt=rgb24
    level=-99
    color_range=pc
    color_space=unknown
    color_transfer=unknown
    color_primaries=unknown
    chroma_location=unspecified
    field_order=unknown
    timecode=N/A
    refs=1
    id=N/A
    r_frame_rate=90000/1
    avg_frame_rate=0/0
    time_base=1/90000
    start_pts=0
    start_time=0.000000
    duration_ts=480855372
    duration=5342.837467
    bit_rate=N/A
    max_bit_rate=N/A
    bits_per_raw_sample=N/A
    nb_frames=N/A
    nb_read_frames=N/A
    nb_read_packets=N/A
    DISPOSITION:default=0
    DISPOSITION:dub=0
    DISPOSITION:original=0
    DISPOSITION:comment=0
    DISPOSITION:lyrics=0
    DISPOSITION:karaoke=0
    DISPOSITION:forced=0
    DISPOSITION:hearing_impaired=0
    DISPOSITION:visual_impaired=0
    DISPOSITION:clean_effects=0
    DISPOSITION:attached_pic=1
    DISPOSITION:timed_thumbnails=0
    [/STREAM]

    Thanks. Brian