Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (26)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (8302)

  • The duration information of the extracted truehd audio stream is lost when demux m2ts file with ffmpeg

    23 novembre 2019, par Bo Wang

    I would like to extract an truehd audio stream from m2ts files of a blu-ray with ffmpeg. All these m2ts files actually have 7 audio streams, which can be detected by eac3to :

    M2TS, 1 video track, 7 audio tracks, 5 subtitle tracks, 1:40:03
    1: Chapters, 34 chapters
    2: h265/HEVC, 2160p24 /1.001 (16:9), 10 bits
    3: TrueHD/AC3 (Atmos), English, 7.1 channels, 48kHz, dialnorm: -28dB
      (embedded: AC3, 5.1 channels, 640kbps, 48kHz, dialnorm: -27dB)
    4: E-AC3, English, 7.1 channels, 1024kbps, 48kHz, dialnorm: -28dB
      (core: AC3, 5.1 channels, 576kbps, 48kHz, dialnorm: -28dB)
    5: AC3, English, 5.1 channels, 640kbps, 48kHz, dialnorm: -27dB
    6: AC3, English, 2.0 channels, 320kbps, 48kHz, dialnorm: -27dB
    7: AC3, English, 2.0 channels, 320kbps, 48kHz, dialnorm: -27dB
    8: AC3, Chinese, 2.0 channels, 448kbps, 48kHz
    9: AC3, Chinese, 5.1 channels, 384kbps, 48kHz, 300ms
    10: Subtitle (PGS), English
    11: Subtitle (PGS), Chinese
    12: Subtitle (PGS), Chinese
    13: Subtitle (PGS), Chinese
    14: Subtitle (PGS), Chinese

    When I use ffmpeg to do the demux work for every m2ts, problem arises.
    By runningffmpeg.exe -hide_banner -i "F:\xxx\BDMV\STREAM\00055.m2ts" -map 0:1 01.thd, an file 01.thd is obtained. However, by running ffprobe 01.thd, it is shown that this file is with fault as its duration information is absent :

    Input #0, truehd, from '0x1100-00055.thd':
     Duration: N/A, start: 0.000000, bitrate: N/A
       Stream #0:0: Audio: truehd, 48000 Hz, 7.1, s32 (24 bit)

    If I run ffmpeg.exe -hide_banner -i "F:\xxx\BDMV\STREAM\00055.m2ts", it can be found that ffmpeg shows an additional audio stream as it recognizes the embedded 5.1 AC3 stream inside the 7.1 TrueHD audio stream, as independent :

    Input #0, mpegts, from 'F:\xxx\BDMV\STREAM\00055.m2ts':
     Duration: 00:00:48.62, start: 4198.333333, bitrate: 50005 kb/s
     Program 1
       Stream #0:0[0x1011]: Video: hevc (Main 10) (HDMV / 0x564D4448), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc
       Stream #0:1[0x1100]: Audio: truehd (AC-3 / 0x332D4341), 48000 Hz, 7.1, s32 (24 bit)
       Stream #0:2[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
       Stream #0:3[0x1101]: Audio: eac3 (AC-3 / 0x332D4341), 48000 Hz, 7.1, fltp, 1024 kb/s
       Stream #0:4[0x1102]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
       Stream #0:5[0x1103]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 320 kb/s
       Stream #0:6[0x1104]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 320 kb/s
       Stream #0:7[0x1105]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 448 kb/s
       Stream #0:8[0x1106]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s
       Stream #0:9[0x12a0]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
       Stream #0:10[0x12a1]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
       Stream #0:11[0x12a2]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
       Stream #0:12[0x12a3]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
       Stream #0:13[0x12a4]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)

    How can I make ffmpeg generate correct .thd file with duration information for the stream 0:1 ?
    And if possible, how can I make ffmpeg keep the embedded 5.1 core stream as well (test result shows that this core stream is stripped out) ?

  • Is there any way to specify streams by pid with ffmpeg, if the value of pid is duplicated ?

    22 novembre 2019, par Bo Wang

    I have a nice m2ts file and I would like to demux specific audio streams from it. Of important, this specification is needed to use PID as identifier.
    The exemplified m2ts file has 7 audio streams, which is detected by eac3to and shown below

    eac3to.exe F:\xxx 1)
    M2TS, 1 video track, 7 audio tracks, 5 subtitle tracks, 1:40:03
    1: Chapters, 34 chapters
    2: h265/HEVC, 2160p24 /1.001 (16:9), 10 bits
    3: TrueHD/AC3 (Atmos), English, 7.1 channels, 48kHz, dialnorm: -28dB
      (embedded: AC3, 5.1 channels, 640kbps, 48kHz, dialnorm: -27dB)
    4: E-AC3, English, 7.1 channels, 1024kbps, 48kHz, dialnorm: -28dB
      (core: AC3, 5.1 channels, 576kbps, 48kHz, dialnorm: -28dB)
    5: AC3, English, 5.1 channels, 640kbps, 48kHz, dialnorm: -27dB
    6: AC3, English, 2.0 channels, 320kbps, 48kHz, dialnorm: -27dB
    7: AC3, English, 2.0 channels, 320kbps, 48kHz, dialnorm: -27dB
    8: AC3, Chinese, 2.0 channels, 448kbps, 48kHz
    9: AC3, Chinese, 5.1 channels, 384kbps, 48kHz, 300ms
    10: Subtitle (PGS), English
    11: Subtitle (PGS), Chinese
    12: Subtitle (PGS), Chinese
    13: Subtitle (PGS), Chinese
    14: Subtitle (PGS), Chinese

    However, if I run
    ffmpeg.exe -hide_banner -i "F:\xxx\BDMV\STREAM\00055.m2ts", ffmpeg shows an additional audio stream as it recognizes the embedded 5.1 AC3 stream inside the 7.1 TrueHD audio stream, as independent :

    Input #0, mpegts, from 'F:\xxx\BDMV\STREAM\00055.m2ts':
     Duration: 00:00:48.62, start: 4198.333333, bitrate: 50005 kb/s
     Program 1
       Stream #0:0[0x1011]: Video: hevc (Main 10) (HDMV / 0x564D4448), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc
       Stream #0:1[0x1100]: Audio: truehd (AC-3 / 0x332D4341), 48000 Hz, 7.1, s32 (24 bit)
       Stream #0:2[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
       Stream #0:3[0x1101]: Audio: eac3 (AC-3 / 0x332D4341), 48000 Hz, 7.1, fltp, 1024 kb/s
       Stream #0:4[0x1102]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
       Stream #0:5[0x1103]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 320 kb/s
       Stream #0:6[0x1104]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 320 kb/s
       Stream #0:7[0x1105]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 448 kb/s
       Stream #0:8[0x1106]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s
       Stream #0:9[0x12a0]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
       Stream #0:10[0x12a1]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
       Stream #0:11[0x12a2]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
       Stream #0:12[0x12a3]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
       Stream #0:13[0x12a4]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)

    It can be found that the Stream #0:1 and Stream #0:2 have the same PID 0x1100. And ffmpeg.exe -hide_banner -i "F:\xxx\BDMV\STREAM\00055.m2ts" -map i:0x1100 -c copy 00055-0x1100.thd will yield error :

    [truehd @ 0000021ae9517600] truehd files have exactly one stream
    Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
    Stream mapping:
     Stream #0:1 -> #0:0 (copy)
     Stream #0:2 -> #0:1 (copy)
       Last message repeated 1 times

    By contrast, it works by giving other pids without duplication, such as ffmpeg.exe -hide_banner -i "F:\xxx\BDMV\STREAM\00055.m2ts" -map i:0x1101 -c copy 00055-0x1101.eac3 :

    Input #0, mpegts, from 'F:\xxx\BDMV\STREAM\00055.m2ts':
     Duration: 00:00:48.62, start: 4198.333333, bitrate: 50005 kb/s
     Program 1
       Stream #0:0[0x1011]: Video: hevc (Main 10) (HDMV / 0x564D4448), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc
       Stream #0:1[0x1100]: Audio: truehd (AC-3 / 0x332D4341), 48000 Hz, 7.1, s32 (24 bit)
       Stream #0:2[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
       Stream #0:3[0x1101]: Audio: eac3 (AC-3 / 0x332D4341), 48000 Hz, 7.1, fltp, 1024 kb/s
       Stream #0:4[0x1102]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
       Stream #0:5[0x1103]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 320 kb/s
       Stream #0:6[0x1104]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 320 kb/s
       Stream #0:7[0x1105]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 448 kb/s
       Stream #0:8[0x1106]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s
       Stream #0:9[0x12a0]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
       Stream #0:10[0x12a1]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
       Stream #0:11[0x12a2]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
       Stream #0:12[0x12a3]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
       Stream #0:13[0x12a4]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Output #0, eac3, to '00055-0x1101.eac3':
     Metadata:
       encoder         : Lavf58.34.101
       Stream #0:0: Audio: eac3 (AC-3 / 0x332D4341), 48000 Hz, 7.1, fltp, 1024 kb/s
    Stream mapping:
     Stream #0:3 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    size=    6076kB time=00:00:48.57 bitrate=1024.7kbits/s speed=92.6x
    video:0kB audio:6076kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%

    In this case, how can I specify the streams by PID ?

  • How to specify streams by pid with ffmpeg, If the value of pid is duplicated ?

    22 novembre 2019, par Bo Wang

    I have a nice m2ts file and I would like to demux specific audio streams from it. Of important, this specification is needed to use PID as identifier.
    The exemplified m2ts file has 7 audio streams, which is detected by eac3to and shown below

    eac3to.exe F:\xxx 1)
    M2TS, 1 video track, 7 audio tracks, 5 subtitle tracks, 1:40:03
    1: Chapters, 34 chapters
    2: h265/HEVC, 2160p24 /1.001 (16:9), 10 bits
    3: TrueHD/AC3 (Atmos), English, 7.1 channels, 48kHz, dialnorm: -28dB
      (embedded: AC3, 5.1 channels, 640kbps, 48kHz, dialnorm: -27dB)
    4: E-AC3, English, 7.1 channels, 1024kbps, 48kHz, dialnorm: -28dB
      (core: AC3, 5.1 channels, 576kbps, 48kHz, dialnorm: -28dB)
    5: AC3, English, 5.1 channels, 640kbps, 48kHz, dialnorm: -27dB
    6: AC3, English, 2.0 channels, 320kbps, 48kHz, dialnorm: -27dB
    7: AC3, English, 2.0 channels, 320kbps, 48kHz, dialnorm: -27dB
    8: AC3, Chinese, 2.0 channels, 448kbps, 48kHz
    9: AC3, Chinese, 5.1 channels, 384kbps, 48kHz, 300ms
    10: Subtitle (PGS), English
    11: Subtitle (PGS), Chinese
    12: Subtitle (PGS), Chinese
    13: Subtitle (PGS), Chinese
    14: Subtitle (PGS), Chinese

    However, if I run
    ffmpeg.exe -hide_banner -i "F:\xxx\BDMV\STREAM\00055.m2ts", ffmpeg shows an additional audio stream as it recognizes the embedded 5.1 AC3 stream inside the 7.1 TrueHD audio stream, as independent :

    Input #0, mpegts, from 'F:\xxx\BDMV\STREAM\00055.m2ts':
     Duration: 00:00:48.62, start: 4198.333333, bitrate: 50005 kb/s
     Program 1
       Stream #0:0[0x1011]: Video: hevc (Main 10) (HDMV / 0x564D4448), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc
       Stream #0:1[0x1100]: Audio: truehd (AC-3 / 0x332D4341), 48000 Hz, 7.1, s32 (24 bit)
       Stream #0:2[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
       Stream #0:3[0x1101]: Audio: eac3 (AC-3 / 0x332D4341), 48000 Hz, 7.1, fltp, 1024 kb/s
       Stream #0:4[0x1102]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
       Stream #0:5[0x1103]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 320 kb/s
       Stream #0:6[0x1104]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 320 kb/s
       Stream #0:7[0x1105]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 448 kb/s
       Stream #0:8[0x1106]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s
       Stream #0:9[0x12a0]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
       Stream #0:10[0x12a1]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
       Stream #0:11[0x12a2]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
       Stream #0:12[0x12a3]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
       Stream #0:13[0x12a4]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)

    It can be found that the Stream #0:1 and Stream #0:2 have the same PID 0x1100. And ffmpeg.exe -hide_banner -i "F:\xxx\BDMV\STREAM\00055.m2ts" -map i:0x1100 -c copy 00055-0x1100.thd will yield error :

    [truehd @ 0000021ae9517600] truehd files have exactly one stream
    Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
    Stream mapping:
     Stream #0:1 -> #0:0 (copy)
     Stream #0:2 -> #0:1 (copy)
       Last message repeated 1 times

    By contrast, it works by giving other pids without duplication, such as ffmpeg.exe -hide_banner -i "F:\xxx\BDMV\STREAM\00055.m2ts" -map i:0x1101 -c copy 00055-0x1101.eac3 :

    Input #0, mpegts, from 'F:\xxx\BDMV\STREAM\00055.m2ts':
     Duration: 00:00:48.62, start: 4198.333333, bitrate: 50005 kb/s
     Program 1
       Stream #0:0[0x1011]: Video: hevc (Main 10) (HDMV / 0x564D4448), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc
       Stream #0:1[0x1100]: Audio: truehd (AC-3 / 0x332D4341), 48000 Hz, 7.1, s32 (24 bit)
       Stream #0:2[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
       Stream #0:3[0x1101]: Audio: eac3 (AC-3 / 0x332D4341), 48000 Hz, 7.1, fltp, 1024 kb/s
       Stream #0:4[0x1102]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
       Stream #0:5[0x1103]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 320 kb/s
       Stream #0:6[0x1104]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 320 kb/s
       Stream #0:7[0x1105]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 448 kb/s
       Stream #0:8[0x1106]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s
       Stream #0:9[0x12a0]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
       Stream #0:10[0x12a1]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
       Stream #0:11[0x12a2]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
       Stream #0:12[0x12a3]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
       Stream #0:13[0x12a4]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Output #0, eac3, to '00055-0x1101.eac3':
     Metadata:
       encoder         : Lavf58.34.101
       Stream #0:0: Audio: eac3 (AC-3 / 0x332D4341), 48000 Hz, 7.1, fltp, 1024 kb/s
    Stream mapping:
     Stream #0:3 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    size=    6076kB time=00:00:48.57 bitrate=1024.7kbits/s speed=92.6x
    video:0kB audio:6076kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%

    In this case, how can I specify the streams by PID ?