Recherche avancée

Médias (91)

Autres articles (57)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

  • Sélection de projets utilisant MediaSPIP

    29 avril 2011, par

    Les exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
    Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
    Ferme MediaSPIP @ Infini
    L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)

Sur d’autres sites (4659)

  • Python FFmpeg : Setting VBR and BT.709

    14 décembre 2019, par Cryptonaut

    I’m using this Python library to programmatically generate a short video using an image (.png) as input. The video needs to match the specifications of another video created by someone else.

    The key differences between my output and the other are the following (these are the media attributes I desire to have) :

    How would I achieve VBR ? It was my understanding ProRes 422 HQ natively used unconstrained VBR yet my output specifies CBR.

    Secondly, as can be seen from my code, I’m attempting to conform to BT.709. However, my media information output does not specify this. What am I doing incorrectly ?

    Here’s my code :

       image = ffmpeg.input(input_image, t='00:00:10', framerate='24000/1001', loop='1', probesize='42M')

       output = ffmpeg.output(image, output_video,
       f='mov',
       vcodec='prores_ks',
       vprofile='3',
       pix_fmt='yuv422p10le',
       g='48',
       video_track_timescale='24000',
       movflags='use_metadata_tags',
       timecode='00:00:00:00',
       color_primaries='bt709',
       color_trc='bt709',
       colorspace='bt709',
       qcomp='1',
       # BT.709 issue solved by adding the bsf option as seen via the line below
       bsf='prores_metadata=color_primaries=bt709:color_trc=bt709:colorspace=bt709',
       vf='scale=in_range=full:in_color_matrix=bt709:out_range=full:out_color_matrix=bt709')

       output.run()

    Here’s the media information produced by my output :

    {
      "media":{
         "@ref":"Redacted",
         "track":[
            {
               "@type":"General",
               "VideoCount":"1",
               "OtherCount":"1",
               "FileExtension":"mov",
               "Format":"MPEG-4",
               "Format_Profile":"QuickTime",
               "CodecID":"qt  ",
               "CodecID_Version":"0000.02",
               "CodecID_Compatible":"qt  ",
               "FileSize":"196366623",
               "Duration":"10.010",
               "OverallBitRate":"156936362",
               "FrameRate":"23.976",
               "FrameCount":"240",
               "StreamSize":"2463",
               "HeaderSize":"28",
               "DataSize":"196364172",
               "FooterSize":"2423",
               "IsStreamable":"No",
               "File_Created_Date":"UTC 2019-12-13 19:26:37.150",
               "File_Created_Date_Local":"2019-12-13 19:26:37.150",
               "File_Modified_Date":"UTC 2019-12-13 19:27:20.303",
               "File_Modified_Date_Local":"2019-12-13 19:27:20.303"
            },
            {
               "@type":"Video",
               "StreamOrder":"0",
               "ID":"1",
               "Format":"ProRes",
               "Format_Version":"0",
               "Format_Profile":"422 HQ",
               "CodecID":"apch",
               "Duration":"10.010",
               "BitRate_Mode":"CBR",
               "BitRate":"156934237",
               "Width":"1920",
               "Height":"1080",
               "Sampled_Width":"1920",
               "Sampled_Height":"1080",
               "PixelAspectRatio":"1.000",
               "DisplayAspectRatio":"1.778",
               "Rotation":"0.000",
               "FrameRate_Mode":"CFR",
               "FrameRate":"23.976",
               "FrameCount":"240",
               "ColorSpace":"YUV",
               "ChromaSubsampling":"4:2:2",
               "ScanType":"Progressive",
               "Delay":"0.000",
               "StreamSize":"196364160",
               "Encoded_Library":"Lavc",
               "colour_description_present":"Yes",
               "colour_description_present_Source":"Stream",
               "colour_primaries_Source":"Stream",
               "transfer_characteristics_Source":"Stream",
               "matrix_coefficients_Source":"Stream"
            },
            {
               "@type":"Other",
               "StreamOrder":"1",
               "ID":"2",
               "Type":"Time code",
               "Format":"QuickTime TC",
               "Duration":"10.010",
               "FrameRate":"23.976",
               "TimeCode_FirstFrame":"00:00:00:00",
               "TimeCode_Striped":"Yes",
               "Language":"en",
               "Default":"No"
            }
         ]
      }
    }

    Here’s the media information spec I’m trying to match :

    {
      "media":{
         "@ref":"Redacted",
         "track":[
            {
               "@type":"General",
               "VideoCount":"1",
               "OtherCount":"1",
               "FileExtension":"mov",
               "Format":"MPEG-4",
               "Format_Profile":"QuickTime",
               "CodecID":"qt  ",
               "CodecID_Version":"2005.03",
               "CodecID_Compatible":"qt  ",
               "FileSize":"1397430682",
               "Duration":"70.737",
               "OverallBitRate_Mode":"VBR",
               "OverallBitRate":"158042403",
               "FrameRate":"23.976",
               "FrameCount":"1696",
               "StreamSize":"9898",
               "HeaderSize":"28",
               "DataSize":"1397420796",
               "FooterSize":"9858",
               "IsStreamable":"No",
               "Encoded_Date":"UTC 2019-04-29 22:26:32",
               "Tagged_Date":"UTC 2019-04-29 22:26:32",
               "File_Created_Date":"UTC 2019-12-12 16:52:57.215",
               "File_Created_Date_Local":"2019-12-12 16:52:57.215",
               "File_Modified_Date":"UTC 2019-12-12 17:25:58.903",
               "File_Modified_Date_Local":"2019-12-12 17:25:58.903",
               "Encoded_Application":"DVP Factory r561 (2019-04-25), Host: dvp07"
            },
            {
               "@type":"Video",
               "StreamOrder":"0",
               "ID":"1",
               "Format":"ProRes",
               "Format_Version":"0",
               "Format_Profile":"422 HQ",
               "CodecID":"apch",
               "Duration":"70.737",
               "Duration_LastFrame":"-0.000",
               "BitRate_Mode":"VBR",
               "BitRate":"158040381",
               "Width":"1920",
               "Height":"1080",
               "Sampled_Width":"1920",
               "Sampled_Height":"1080",
               "PixelAspectRatio":"1.000",
               "DisplayAspectRatio":"1.778",
               "Rotation":"0.000",
               "FrameRate_Mode":"CFR",
               "FrameRate":"23.976",
               "FrameCount":"1696",
               "ColorSpace":"YUV",
               "ChromaSubsampling":"4:2:2",
               "ScanType":"Progressive",
               "Delay":"0.000",
               "StreamSize":"1397420784",
               "Encoded_Library":"agi0",
               "Language":"en",
               "Encoded_Date":"UTC 2019-04-29 22:26:32",
               "Tagged_Date":"UTC 2019-04-29 22:26:32",
               "colour_description_present":"Yes",
               "colour_description_present_Source":"Container / Stream",
               "colour_primaries":"BT.709",
               "colour_primaries_Source":"Container",
               "colour_primaries_Original_Source":"Stream",
               "transfer_characteristics":"BT.709",
               "transfer_characteristics_Source":"Container",
               "transfer_characteristics_Original_Source":"Stream",
               "matrix_coefficients":"BT.709",
               "matrix_coefficients_Source":"Container / Stream"
            },
            {
               "@type":"Other",
               "StreamOrder":"1",
               "ID":"2",
               "Type":"Time code",
               "Format":"QuickTime TC",
               "Duration":"70.737",
               "FrameRate":"23.976",
               "TimeCode_FirstFrame":"00:00:00:00",
               "TimeCode_Striped":"Yes",
               "Language":"en",
               "extra":{
                  "Encoded_Date":"UTC 2019-04-29 22:26:32",
                  "Tagged_Date":"UTC 2019-04-29 22:26:32"
               }
            }
         ]
      }
    }
  • ffmpeg stuck in generating thumbnail of video [closed]

    10 décembre 2019, par user6121419

    I’m trying to create a thumbnail of a .mov video with ffmpeg, but it gets stuck.
    I tried the same command on 2 different machines and with different types of arguments, but nothing changed the result. The video itself can be viewed without a problem, so it shouldn’t be corrupted.
    The video was taken on an iphone at 4k 60fps.

    What I’ve tried :

    ffmpeg -i IMG_1001.MOV -ss 00:00:02 -vframes 1 thumbnail.jpg

    It gets stuck at the third last line frame= 0 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A speed=   0x and from then on, I stopped the process with ctrl+c

    Output :

    ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
     built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
     configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
     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
     libavresample   3.  7.  0 /  3.  7.  0
     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 'IMG_1001.MOV':
     Metadata:
       major_brand     : qt
       minor_version   : 0
       compatible_brands: qt
       creation_time   : 2019-11-xx
       com.apple.quicktime.make: Apple
       com.apple.quicktime.model: iPhone 8
       com.apple.quicktime.software: 13.2.2
       com.apple.quicktime.creationdate: 2019-11-xx
     Duration: 00:00:05.18, start: 0.000000, bitrate: 54961 kb/s
       Stream #0:0(und): Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, bt709), 3840x2160, 54851 kb/s, 60 fps, 60 tbr, 600 tbn, 600 tbc (default)
       Metadata:
         creation_time   : 2019-11-xx
         handler_name    : Core Media Data Handler
         encoder         : HEVC
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 94 kb/s (default)
       Metadata:
         creation_time   : 2019-11-xx
         handler_name    : Core Media Data Handler
       Stream #0:2(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
       Metadata:
         creation_time   : 2019-11-xx
         handler_name    : Core Media Data Handler
       Stream #0:3(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
       Metadata:
         creation_time   : 2019-11-xx
         handler_name    : Core Media Data Handler
    Stream mapping:
     Stream #0:0 -> #0:0 (hevc (native) -> mjpeg (native))
    Press [q] to stop, [?] for help
    [swscaler @ 0x55d83a288940] deprecated pixel format used, make sure you did set range correctly
    Output #0, image2, to 'thumbnail.jpg':
     Metadata:
       major_brand     : qt
       minor_version   : 0
       compatible_brands: qt
       com.apple.quicktime.creationdate: 2019-11-xx
       com.apple.quicktime.make: Apple
       com.apple.quicktime.model: iPhone 8
       com.apple.quicktime.software: 13.2.2
       encoder         : Lavf57.83.100
       Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 3840x2160, q=2-31, 200 kb/s, 60 fps, 60 tbn, 60 tbc (default)
       Metadata:
         creation_time   : 2019-11-xx
         handler_name    : Core Media Data Handler
         encoder         : Lavc57.107.100 mjpeg
       Side data:
         cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
    frame=    0 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A speed=   0x
    video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)

    Any idea on what it could be ? Am I missing something or could it be that the encoding can’t be read properly by ffmpeg ? Besides that I haven’t found any alternative to generate thumbnails from videos on linux

  • Python - playing video using ffplay displays file in larger resolution

    10 décembre 2019, par derBrain

    I’m working on a simple script that plays a video using ffplay.
    The problem I’m running into is that the output file has a larger resolution than it should have.
    The resolution of the file to be played is 1280x720, however, when I open the file with ffplay, the output is scaled to 1920x1080.
    I even tried to downscale the output by factor 1.5 (to get it to play in 1280x720), but the quality is noticeably worse compared to playing the same file in VLC player.
    What am I missing here ?

    This is the code I’m using :

    dbFile = "file.mp4"
    open_dbFile = "ffplay {0} -window_title {1} -left 50 -top 50 -nostats".format(dbFile, "DB_file")
    sub.Popen(open_dbFile)

    this is the log :

    ffplay version N-95171-g6ca3d34ff8 Copyright (c) 2003-2019 the FFmpeg developers
     built with gcc 9.2.1 (GCC) 20190918

    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-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
     libavutil      56. 35.100 / 56. 35.100
     libavcodec     58. 59.101 / 58. 59.101
     libavformat    58. 33.100 / 58. 33.100
     libavdevice    58.  9.100 / 58.  9.100
     libavfilter     7. 59.100 /  7. 59.100
     libswscale      5.  6.100 /  5.  6.100
     libswresample   3.  6.100 /  3.  6.100
     libpostproc    55.  6.100 / 55.  6.100

    Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: isommp42
       creation_time   : 2017-12-24T15:03:27.000000Z
     Duration: 00:08:36.83, start: 0.000000, bitrate: 588 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 459 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc (default)
       Metadata:
         creation_time   : 2017-12-24T15:03:27.000000Z
         handler_name    : ISO Media file produced by Google Inc. Created on: 12/24/2017.
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
       Metadata:
         creation_time   : 2017-12-24T15:03:27.000000Z
         handler_name    : ISO Media file produced by Google Inc. Created on: 12/24/2017.
      1.59 A-V: -0.014 fd=   0 aq=   19KB vq=   30KB sq=    0B f=0/0

    Thanks for your help !
    db