Recherche avancée

Médias (91)

Autres articles (59)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

Sur d’autres sites (3130)

  • Burning subtitles into video with ffmpeg with specific margin not working

    17 mai 2024, par Anthony

    I am trying to build a tool where people can position their subtitles on an HTML5 video and then I will burn the subtitles into the video for them.

    


    I can easily get the position of the subtitles, in whatever format I need, that's easy. However, no combination of values that I feed to ffmpeg are working.

    


    My holy grail is an x and y offest (aka offset 5% from the left, 10% from the bottom, in terms of video height/width).

    


    To achieve this, I would like the subtitles to start in the very bottom-left corner.

    


    ffmpeg -y -i english.mp4 -vf "subtitles=english.srt:force_style='Alignment=1,OutlineColour=&H100000000,BorderStyle=3,Outline=1,Shadow=0,FontName=Arial,FontSize=24,MarginL=140,MarginV=0'"  -c:v libx264 -crf 23 -c:a copy output_video.mp4


    


    Here is something that is approaching working, but it's behaving very strangely. The video is 850x480 but when I do a margin of 140 it goes way past the midway point of the video.

    


    Am I missing something ? How can I start the margin in the bottom left, and then apply the margin I want to push it away from the left and away from the bottom ? I can do it either as a percentage of the video height/width if that API is supported or just pixels is fine too (but clearly doesn't seem to be working)

    


  • 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) ?

  • FFMpeg concatenation with large list of inputs — how to minimize command line length

    27 août 2020, par huitlacoche

    I have a python tool that concatentates several mp4s together into a single movie file using FFMPEG run from a subprocess call. The issue is that an arbitrarily large number of inputs in the command string will hit the windows CLI character max.

    


    ffmpeg -y -i a.mp4 -i b.mp4 -i c.mp4 -f lavfi -t 0.1 -i anullsrc  -filter_complex '[0]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2: (oh- ih)/2,setsar=1[0:v];[1]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(owiw)/2:(oh-ih)/2,setsar=1[1:v];[2]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow- iw)/2:(oh-ih)/2,setsar=1[2:v]; [0:v][3:a][1:v][3:a][2:v][3:a]concat=n=3:v=1:a=1[v][a]' -c:v libx264 -map [v] -map [a] output.mp4

    


    Assuming 3 input movies that may or may have audio (hence the null audio source).
This works fine assuming there are no more than 30-50 input files. Often the input files have rather long filepaths and can get long very quickly.

    


    After doing a bit of reading I tried a simple :

    


    ffmpeg -f concat -i files.txt -c copy output.mp4

    


    Which works if I can guarantee that all the files are the same codec/resolution/etc, but this cannot be guaranteed.
I'm not clear on how to translate my filter_complex to work with a text file of inputs. Finding a specific enough solution has proven elusive.

    


    I'd be perfectly fine assigning the input paths to a temporary environment variable but in my use case this doesn't seem to work either. The subprocess call doesn't seem to translate wildcard %MYVAR% calls to environment variables.

    


    I feel like there has to be an answer to this problem. If anyone can suggest a solution I would greatly appreciate it.

    


    Thanks !