Recherche avancée

Médias (1)

Mot : - Tags -/getid3

Autres articles (64)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • 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" ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (4816)

  • FFMPEG Command in Android Failing to Execute

    12 septembre 2020, par Zoe

    I'm trying to execute ffmpeg commands through an android app I'm developing.

    



    I found this post which has been somewhat useful :
Problems with ffmpeg command line on android

    



    and I downloaded a static build of ffmpeg from here : http://ffmpeg.gusari.org/static/

    



    The problem is, when this code runs

    



    public void merge_video(){


      String[] ffmpegCommand = new String[5];
      ffmpegCommand[0] = "/data/data/com.example.zovideo/ffmpeg";
      ffmpegCommand[1] = "-i";
      ffmpegCommand[2] = "concat:storage/emulated/0/DCIM/Camera/VID30141106_211509.mp4|storage/emulated/0/DCIM/Camera/VID30141106_211509.mp4";
      ffmpegCommand[3] = "copy";
      ffmpegCommand[4] = "storage/emulated/0/DCIM/ZoVideo/Output.mp4";  

      try {
          Process ffmpegProcess = new ProcessBuilder(ffmpegCommand).redirectErrorStream(true).start();

          String line;
          BufferedReader reader = new BufferedReader(new InputStreamReader(ffmpegProcess.getInputStream()));
          Log.d(null, "*******Starting FFMPEG");

          while((line = reader.readLine())!=null){

              Log.d(null, "***"+line+"***"); 
          }
          Log.d(null,"****ending FFMPEG****");

    } catch (IOException e) {
        e.printStackTrace();
    }
  }


    



    It fails when trying to start the process with

    



    Java.io.IOException: Error running exec(). Command: [/data/data/com.example.zovideo/ffmpeg, -i, concat:storage/emulated/0/DCIM/Camera/VID30141106_211509.mp4|storage/emulated/0/DCIM/Camera/VID30141106_211509.mp4, copy, storage/emulated/0/DCIM/ZoVideo/Output.mp4] Working Directory: null Environment: [ANDROID_ROOT=/system, EMULATED_STORAGE_SOURCE=/mnt/shell/emulated, LOOP_MOUNTPOINT=/mnt/obb, LD_PRELOAD=libsigchain.so, ANDROID_BOOTLOGO=1, EMULATED_STORAGE_TARGET=/storage/emulated, EXTERNAL_STORAGE=/storage/emulated/legacy, SYSTEMSERVERCLASSPATH=/system/framework/services.jar:/system/framework/ethernet-service.jar:/system/framework/wifi-service.jar, ANDROID_SOCKET_zygote=10, PATH=/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin, ANDROID_DATA=/data, ANDROID_ASSETS=/system/app, ASEC_MOUNTPOINT=/mnt/asec, BOOTCLASSPATH=/system/framework/core-libart.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/apache-xml.jar, ANDROID_PROPERTY_WORKSPACE=9,0, ANDROID_STORAGE=/storage]


    



    I understand from the stackoverflow post I mentioned above that the ffmpeg static build needs to be on my device otherwise my app cannot use it.

    



    However I'm unsure how to get it in the /data/data/com.example.zovideo folder as needed.

    



    I have done is download the latest static ffmpeg build from http://ffmpeg.gusari.org/static/ and copied it into my libs/armeabi and libs/armeabi-v7a folders but this obviously hasn't succeeded in getting into the data/data folder when my app is installed onto my device. 
(I feel like I'm being an idiot by copy/pasting the files but I don't know what else to do. I don't know how to compile it myself - I have compiled ffmpeg using a Roman10 tutorial but this produces .so files which from which I understand is not what I need)

    



    So I'm a little stuck.
Any advice is greatly appreciated. Thanks

    


  • FFmpeg downloading entire live stream when making a small clip

    6 février 2021, par stevendesu

    Setup

    


    I'm using FFmpeg to generate video clips from M3U8 videos. The command looks like this :

    


    ffmpeg -ss <start> -i &lt;1080p-chunklist-url> -c:v copy -c:a copy -t <duration> -f mp4 -y out.mp4&#xA;</duration></start>

    &#xA;

    For example, to create a 30-second clip starting at the 5-minute mark for a particular video, the command would be :

    &#xA;

    ffmpeg -ss 300 -i https://example.com/path/to/1080p/index.m3u8 -c:v copy -c:a copy -t 30 -f mp4 -y out.mp4&#xA;

    &#xA;

    Some caveats I'm already aware of :

    &#xA;

      &#xA;
    • If -ss comes after -i then FFmpeg will attempt to download the entire M3U8 instead of just the relevant TS files, and will parse the entire video contents looking for the exact timestamp. By putting -ss before -i FFmpeg uses "seek points", which with HLS videos means it looks at the M3U8 and only downloads relevant TS files
    • &#xA;

    • TS file boundaries function as "seek points" in HLS, so if a TS file starts at 4:51 and the next TS file starts at 5:01, this command will start the clip at 4:51 instead of 5:01 (it prefers the first seek point before the requested time)
    • &#xA;

    • The -t parameter sets an exact clip duration instead of an ending position, so in the above example of a clip starting at 4:51 the same clip would end at 5:21 instead of 5:30
    • &#xA;

    &#xA;

    In theory I can utilize -to instead of -t to specify an ending time of 5:30, however in practice this hasn't worked. Also in theory I can force -accurate_seeking to discard the contents from 4:51 to 5:00 and start the clip where I wanted it, but I learned this only works for transcodes and not transmux

    &#xA;

    Now to the meat of my problem :

    &#xA;

    Problem

    &#xA;

    When the M3U8 URL provided is a live stream (no #EXT-X-ENDLIST tag) then FFmpeg does not behave correctly. On FFmpeg versions 4.2.1 and earlier, it starts by downloading the TS file containing my clip segment, then proceeds to download every TS file in the M3U8 then hangs while waiting for new TS files to become available, downloading them as they appear - even hours after the end of the section I wanted to clip. On FFmpeg version 4.2.2 and later, I can create clips so long as they end before the second-to-last TS file. If the live stream currently has 20 minutes of video data and I create a clip from 19:30 - 19:40 (ending right at the start of the second-to-last TS file, assuming a 10-second TS file duration) then it will behave the same as 4.2.1 : waiting infinitely to download the entire video.

    &#xA;

    The "2 TS files from the end" rule I believe is related to FFmpeg's initial probe of the video to get stream data. In the aforementioned 20-minute long video, if I make a clip from 3:00 to 3:30 (well before the end of the stream) it will first download TS files 119 and 120 (19:40-19:50 and 19:50-20:00), then it displays a list of the streams in the video (audio, video, metadata), then it downloads TS files 19 - 21 (containing the actual data I want for my clip)

    &#xA;

    Is there a way to fix it so I can properly make clips of sections near the "end" of live M3U8s ?

    &#xA;

  • How do you merge an audio mp4 and video mp4 with ffmpeg in python 3 ?

    29 septembre 2020, par myth0s

    I'm creating a script in python, that at one point needs to take two files, an audio mp4 file and video mp4 file, and merge them together. They are both of the same length, and the video file matches with the audio file. However, I can't seem to get them to merge.

    &#xA;

    I first tried :

    &#xA;

    input_video = ffmpeg.input(onlyVidPath &#x2B; "/" &#x2B; inputVidTitle &#x2B; ".mp4")&#xA;input_audio = ffmpeg.input(audioPath &#x2B; "/" &#x2B; inputAudTitle &#x2B; ".mp4")&#xA;fullOut = ffmpeg.output(input_video, input_audio, vidPath, f=&#x27;mp4&#x27;, vcodec=&#x27;copy&#x27;, acodec=&#x27;aac&#x27;, strict=&#x27;experimental&#x27;)&#xA;fullOut.run()&#xA;

    &#xA;

    Which gave a long Traceback error, that seemed to go through the ffmpeg library, and finally gave the error "FileNotFoundError : [WinError 2] The system cannot find the file specified"

    &#xA;

    That didn't work.&#xA;Next I commented that out (except for input_video and input_audio), and tried this :

    &#xA;

    ffmpeg.concat(input_video, input_audio, v=1, a=1).output(vidPath, f=&#x27;mp4&#x27;, vcodec=&#x27;copy&#x27;).run()&#xA;

    &#xA;

    This went through the same error, ending with "FileNotFoundError : [WinError 2] The system cannot find the file specified".

    &#xA;

    Am I using this correctly ? How do I merge two files, one video only, one audio only, in python with ffmpeg ?

    &#xA;