Recherche avancée

Médias (3)

Mot : - Tags -/collection

Autres articles (104)

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

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

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

Sur d’autres sites (9905)

  • How to remove everything but video and stereo audio stream from video with ffmpeg ?

    20 octobre 2019, par user3776738

    I’m trying to get a clean h264 video from a mkv file.With clean I mean that it has only a video stream plus stereo sound.
    The inputfile can have multiple channels and subtitles and other unknown stuff, which I don’t need.
    I’m using ffmpeg with this command :

    ffmpeg -i "input.mkv" -ac 2 -vf scale=trunc(oh*a/2)*2:480 -c:v libx264 "output.mp4"

    This should give me a 480p video with stereo sound,which I require.
    I tried multiple -map or dispositions commands with ffmpeg to remove the subtitles whithout any success.

    How can I remove everything but video and stereo stream with ffmpeg and get a 480p stereo sound video ?

    Edit :
    Output of ffmpeg - "input.mkv" -i "output.mp4" :

    ffmpeg -i "input.mkv" -i "output.mp4"
    ffmpeg version N-91972-gbd10c1e9a8 Copyright (c) 2000-2018 the FFmpeg developer

     built with gcc 8.2.1 (GCC) 20180813
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconf
    g --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-li
    freetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-am
    wb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy -
    enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-
    ibwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 -
    enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --e
    able-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --e
    able-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --
    nable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --ena
    le-avisynth
     libavutil      56. 19.101 / 56. 19.101
     libavcodec     58. 30.100 / 58. 30.100
     libavformat    58. 18.101 / 58. 18.101
     libavdevice    58.  4.103 / 58.  4.103
     libavfilter     7. 32.100 /  7. 32.100
     libswscale      5.  2.100 /  5.  2.100
     libswresample   3.  2.100 /  3.  2.100
     libpostproc    55.  2.100 / 55.  2.100
    [hevc @ 00000000004a5940] Invalid default display window
    Input #0, matroska,webm, from 'input.mkv':
     Metadata:
       title           : Elysium (2013)
       encoder         : libebml v1.3.3 + libmatroska v1.4.4
       creation_time   : 2016-01-05T22:30:41.000000Z
     Duration: 00:01:02.73, start: 0.166000, bitrate: 53638 kb/s
       Chapter #0:0: start 0.000000, end 62.896000
       Metadata:
         title           : 00:00:00.000
       Stream #0:0(eng): Video: hevc (Main 10), yuv420p10le(tv), 3840x1606, SAR 1:
    DAR 1920:803, 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
       Metadata:
         title           : Elysium (2013) - Release for ULTRAHDCLUB
         BPS             : 51036975
         BPS-eng         : 51036975
         DURATION        : 00:01:02.604000000
         DURATION-eng    : 00:01:02.604000000
         NUMBER_OF_FRAMES: 1501
         NUMBER_OF_FRAMES-eng: 1501
         NUMBER_OF_BYTES : 399389852
         NUMBER_OF_BYTES-eng: 399389852
         _STATISTICS_WRITING_APP: mkvmerge v8.7.0 ('All of the above') 64bit
         _STATISTICS_WRITING_APP-eng: mkvmerge v8.7.0 ('All of the above') 64bit
         _STATISTICS_WRITING_DATE_UTC: 2016-01-05 22:30:41
         _STATISTICS_WRITING_DATE_UTC-eng: 2016-01-05 22:30:41
         _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
         _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
       Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 7.1, s16p (default)
       Metadata:
         title           : DTS-HD MA 7.1 - Blu-ray CEE
         BPS             : 2706639
         BPS-eng         : 2706639
         DURATION        : 00:01:02.561000000
         DURATION-eng    : 00:01:02.561000000
         NUMBER_OF_FRAMES: 5865
         NUMBER_OF_FRAMES-eng: 5865
         NUMBER_OF_BYTES : 21166260
         NUMBER_OF_BYTES-eng: 21166260
         _STATISTICS_WRITING_APP: mkvmerge v8.7.0 ('All of the above') 64bit
         _STATISTICS_WRITING_APP-eng: mkvmerge v8.7.0 ('All of the above') 64bit
         _STATISTICS_WRITING_DATE_UTC: 2016-01-05 22:30:41
         _STATISTICS_WRITING_DATE_UTC-eng: 2016-01-05 22:30:41
         _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
         _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       title           : Elysium (2013)
       encoder         : Lavf58.18.101
     Duration: 00:01:02.73, start: 0.000000, bitrate: 1671 kb/s
       Chapter #1:0: start 0.000000, end 62.730000
       Metadata:
         title           : 00:00:00.000
       Stream #1:0(eng): Video: h264 (High 10) (avc1 / 0x31637661), yuv420p10le, 1
    46x480 [SAR 2030:2027 DAR 38773:16216], 1543 kb/s, SAR 15563:15540 DAR 1920:803
    23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #1:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fl
    p, 128 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
       Stream #1:2(eng): Data: bin_data (text / 0x74786574), 0 kb/s
       Metadata:
         handler_name    : SubtitleHandler
    At least one output file must be specified
  • FFmpeg upmix command stereo > 5.1

    2 octobre 2018, par CupNoodleFanatic

    I need to upmix stereo mkv files with chapter, subtitle, audio and video streams to 5.1 flac with a silent center channel. The audio is a single stereo stream, not two mono streams. I need the resulting mkv to contain a single 6 channel flac stream.

    My desired channel layout is FR = FR, FR > SR, FL = FL, FL > SL, Center silent, LFE = FR+FL

    I followed the FFmpeg documentation and was unable to produce the desired mapping.

    The command so far (generated with help from Axiom GUI) :

    ./ffmpeg -i TestIN.mkv -c:v copy -map 0:v? -map_chapters 0 -c:s copy -map 0:s? -c:a flac -sample_fmt s16 -rematrix_maxval 1.0 -ac 6 -map 0:a:0? -map_metadata 0 -f matroska -threads 0 X:\TestOUT.mkv

    Any help would be greatly appreciated.

  • Creating a sequence of images from lyrics to use in ffmpeg

    19 septembre 2018, par SKS

    I’m trying to make an MP3 + Lyric -> MP4 program in python.

    I have a lyrics file like this :

    [00:00.60]Revelation, chapter 4
    [00:02.34]After these things I looked,
    [00:04.10]and behold a door was opened in heaven,
    [00:06.41]and the first voice which I heard, as it were,
    [00:08.78]of a trumpet speaking with me, said:
    [00:11.09]Come up hither,
    [00:12.16]and I will shew thee the things which must be done hereafter.
    [00:15.78]And immediately I was in the spirit:
    [00:18.03]and behold there was a throne set in heaven,
    [00:20.72]and upon the throne one sitting.
    [00:22.85]And he that sat,
    [00:23.91]was to the sight like the jasper and the sardine stone;
    [00:26.97]and there was a rainbow round about the throne,
    [00:29.16]in sight like unto an emerald.
    [00:31.35]And round about the throne were four and twenty seats;
    [00:34.85]and upon the seats, four and twenty ancients sitting,
    [00:38.03]clothed in white garments, and on their heads were crowns of gold.
    [00:41.97]And from the throne proceeded lightnings, and voices, and thunders;
    [00:46.03]and there were seven lamps burning before the throne,
    [00:48.60]which are the seven spirits of God.
    [00:51.23]And in the sight of the throne was, as it were,
    [00:53.79]a sea of glass like to crystal;
    [00:56.16]and in the midst of the throne, and round about the throne,
    [00:59.29]were four living creatures, full of eyes before and behind.
    [01:03.79]And the first living creature was like a lion:

    I’m trying to create a sequence of images from the lyrics to use into ffmpeg.

    os.system(ffmpeg_path + " -r 2 -i " + images_path + "image%1d.png -i " + audio_file + " -vcodec mpeg4 -y " + video_name)

    I tried finding out the number of images to make for each line. I’ve tried subtracting the seconds of the next line from the current line. It works but produces very inconsistent results.

    import os
    import datetime
    import time
    import math
    from PIL import Image, ImageDraw


    ffmpeg_path = os.getcwd() + "\\ffmpeg\\bin\\ffmpeg.exe"
    images_path = os.getcwd() + "\\test_output\\"
    audio_file = os.getcwd() + "\\audio.mp3"
    lyric_file = os.getcwd() + "\\lyric.lrc"

    video_name = "movie.mp4"


    def save():

       lyric_to_images()
       os.system(ffmpeg_path + " -r 2 -i " + images_path + "image%1d.png -i " + audio_file + " -vcodec mpeg4 -y " + video_name)


    def lyric_to_images():

       file  = open(lyric_file, "r")

       data = file.readlines()

       startOfLyric = True
       lstTimestamp = []

       images_to_make = 0
       from_second = 0.0
       to_second = 0.0

       for line in data:
           vTime = line[1:9] # 00:00.60

           temp = vTime.split(':')

           minute = float(temp[0])
           #a = float(temp[1].split('.'))
           #second = float((minute * 60) + int(a[0]))
           second = (minute * 60) + float(temp[1])

           lstTimestamp.append(second)

       counter = 1

       for i, second in enumerate(lstTimestamp):

           if startOfLyric is True:
               startOfLyric = False
               #first line is always 3 seconds (images to make = 3x2)
               for x in range(1, 7):
                   writeImage(data[i][10:], 'image' + str(counter))
                   counter += 1
           else:
               from_second = lstTimestamp[i-1]
               to_second = second

               difference = to_second - from_second
               images_to_make = int(difference * 2)

               for x in range(1, int(images_to_make+1)):
                   writeImage(data[i-1][10:], 'image'+str(counter))
                   counter += 1

       file.close()

    def writeImage(v_text, filename):

       img = Image.new('RGB', (480, 320), color = (73, 109, 137))

       d = ImageDraw.Draw(img)
       d.text((10,10), v_text, fill=(255,255,0))

       img.save(os.getcwd() + "\\test_output\\" + filename + ".png")


    save()

    Is there any efficient and accurate way to calculate how many images I need to create for each line ?

    Note : Whatever many images I create will have to be multiplied by 2 because I’m using -r 2 for FFmpeg (2 FPS).