Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (47)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

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

  • twinvq : move all bitstream reading into single place

    4 août 2013, par Kostya Shishkov
    twinvq : move all bitstream reading into single place
    

    This is required for the future addition of VoxWare MetaSound decoder, for its
    functions are mostly the same but bitstream reader is completely different
    and bitstream format is slightly different too.

    Signed-off-by : Diego Biurrun <diego@biurrun.de>

    • [DBH] libavcodec/twinvq.c
  • Read portion of lines from child process in Rust (chunk of data)

    2 octobre 2022, par Alexey Volodko

    When I try to spawn a child ffmpeg process I use additonal flag -progress, next I use pipe to pass this progress output to the stderr.&#xA;So the whole command looks like :

    &#xA;

    ffmpeg -i ... -progress pipe:2 ...&#xA;

    &#xA;

    Without -progress flag ffmepg outputs following line in stderr, probably once per second :

    &#xA;

    frame=46 46 fps=0.0 q=0.0 size=       0kB time=00:00:01.72 bitrate=   0.2kbits/s speed=2.69x&#xA;

    &#xA;

    With -progress flag ffmepg outputs (multiple lines) in stderr, probably once per second :

    &#xA;

    frame=1   1 fps=0.0 q=0.0 size=       0kB time=00:00:00.19 bitrate=   2.0kbits/s speed=2.94x    &#xA;fps=0.00&#xA;stream_0_0_q=0.0&#xA;bitrate=   2.0kbits/s&#xA;total_size=48&#xA;out_time_us=192000&#xA;out_time_ms=192000&#xA;out_time=00:00:00.192000&#xA;dup_frames=0&#xA;drop_frames=0&#xA;speed=2.94x&#xA;progress=continue&#xA;

    &#xA;

    The main puppose of using -progress flag is to calc percentage of completion by parsing out_time_ms line and comparing to the whole duration.

    &#xA;

    Reading this chunk (portion of lines) is pretty simple in NodeJS :

    &#xA;

    const { spawn } = require(&#x27;child_process&#x27;);&#xA;const child = spawn(&#x27;ffmpeg&#x27;, [..., &#x27;-progress&#x27;, &#x27;pipe:2&#x27;, ...]);&#xA;&#xA;child.stderr.on(&#x27;data&#x27;, (data) => {&#xA;  // data will contain multiple lines, exactly one chunk&#xA;});&#xA;

    &#xA;

    Reading this chunk (portion of lines) is pretty simple in Deno also :

    &#xA;

    const child = Deno.spawnChild("ffmpeg", {&#xA;  args: [..., &#x27;-progress&#x27;, &#x27;pipe:2&#x27;, ...],&#xA;});&#xA;const stderrReader = child.stderr.getReader();&#xA;let readResult = await stderrReader.read();&#xA;while (readResult.done !== true) {&#xA;  readResult = await stderrReader.read();&#xA;  // readResult will contain multiple lines, exactly one chunk&#xA;}&#xA;

    &#xA;

    I can't achieve the same in rust :

    &#xA;

    let mut command = Command::new("ffmpeg");&#xA;command.args(["...", "-progress", "pipe:2", "..."]);&#xA;let mut child = command&#xA;  .stdout(Stdio::piped())&#xA;  .stderr(Stdio::piped())&#xA;  .spawn()&#xA;  .unwrap();&#xA;&#xA;let child_stderr = child.stderr.as_mut().expect("Unable to pipe stderr");&#xA;let mut reader = BufReader::new(child_stderr);&#xA;let mut buff = String::new();&#xA;while reader.read_line(&amp;mut buff).expect("Unable to read chunk") > 0 {&#xA;  // buff will contain only on line&#xA;  buff.clear();&#xA;}&#xA;

    &#xA;

    I am new in Rust. I can not detect what character signals end of chunk.

    &#xA;

      &#xA;
    • Runnig read_line() - will read only one line.
    • &#xA;

    • Runnig read_to_end() - will read the whole output until the end of process (EOF).
    • &#xA;

    &#xA;

    How can I read in Rust portion of lines that ffmpeg outputs probably once per second ?&#xA;How Node/Deno detects this "end of chunk" ?&#xA;Does rust have such event/signal also ?

    &#xA;

  • ffmpeg : test if format is seekable

    20 mai 2021, par Diederick C. Niehorster

    How do i test if a format is seekable ?

    &#xA;

    I have written code against the latest fmmpeg's (4.4) libavformat, libavcodec, etc. My code reads and decodes video files. Now i also want to support reading from avdevices, such as dshow (DirectShow) on Windows. That is possible through the same interface as i have already implemented, it just requires using the dshow format. Super nice ! But in my video file reader, i have some seek logic implemented, which is engaged in various instances. The problem is that the dshow format is not seekable (avformat_seek_file() returns -22, invalid argument). How do i detect that a format is not seekable ? I know that the AVFormatContext's pb member (AVIOContext) has a seekable field, but the dshow format leaves pb null (as it should be since the AVFMT_NOFILE flag is set for the format). How do i test if a format is seekable (so that if it is not, i can disable the seek logic) ? The implementation of avformat_seek_file() and the various functions it calls seems to have various callbacks, so i am not sure if simply this would do the trick : bool isSeekable = !!context->pb &amp;&amp; context->pb->seekable!=0.

    &#xA;