Recherche avancée

Médias (91)

Autres articles (81)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

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

Sur d’autres sites (12937)

  • change output order of FFprobe

    28 avril 2023, par summerrain

    How can I change the output order of FFprobe ?

    


    ffprobe -hide_banner -show_streams -show_format space.mkv -of json=c=0 -o output.json creates a json output file with the streams sections first and the format section last.

    


    I need the reverse order (format section first, streams section last).

    


    But reordering the parameters (i.e. -show_format -show_streams) has no effect unfortunately.

    


    This is the output of the command above :

    


    {
    "streams": [
        {
            "index": 0,
            "codec_name": "h264",
            "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
            "profile": "Main",
            "codec_type": "video",
            "codec_tag_string": "[0][0][0][0]",
            "codec_tag": "0x0000",
            "width": 256,
            "height": 144,
            "coded_width": 256,
            "coded_height": 144,
            "closed_captions": 0,
            "film_grain": 0,
            "has_b_frames": 1,
            "sample_aspect_ratio": "1:1",
            "display_aspect_ratio": "16:9",
            "pix_fmt": "yuv420p",
            "level": 11,
            "color_range": "tv",
            "color_space": "bt709",
            "color_transfer": "bt709",
            "color_primaries": "bt709",
            "chroma_location": "left",
            "field_order": "progressive",
            "refs": 1,
            "is_avc": "true",
            "nal_length_size": "4",
            "r_frame_rate": "3737/250",
            "avg_frame_rate": "3737/250",
            "time_base": "1/1000",
            "start_pts": 0,
            "start_time": "0.000000",
            "bits_per_raw_sample": "8",
            "extradata_size": 41,
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0,
                "captions": 0,
                "descriptions": 0,
                "metadata": 0,
                "dependent": 0,
                "still_image": 0
            },
            "tags": {
                "HANDLER_NAME": "ISO Media file produced by Google Inc.",
                "VENDOR_ID": "[0][0][0][0]",
                "DURATION": "00:10:53.276000000"
            }
        },
        {
            "index": 1,
            "codec_name": "aac",
            "codec_long_name": "AAC (Advanced Audio Coding)",
            "profile": "HE-AAC",
            "codec_type": "audio",
            "codec_tag_string": "[0][0][0][0]",
            "codec_tag": "0x0000",
            "sample_fmt": "fltp",
            "sample_rate": "44100",
            "channels": 2,
            "channel_layout": "stereo",
            "bits_per_sample": 0,
            "initial_padding": 0,
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/1000",
            "start_pts": 0,
            "start_time": "0.000000",
            "extradata_size": 25,
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0,
                "captions": 0,
                "descriptions": 0,
                "metadata": 0,
                "dependent": 0,
                "still_image": 0
            },
            "tags": {
                "HANDLER_NAME": "ISO Media file produced by Google Inc.",
                "VENDOR_ID": "[0][0][0][0]",
                "DURATION": "00:10:53.409000000"
            }
        }
    ],
    "format": {
        "filename": "space.mkv",
        "nb_streams": 2,
        "nb_programs": 0,
        "format_name": "matroska,webm",
        "format_long_name": "Matroska / WebM",
        "start_time": "0.000000",
        "duration": "653.409000",
        "size": "5252652",
        "bit_rate": "64310",
        "probe_score": 100,
        "tags": {
            "title": "SpaceX Starship explodes on first launch attempt",
            "COMMENT": "https://www.youtube.com/watch?v=gk1BViilFFk",
            "COMPATIBLE_BRANDS": "iso6avc1mp41",
            "MAJOR_BRAND": "dash",
            "MINOR_VERSION": "0",
            "ARTIST": "CNN",
            "DATE": "20230420",
            "DESCRIPTION": "SpaceX’s Starship, the most powerful rocket ever built, took off from a launch pad on the coast of South Texas, but exploded midair before stage separation. #CNN #News",
            "SYNOPSIS": "SpaceX’s Starship, the most powerful rocket ever built, took off from a launch pad on the coast of South Texas, but exploded midair before stage separation. #CNN #News",
            "PURL": "https://www.youtube.com/watch?v=gk1BViilFFk",
            "ENCODER": "Lavf60.4.101"
        }
    }
}


    


  • concat two aac file, but the duration is wrong

    13 mars 2023, par ning zhu

    I try to use ffmpeg concat two aac files. The out.acc can play, but the duration is wrong.

    


    the first aac file silent_audio_1.aac duration is 00:00:01.02

    


    [aac @ 00000267d2210540] Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from 'H:\EnglishListening\s\silent_audio_1.aac':
  Duration: 00:00:01.02, bitrate: 5 kb/s
  Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 5 kb/s


    


    the first aac file prompt.aac duration is 00:00:00.73

    


    [aac @ 000001d6b8e20540] Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from 'H:\EnglishListening\s\prompt.aac':
  Duration: 00:00:00.73, bitrate: 125 kb/s
  Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 125 kb/s


    


    I use this commend to concat two aac files

    


     ffmpeg -i "concat:silent_audio_1.aac|prompt.aac" out.aac


    


    this commend retrun information :

    


    Input #0, aac, from 'concat:silent_audio_1.aac|prompt.aac':
  Duration: 00:00:10.18, bitrate: 9 kb/s
  Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 9 kb/s
File 'out.aac' already exists. Overwrite? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, adts, to 'out.aac':
  Metadata:
    encoder         : Lavf59.27.100
  Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc59.37.100 aac
size=      13kB time=00:00:01.74 bitrate=  62.4kbits/s speed=  43x
video:0kB audio:13kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 4.448017%


    


    As you can see,before File 'out.aac' already exists. Overwrite? [y/N] y, the duration is 00:00:10.18,
but when it complete operation the duration is 00:00:01.74.

    


    But I excute ffprobe out.aac the outpt is

    


    [aac @ 00000277794b0540] Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from 'H:\EnglishListening\s\out.aac':
  Duration: 00:00:10.07, bitrate: 10 kb/s
  Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 10 kb/s


    


    the duration is 00:00:10.07.

    


    here is the informastion of two aac file.

    


    the first aac file silent_audio_1.aac :

    


    {
    "streams": [
        {
            "index": 0,
            "codec_name": "aac",
            "codec_long_name": "AAC (Advanced Audio Coding)",
            "profile": "LC",
            "codec_type": "audio",
            "codec_tag_string": "[0][0][0][0]",
            "codec_tag": "0x0000",
            "sample_fmt": "fltp",
            "sample_rate": "48000",
            "channels": 2,
            "channel_layout": "stereo",
            "bits_per_sample": 0,
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/28224000",
            "duration_ts": 28842701,
            "duration": "1.021921",
            "bit_rate": "5018",
            "disposition": {
                "default": 0,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0,
                "captions": 0,
                "descriptions": 0,
                "metadata": 0,
                "dependent": 0,
                "still_image": 0
            }
        }
    ],
    "format": {
        "filename": "H:\\EnglishListening\\s\\silent_audio_1.aac",
        "nb_streams": 1,
        "nb_programs": 0,
        "format_name": "aac",
        "format_long_name": "raw ADTS AAC (Advanced Audio Coding)",
        "duration": "1.021921",
        "size": "641",
        "bit_rate": "5018",
        "probe_score": 51
    }
}


    


    the second aac file prompt.aac :

    


    {
    "streams": [
        {
            "index": 0,
            "codec_name": "aac",
            "codec_long_name": "AAC (Advanced Audio Coding)",
            "profile": "LC",
            "codec_type": "audio",
            "codec_tag_string": "[0][0][0][0]",
            "codec_tag": "0x0000",
            "sample_fmt": "fltp",
            "sample_rate": "48000",
            "channels": 2,
            "channel_layout": "stereo",
            "bits_per_sample": 0,
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/28224000",
            "duration_ts": 20472625,
            "duration": "0.725362",
            "bit_rate": "125245",
            "disposition": {
                "default": 0,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0,
                "captions": 0,
                "descriptions": 0,
                "metadata": 0,
                "dependent": 0,
                "still_image": 0
            }
        }
    ],
    "format": {
        "filename": "H:\\EnglishListening\\s\\prompt.aac",
        "nb_streams": 1,
        "nb_programs": 0,
        "format_name": "aac",
        "format_long_name": "raw ADTS AAC (Advanced Audio Coding)",
        "duration": "0.725362",
        "size": "11356",
        "bit_rate": "125245",
        "probe_score": 51
    }
}


    


    I compared the two aac file. Everything is same except bit_rate.

    


    Does bit_rate can case this problem ?

    


    Who can tell me the reason and the corrent commend.

    


    Thanks very much.

    


  • how to make sure the ffmpeg generate correct duration ?

    26 juin 2019, par Wang

    for example, the follow command create a 3 second video.

    ffmpeg -f lavfi -i color=c=red:r=30:d=3:size=800x600 red.nut

    But the ffprobe show duration is N/A :

    [STREAM]
    index=0
    codec_name=mpeg4
    codec_long_name=MPEG-4 part 2
    profile=Simple Profile
    codec_type=video
    codec_time_base=0/1
    codec_tag_string=FMP4
    codec_tag=0x34504d46
    width=800
    height=600
    coded_width=800
    coded_height=600
    has_b_frames=0
    sample_aspect_ratio=1:1
    display_aspect_ratio=4:3
    pix_fmt=yuv420p
    level=1
    color_range=unknown
    color_space=unknown
    color_transfer=unknown
    color_primaries=unknown
    chroma_location=left
    field_order=unknown
    timecode=N/A
    refs=1
    quarter_sample=false
    divx_packed=false
    id=N/A
    r_frame_rate=30/1
    avg_frame_rate=0/0
    time_base=1/61440
    start_pts=0
    start_time=0.000000
    duration_ts=N/A
    duration=N/A
    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=0
    DISPOSITION:timed_thumbnails=0
    TAG:encoder=Lavc57.107.100 mpeg4
    [/STREAM]

    Is there flag I can set to allow the ffmpeg generate correct duration_ts and duration ?