Recherche avancée

Médias (2)

Mot : - Tags -/plugins

Autres articles (78)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

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

Sur d’autres sites (6692)

  • Fluent-ffmpeg Node.js overlay audio

    10 avril 2017, par Dineshkarthik Raveendran

    Using fluent-ffmpeg am trying to merge a set of videos into a single video, which am able to achieve with the following code :

      var ffmpeg = require('fluent-ffmpeg'),
           command = ffmpeg(),
           videoNames = ['video1.mp4', 'video2.mp4', 'video3.mp4'];

       videoNames.forEach(function(videoName){
           command = command.addInput(videoName);
       });
       command.mergeToFile('output.mp4')
       .on('error', function(err) {
           console.log('Error ' + err.message);
       })
       .on('end', function() {
           console.log('Finished!');
       });

    In additon to the above am trying to overlay an audio to the merged video without removing the existing audio. What am trying to do is replicate the following command line using fluent-ffmpeg wrapper

    ffmpeg -i io1.mp4 -i io2.mp4 -i io3.mp4 -i io4.mp4 -i io5.mp4 -i io6.mp4 -i audio.mp3 -filter_complex '[0:a][1:a][2:a][3:a][4:a][5:a]concat=n=7:v=0:a=1,volume=1[aout];[6]volume=0.1[bout];[aout][bout]amerge=[tout];[0:v][1:v][2:v][3:v][4:v][5:v]concat=n=6:v=1:a=0[v1]' -map [v1] -map [tout] -c:a aac -b:a 96K  -shortest -y out.mp4

    Tried the following but unable to implement the filter_complex with streams properly

    var ffmpeg = require('fluent-ffmpeg'),
       command = ffmpeg(),
       videoNames = ['video1.mp4', 'video2.mp4', 'video3.mp4'];

    videoNames.forEach(function(videoName){
       command = command.addInput(videoName);
    });
    command.addInput("myAudio.mp3")
           .audioFilters('volume=0.1'); // trying to overlay new audio without removing existing audio
    command.mergeToFile('output.mp4')
    .on('error', function(err) {
       console.log('Error ' + err.message);
    })
    .on('end', function() {
       console.log('Finished!');
    });

    Which throw the error Error ffmpeg exited with code 1: Cannot find a matching stream for unlabeled input pad 6 on filter Parsed_concat_0

  • avio_open crashes, avcodec_copy_context doesn't work

    5 mars 2017, par Nulano

    I’m trying to port https://ffmpeg.org/doxygen/trunk/doc_2examples_2remuxing_8c-example.html to JavaCPP Presets for FFmpeg https://github.com/bytedeco/javacpp-presets/tree/master/ffmpeg.

    I have this so far :

    av_register_all();

    AVFormatContext inFmtCtx = new AVFormatContext(null);
    if (avformat_open_input(inFmtCtx, "file.ts", null, null) != 0)
       throw new Exception("Could not open input file");
    if (avformat_find_stream_info(inFmtCtx, (PointerPointer)null) != 0)
       throw new Exception("Failed to retrieve input stream information");
    av_dump_format(inFmtCtx, 0, "file.ts", 0);

    AVFormatContext outFmtCtx = new AVFormatContext(null);
    avformat_alloc_output_context2(outFmtCtx, null, null, "file2.ts");
    AVOutputFormat outFmt = outFmtCtx.oformat();
    for (int i = 0; i < inFmtCtx.nb_streams(); i++) {
       AVStream inStr = inFmtCtx.streams(i);
       AVStream outStr = avformat_new_stream(outFmtCtx, inStr.codec().codec());
       if (outStr.isNull()) throw new Exception("Failed allocating output stream");
       if (avcodec_copy_context(outStr.codec(), inStr.codec()) != 0)
           throw new Exception("Failed to copy context from input to"+
                               " output stream codec context");
       if ((outFmtCtx.oformat().flags() & AVFMT_GLOBALHEADER) != 0)
           outStr.codec().flags(outStr.codec().flags() | CODEC_FLAG_GLOBAL_HEADER);
    }
    av_dump_format(outFmtCtx, 0, "file2.ts", 1);

    if ((outFmt.flags() & AVFMT_NOFILE) == 0)
       if (avio_open(outFmtCtx.pb(), "file2.ts", AVIO_FLAG_WRITE) != 0)
           throw new Exception("Could not open output file");

    The problem is, that the avio_open call causes the JVM to crash with an access violation.

    Stack: [0x00000000037e0000,0x00000000038e0000],  sp=0x00000000038df6d0,  free space=1021k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C  [avformat-57.dll+0x28877]
    C  [jniavformat.dll+0x383cb]
    C  0x0000000003bcdfcc

    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j  org.bytedeco.javacpp.avformat.avio_open(Lorg/bytedeco/javacpp/avformat$AVIOContext;Ljava/lang/String;I)I+0
    j  TestRemuxer.main([Ljava/lang/String;)V+226
    v  ~StubRoutines::call_stub

    This is the output (without the crash message) :

    Input #0, mpegts, from 'file.ts':
     Duration: 00:00:17.60, start: 0.000000, bitrate: 1016 kb/s
     Program 1
       Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 636x480 [SAR 900:901 DAR 45:34], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
       Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 194 kb/s
    Output #0, mpegts, to 'file2.ts':
       Stream #0:0: Unknown: none
       Stream #0:1: Unknown: none

    I suspect the cause of the access violation is the same as what causes the output streams to be unknown. However, if I pause debugging on the second av_dump_format call, I can use Evaluate to verify, that the codecs were copied properly. (I checked the FFmpeg sources, and I know that a stream is dumped as Unknown, if and only if its codec_type is set to an invalid value, however the value is correctly 0 for the first stream and 1 for the second stream.)

  • How can I use my exe in a new Process() call ?

    24 février 2017, par looksgoodhoss

    I am working on a project where I create a 10 second sample from a video. To do this, I am using FFMPEG. I would like for the user to upload their own video where the sampling will then take place. The processing will be done in an Azure worker-role and that is where my problem lies.

    If I execute the following command (excuse the absolute paths, they’re my next problem) in Command Prompt then the sampling is completed successfully.

    ffmpeg -t 10 -i C:\Users\looksgoodhoss\Documents\Videos\video.mp4 -map_metadata 0 -acodec copy C:\Users\looksgoodhoss\Documents\Videos\vid.mp4 -y

    I am trying to bring this command into my Visual Studio project via a new Process() call. The video.mp4 and vid.mp4 are trivial names to test and work out my bug.

    bool success = false;
               string EXEArguements = @"ffmpeg -t 10 -i C:\Users\looksgoodhoss\Documents\Videos\video.mp4 -map_metadata 0 -acodec copy C:\Users\looksgoodhoss\Documents\Videos\vid.mp4 -y";
               string EXEPath = Path.Combine(Environment.GetEnvironmentVariable("RoleRoot") + @"\", @"approot\ffmpeg.exe");

               try
               {
                   Process proc = new Process();
                   //proc.StartInfo.FileName = @"C:\FFMPEG\bin\ffmpeg";
                   proc.StartInfo.FileName = EXEPath;
                   proc.StartInfo.Arguments = EXEArguements;
                   proc.StartInfo.CreateNoWindow = true;
                   proc.StartInfo.UseShellExecute = false;
                   proc.StartInfo.ErrorDialog = false;

                   Trace.TraceInformation("FFMPEG completed."); // is shown in log

                   proc.Start();
                   proc.WaitForExit();
                   success = true;
               }
               catch (Exception e)
               {
                   throw;
               }
               return success;

    The message "FFMPEG completed" is shown in the Compute Emulator UI and so I know that this block of code is executing, however, they’re is no sample video created despite the command being the same.

    Am I executing FFMPEG incorrectly in my Visual Studio project ? I think this is my problem because the same command can successfully be performed through Command Prompt.

    Any help or advice would be greatly appreciated,

    Thanks.