Recherche avancée

Médias (0)

Mot : - Tags -/content

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (65)

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

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

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

Sur d’autres sites (6599)

  • How to trim an HLS playlist using ffmpeg ?

    8 février 2023, par Lef

    I'm curious what is the approached way to trim a HLS playlist (a .m3u8 file and many .ts segment files) ?

    


    I've generated a hls video from mp4 using the following command

    


    ffmpeg -i 1.mp4 -c copy -map 0 -segment_time 120 -sc_threshold 0 -g 72
-keyint_min 72 -segment_list 1.m3u8 -f segment 1_%03d.ts


    


    Let's assume that I've now only have access to the HLS playlist (not the mp4), how do I go about trimming this playlist ?

    


    I've tried the following command

    


     ffmpeg -fflags +discardcorrupt -i 1.m3u8 -to 00:04:00 -c copy -map 0 -segment_time 120 -sc_threshold 0 -g 72 -keyint_min 72 -segment_list 1.m3u8 -f segment 1_%03d.ts


    


    but is met with the following error

    


    [hls @ 0x7fc9f0f05500] Skip ('#EXT-X-VERSION:3')
[hls @ 0x7fc9f0f05500] Skip ('#EXT-X-ALLOW-CACHE:YES')
[hls @ 0x7fc9f0f05500] Opening '1_000.ts' for reading
Input #0, hls, from '1.m3u8':
  Duration: 00:14:00.11, start: 1.433367, bitrate: 0 kb/s
  Program 0 
    Metadata:
      variant_bitrate : 0
  Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn
    Metadata:
      variant_bitrate : 0
  Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 0
[segment @ 0x7fc9f19047c0] Opening '1_000.ts' for writing
Output #0, segment, to '1_%03d.ts':
  Metadata:
    encoder         : Lavf59.27.100
  Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 29.97 fps, 29.97 tbr, 90k tbn
    Metadata:
      variant_bitrate : 0
  Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 0
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[hls @ 0x7fc9f0f05500] Opening '1_001.ts' for readingbitrate=N/A speed=N/A    
[mpegts @ 0x7fc9f0f06180] Packet corrupt (stream = 0, dts = 201075), dropping it.
[hls @ 0x7fc9f0f05500] Opening '1_002.ts' for reading
[mpegts @ 0x7fc9f0f06180] Packet corrupt (stream = 0, dts = 21825678), dropping it.
[segment @ 0x7fc9f19047c0] Opening '1.m3u8.tmp' for writing
[segment @ 0x7fc9f19047c0] Opening '1_001.ts' for writing
[segment @ 0x7fc9f19047c0] Opening '1.m3u8.tmp' for writing


    


  • Trim Overlay memory issue

    4 juillet 2019, par Костянтин Тюртюбек

    Greetings fellow FFmpeg users,

    We are experiencing a strange memory leek issue (or maybe just doing something really wrong) and need some directions on how to debug it.

    What are we trying to achieve :

    Process a conference recording that includes multiple user streams, each in its own separate file (all files are mp4/opus).

    • Make a dynamic scene from a set of recordings, based on their volume level at set point of time.
    • The scene must include two parts : smaller grid of all the participants videos, bigger grid of currently talking people. Something like Google Hangouts or Skype does in their applications.

    What went wrong :

    • Memory footprint started unpredictably skyrocketing for some reason during montage

    What are we using :

    First FFmpeg command that reads filter_complex_script from file and adds drawbox as a talking indication on each video source file, when its volume is over a set threshold.

    Second FFmpeg command that reads filter_complex_script from file and :

    • takes an input file (using 0:v),
    • trims a part of it, when the user was talking,
    • scales it according to the amount of concurrently talking users,
    • pads to that resolution (in case if user video is smaller)

    filter_complex command using SELECT :

    [0]select='between(t, 1, 2)',  scale=762:428:force_original_aspect_ratio=decrease,pad=763:429:(ow-iw)/2:(oh-ih)/2[stream-0-workspace-scale-1-1];

    [block-2-grid][stream-0-workspace-scale-1-1]
    overlay=repeatlast=1:shortest=0:x=10:y=316:enable='between(t, 1, 2)'
    [block-2-workspace-1];

    filter_complex command using TRIM :

    [input-file-tag]
    trim=start=#{start}:duration=#{duration},
    setpts=PTS-STARTPTS,
    scale=#{w-1}:#{h-1}:force_original_aspect_ratio=decrease,
    pad=#{w}:#{h}:(ow-iw)/2:(oh-ih)/2
    [input-file-trimmed];

    [previous-block-tag]
    overlay=repeatlast=1:shortest=0:x=#{x}:y=#{y}:enable='between(t, #{from}, #{to})'
    [next-block-tag]

    We have tried going the TRIM command way, tried the SELECT command way. Problem is, both take insane amounts of ram during execution.

    Examples and more description :

    • Lets assume that only two of the five inputs have the volume above a
      certain volume threshold from second two to five.

    • We are trying to display only them according to some overlay math.

    • Cropped commands in human readable form : https://pastebin.com/YwrnRgnA

    • Full FFmpeg command is way too long to read through, that is the reason we started using filter_complex_script and loading it from file

    • Sometimes one block of video conference may have up to 300+
      intermediate overlays, which leads to the memory issue described. We were expecting the memory footprint to be similar to the amount of input files or maybe two-to-three times higher. However, we reach 15Gb or RAM usage withing the first two minutes of montage, while the input files are no bigger than 200Mb.

    What have we done in terms of debugging :

    • We had been using split at first, but quickly figured out that split
      does in fact copy each input and load it in memory, so we had to
      ditch that approach.

    • As matter of fact we moved to using the input files themselves, so
      the problem lies elsewhere.

    • To clarify, we have split our ffmpeg command into two separate ones.
      First one overlays the talking box animation using drawbox as well as
      user avatar and name. It outputs new video files which we than use in
      the command described above as direct input files tags, like 0:v, 1:v
      etc.

    Thank you for taking time reading through our issue.
    We sure hope that you can help us narrow it down.
    Please feel free to ask for any additional information or descriptions if needed.

    Have a good day !

  • FFMPEG not able to trim some videos

    2 août 2015, par Bhuvnesh Varma

    I am using hiteshsondhi88/ffmpeg-android library to time or cut videos.It works fine for most videos but for some of the videos it fails and give below error especially for videos shared from whatsapp.I am using Environment.getExternalStoragePublicDirectory(
    Environment.DIRECTORY_MOVIES
    ) for storage of videos.Whats does this error means and why i am not able to crop/trim some videos ?

    FAILED with output : WARNING: linker: /data/data/com.peoplecloudlabs.apps.guggu/files/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
       ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
       built on Oct  7 2014 15:11:41 with gcc 4.8 (GCC)
       configuration: --target-os=linux --cross-prefix=/home/sb/Source-Code/ffmpeg-android/toolchain-android/bin/i686-linux-android- --arch=x86 --cpu=i686 --enable-runtime-cpudetect --sysroot=/home/sb/Source-Code/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/sb/Source-Code/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/sb/Source-Code/ffmpeg-android/build/x86 --extra-cflags='-I/home/sb/Source-Code/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all -march=i686' --extra-ldflags='-L/home/sb/Source-Code/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
       libavutil      54.  7.100 / 54.  7.100
       libavcodec     56.  1.100 / 56.  1.100
       libavformat    56.  4.101 / 56.  4.101
       libavdevice    56.  0.100 / 56.  0.100
       libavfilter     5.  1.100 /  5.  1.100
       libswscale      3.  0.100 /  3.  0.100
       libswresample   1.  1.100 /  1.  1.100
       libpostproc    53.  0.100 / 53.  0.100
       /storage/emulated/0/1: No such file or directory