Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (91)

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

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (2972)

  • Android - Choosing between MediaRecorder, MediaCodec and Ffmpeg

    15 mars 2017, par Rohan Stark

    I am working on a video recording and sharing application for Android. The specifications of the app are as follows :-

    • Recording a 10 second (maximum) video from inside the app (not using the device’s camera app)
    • No further editing on the video
    • Storing the video in a Firebase Cloud Storage (GCS) bucket
    • Downloading and playing of the said video by other users

    From the research, I did on SO and others sources for this, I have found the following (please correct me if I am wrong) :-

    The three options and their respective features are :-

    1.Ffmpeg

    • Capable of achieving the above goal and has extensive answers and explanations on sites like SO, however
    • Increases the APK size by 20-30mb (large library)
    • Runs the risk of not working properly on certain 64-bit devices

    2.MediaRecorder

    • Reliable and supported by most devices
    • Will store files in .mp4 format (unless converted to h264)
    • Easier for playback (no decoding needed)
    • Adds the mp4 and 3gp headers
    • Increases latency according to this question

    3.MediaCodec

    • Low level
    • Will require MediaCodec, MediaMuxer, and MediaExtractor
    • Output in h264 ( without using MediaMuxer for playback )
    • Good for video manipulations (though, not required in my use case)
    • Not supported by pre 4.3 (API 18) devices
    • More difficult to implement and code (my opinion - please correct me if I am wrong)
    • Unavailability of extensive information, tutorials, answers or samples (Bigflake.com being the only exception)

    After spending days on this, I still can’t figure out which approach suits my particular use case. Please elaborate on what I should do for my application. If there’s a completely different approach, then I am open to that as well.

    My biggest criteria are that the video encoding process be as efficient as possible and the video to be stored in the cloud should have the lowest possible space usage without compromising on the video quality.

    Also, I’d be grateful if you could suggest the appropriate format for saving and distributing the video in Firebase Storage, and point me to tutorials or samples of your suggested approach.

    Thank you in advance ! And sorry for the long read.

  • Moviepy V2 How do you position a TextClip and apply an effect ?

    31 janvier, par Brandon

    I am trying to refactor my code to use the new Moviepy Version 2.0 and I'm having trouble with .with_position / SlideIn / SlideOut effect.

    


    When I apply the SlideIn effect it seems to override any position I have applied. It there a way to explicitly set the position of a TextClip and apply a SlideIn and SlideOut effect without using nested CompositeVideoClip ?

    


    In the below example the with_position((0,0)) would not be implemented and the position of the TextClip would revert to the default centred position. If I remove the lines .with_effect... then the TextClip would be positioned as expected in the 0,0 location.

    


    Any help would be much appreciated.

    


    from moviepy import *

clips = []
clip = ImageClip("path1.png", duration=3).with_start(0)
clips.append(clip)
title = TextClip("path3.ttf", text="Text...", font_size=80, color="#fff", text_align="center", duration=1,)
title = title.with_start(1).with_position((0,0))
title = title.with_effects([vfx.SlideIn(0.25, "left")])
title = title.with_effects([vfx.SlideOut(0.25, "left")])
clips.append(title)

final_clip = CompositeVideoClip(clips)
final_clip.write_videofile("final_clip.mp4")


    


    *EDIT
To get the expected behaviour I need to use multiple nested CompositeVideoClips but this significantly slows it down. Is there anyway that I can make this code more efficient ?

    


    from moviepy import *

clips = []
clip = ImageClip("path1.png", duration=3).with_start(0)
clips.append(clip)
title = TextClip("path3.ttf", text="Text...", font_size=80, color="#fff", text_align="center", duration=1,)
title = CompositeVideoClip(title.with_effects([vfx.SlideIn(0.25, "left")]))
title = CompositeVideoClip(title.with_effects([vfx.SlideOut(0.25, "left")]))
title = title.with_start(1).with_position((0,0))
clips.append(title)

final_clip = CompositeVideoClip(clips)
final_clip.write_videofile("final_clip.mp4")


    


  • Is async.js needed to process multiple ffmpeg conversions at the same time ?

    15 février 2019, par jurelik

    I’m trying to convert youtube videos to mp3 via my Node.js server, using ’ytdl-core’ and ’fluent-ffmpeg’. Since the server is intended to process multiple requests at the same time, it got me thinking whether or not async.js is needed to convert videos in a time efficient manner.

    The interesting thing however, is that upon testing the handling of multiple requests with and without using async.js, the result seems to be the same both ways - the time it takes to convert 3 videos is the same.

    Here is the code I’m using without async.js :

    server.get('/download/:id', (req, res) => {

     const id = req.params.id;
     let stream = ytdl(`https://www.youtube.com/watch?v=${id}`);

     ffmpeg(stream)
       .audioCodec('libmp3lame')
       .audioBitrate(128)
       .toFormat('mp3')
       .save(`public/downloads/${id}.mp3`)
       .on('error', err => {
         console.log(err);
       })
       .on('end', () => {
         console.log('file downloaded');
         send(req, `public/downloads/${id}.mp3`).pipe(res);
       });
    });

    And this is the code using async.js :

    let queue = async.queue((task, callback) => {
     let stream = ytdl(`https://www.youtube.com/watch?v=${task.id}`);

     ffmpeg(stream)
     .audioCodec('libmp3lame')
     .audioBitrate(128)
     .toFormat('mp3')
     .save(`public/downloads/${task.id}.mp3`)
     .on('error', err => {
       console.log(err);
       callback(err)
     })
     .on('end', () => {
       send(task.req, `public/downloads/${task.id}.mp3`).pipe(task.res);
       callback('file sucessfully downloaded');
     });
    }, 5);

    queue.drain = function() {
     console.log('all items downloaded');
    }

    server.get('/download/:id', (req, res) => {
     queue.push({req: req, id: req.params.id, res: res}, err => {
       console.log(err);
     });
    });

    Does anyone have any ideas why both methods seem to finish conversion at roughly the same time ? I would imagine using async.js should finish converting the videos faster due to processing in parallel, but that isn’t the case.

    Any thoughts would be much appreciated !