Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (62)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (9337)

  • Can I make a seek accurate video player with ffmpeg ?

    5 septembre 2016, par Will Tower

    Simple question : I would like to make a video player with "fairly" accurate seeking and need to know if I can do that with ffmpeg. I think the answer is "Well, yeah of course you can" but want to get a reality check before I waste lots of time only to discover that I can’t.

    I am coding in Actionscript for a cross platform desktop AIR app. I am using a NativeProcess to run ffmpeg in the background and using Actionscript’s NetConnection and NetStream classes to connect the ffmpeg stream to a Video class. Using ffmpeg with a NativeProcess is essentially running ffmpeg from the command line. I have basic AS3 code roughed out to load and play a video through ffmeg and I am going through the dranger tutorial (How to Write a Video Player in
    Less Than 1000 Lines
    ) now to sort out the rest of it.

    Would appreciate hearing of any caveats or cautions.

    Update : So I have been fiddling with this all afternoon but no success yet. I am able to run a video with the following commands (NativeProcess code removed for clarity) :

    ffmpegArgs = new Vector.<string>();
    ffmpegArgs.push("-re", "-i",videoPath,"-c:a", "copy", "-c:v", "copy","-f", "flv", "-");
    </string>

    But I am confused about how to interact with ffmpeg once it is running. I’ve tried a bunch of variations on this scenario : using writeUTFBytes to send commands to the ffmpeg NativeProcess instance without a good result :

    var cmd:String = "-ss, 50, -re, -i," + videoPath + ",-c:a, copy, -c:v, copy, -f flv -";
    ffmpegProcess.standardInput.writeUTFBytes(cmd);

    Do I need to tear down and respawn the ffmpeg NativeProcess instance in order to access different sections of a video file ?


    ss position (input/output)

    When used as an input option (before -i), seeks in this input file to position. Note that in most formats it is not possible to seek
    exactly, so ffmpeg will seek to the closest seek point before
    position. When transcoding and -accurate_seek is enabled (the
    default), this extra segment between the seek point and position will
    be decoded and discarded. When doing stream copy or when
    -noaccurate_seek is used, it will be preserved.

    When used as an output option (before an output filename), decodes but discards input until the timestamps reach position.

    https://ffmpeg.org/ffmpeg.html#Video-Options

  • Split mp4 video from URL (stored on AWS s3) with ffmpeg without re-encode, causes an issue with the start point

    25 avril 2023, par DArkO

    I am building an API endpoint as part of which i am signing an AWS s3 url to a video file encoded with mp4, then using ffmpeg to split the provided video by url to a time range (for example from second 4.0 to second 12.0), and pipe it to a stream which is directly returned to the user.

    &#xA;

    I am running into an issue where the video is split starting on the 10 second mark. In the command below it is splitting from 0-14 sec instead of 6-14. if i specify 12-18 it will split from 10-18 etc..

    &#xA;

    As part of this process this is the ffmpeg command i am using to split the video (omitting the full signed S3 url and writing to a file instead of a pipe).

    &#xA;

    ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -ss 6.0 -to 14.0 -i https://XXXXXXXX.s3.amazonaws.com/stopwatch.mp4 -movflags &#x2B;frag_keyframe&#x2B;separate_moof&#x2B;omit_tfhd_offset&#x2B;empty_moov -f mp4 -c copy output.mp4&#xA;

    &#xA;

    If i try to re-encode the video instead of using -c copy splitting works perfectly well, but is quite a lot slower.

    &#xA;

    This is the command i use to initially encode the videos and make them uniform as I upload them to AWS S3. I can control the encoding process and change if needed to be able to do the splits correctly.

    &#xA;

    ffmpeg -i video.mp4 -vf scale=1280:-2 -c:v libx264 -movflags faststart -preset slow -crf 24 -r 25 -c:a aac -b:a 128k&#xA;

    &#xA;

    From the ffmpeg docs :

    &#xA;

    -ss position (input/output)&#xA;When used as an input option (before -i), seeks in this input file to position. Note that in most formats it is not possible to seek exactly, so ffmpeg will seek to the closest seek point before position. When transcoding and -accurate_seek is enabled (the default), this extra segment between the seek point and position will be decoded and discarded. When doing stream copy or when -noaccurate_seek is used, it will be preserved.&#xA;

    &#xA;

    So this looks like intended behaviour, I also found out that mp4 will have IFrames set on every 10 seconds (250 frames on 25fps in my case) where the fastseek (-ss) option will seek on remote videos to the nearest Iframe and use that as a starting point.

    &#xA;

    Is there a way to change this behavior ? Add IFrames to at least 1 second so i can split accurately at least to 1 second ? If so are there any drawbacks to doing that ? Is there another option to avoid re-encoding the segments ?

    &#xA;

    I was thinking i can do multiple splits and a concat where i split-re-encode 6-10sec then split-copy 10-14 then concat the 2 segments to get 6-14sec video.

    &#xA;

    What i find strange is that with the same video provided as a local file reference to ffmpeg it splits it correctly if i simply do :

    &#xA;

    ffmpeg -ss 6.0 -to 14.0 -i stopwatch.mp4 -c copy output.mp4&#xA;

    &#xA;

  • Is there any memory problem that "Too many active WebGL contents." keeps coming out in my web console

    18 novembre 2022, par jerry

    enter image description here

    &#xA;

    Now I'm using RTSP stream with jsmpeg, ffmpeg, node-rtsp-stream in React.js

    &#xA;

    I set multiple streaming in react component about 1 to maximum 25

    &#xA;

    and when I change route to many , It apeard my console

    &#xA;

    I'm a little afraid of if it caused by memory leak problem

    &#xA;

    I cannot figure out it is okay or critical problem

    &#xA;

    Could you tell me how to solve this problem or is it fine

    &#xA;

    &#xA;// out of component&#xA;const streams: Streams = {};&#xA;&#xA;...&#xA;&#xA;  const { preset } = props;&#xA;&#xA;  const elementsRef = useRef<any>(new Array(preset?.partition).fill(0).map((v) => createRef()));&#xA;&#xA;&#xA;  // Mount&#xA;  useEffect(() => {&#xA;    const { JSMpeg } = window;&#xA;&#xA;    const sortedStream = _.sortBy(preset?.stream, ["position"]);&#xA;    console.log(sortedStream);&#xA;&#xA;&#xA;    sortedStream.forEach((v, i: number) => {&#xA;&#xA;      const player = new JSMpeg.Player(v.camera_monitoring.ws, {&#xA;        canvas: elementsRef?.current[v.position]?.current, // Canvas should be a canvas DOM element&#xA;      });&#xA;      console.dir(elementsRef?.current[v.position]?.current);&#xA;&#xA;      streams[v.id] = player;&#xA;    });&#xA;  }, []);&#xA;&#xA;  // UnMount&#xA;  useEffect(() => {&#xA;    return () => {&#xA;      Object.keys(streams).forEach((v) => {&#xA;        console.log("unmount key:", v);&#xA;        if (streams[v] !== null) {&#xA;          streams[v].destroy();&#xA;          streams[v] = null;&#xA;        }&#xA;      });&#xA;    };&#xA;  }, []);&#xA;&#xA;&#xA;&#xA;... &#xA;</any>

    &#xA;

    https://github.com/phoboslab/jsmpeg

    &#xA;

    above library `jsmpeg.min.js` is set by global ( in public directory and set in my html )

    &#xA;

    actually my code are so many antipattern in contrast react style, To make an excuse, It is my limits of one's ability

    &#xA;