Recherche avancée

Médias (0)

Mot : - Tags -/navigation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (46)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

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

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (9981)

  • FFMPEG mp4 copied to matroska loses last frame

    16 juin 2020, par Mike

    I am running this simple ffmpeg command to change an mp4 video to matroska format so it can support streaming. ffmpeg -i test.mp4 -c copy out.mkv. My issue is that the out.mkv file has one less frame than the original mp4 file. It seems to be missing the last frame.

    



    I thought using copy as the codec should retain the same video. Am I missing passing an option to FFmpeg ? Thanks.

    



    EDIT : Full Log

    



    ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with Apple clang version 11.0.3 (clang-1103.0.32.59)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.3_1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags=-fno-stack-check --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 1970-01-01T00:00:00.000000Z
    encoder         : Lavf53.24.2
  Duration: 00:00:29.57, start: 0.000000, bitrate: 1421 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1032 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      creation_time   : 1970-01-01T00:00:00.000000Z
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default)
    Metadata:
      creation_time   : 1970-01-01T00:00:00.000000Z
      handler_name    : SoundHandler
File 'out.mkv' already exists. Overwrite ? [y/N] y
Output #0, matroska, to 'out.mkv':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 1032 kb/s, 25 fps, 25 tbr, 1k tbn, 12800 tbc (default)
    Metadata:
      creation_time   : 1970-01-01T00:00:00.000000Z
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) ([255][0][0][0] / 0x00FF), 48000 Hz, 5.1, fltp, 383 kb/s (default)
    Metadata:
      creation_time   : 1970-01-01T00:00:00.000000Z
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=  739 fps=0.0 q=-1.0 Lsize=    5129kB time=00:00:29.54 bitrate=1422.0kbits/s speed= 493x
video:3727kB audio:1386kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.309803%


    


  • ffpmeg force overwrite (badly) detected input framerate

    20 juin 2020, par Longoon12000

    I am running IP Webcam on Android which provides an mpjpeg video stream. I have to limit the capture frame rate to 5fps to save on battery.

    


    However ffmpeg will still detect the input stream to be 25 fps, which causes it to be saved in the wrong speed causing timestamps and audio to be desynchronized.

    


    Input #0, mpjpeg, from 'https://***:***@smarthome:8080/video':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1280x720 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
Input #1, ogg, from 'https://***:***@smarthome:8080/audio.opus':
  Duration: N/A, start: 0.006500, bitrate: N/A
    Stream #1:0: Audio: opus, 48000 Hz, mono, fltp
    Metadata:
      ENCODER         : Lavf58.12.100
[stream_segment,ssegment @ 0x19b49a0] Opening '/mnt/nas/SecurityCamera/2020-06-20_14-26-04.mkv' for writing
Output #0, stream_segment,ssegment, to '/mnt/nas/SecurityCamera/%Y-%m-%d_%H-%M-%S.mkv':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 25 tbr, 1k tbn, 25 tbc
    Stream #0:1: Audio: opus, 48000 Hz, mono, fltp
    Metadata:
      ENCODER         : Lavf58.12.100
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #1:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[ogg @ 0x1753e00] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
frame=    8 fps=7.9 q=-1.0 size=N/A time=00:00:00.49 bitrate=N/A speed=0.489x


    


    As you can see it detects Input #0 to be 25 tbr, 25 tbn, 25 tbc which results in an expected 25 fps, however the fps (shown high right now but it slowly approaching 5fps) is way below 25 which causes the speed to be <1x.

    &#xA;

    I have tried to use -r 5 -i ... and -vsync 2 and different values for -enc_time_base none of which had any impact. From https://trac.ffmpeg.org/ticket/403 I've learned that -r only works on inputs with unknown fps. But my input doesn't have unknown fps, it has the wrong fps.

    &#xA;

    Is there any way to force overwrite the input fps so that I can get a proper speed of 1x and synchronized timestamps and audio ?

    &#xA;

  • ffmpeg running in cloudfunction silently fails/never finishes

    19 juin 2020, par Vojtěch

    I am trying to implement a Cloudfunction which would run ffmpeg on a Google bucket upload. I have been playing with a script based on https://kpetrovi.ch/2017/11/02/transcoding-videos-with-ffmpeg-in-google-cloud-functions.html

    &#xA;&#xA;

    The original script needs little tuning as the library evolved a bit. My current version is here :

    &#xA;&#xA;

    const {Storage} = require(&#x27;@google-cloud/storage&#x27;);&#xA;const storage = new Storage();&#xA;const ffmpeg = require(&#x27;fluent-ffmpeg&#x27;);&#xA;const ffmpeg_static = require(&#x27;ffmpeg-static&#x27;);&#xA;&#xA;console.log("Linking ffmpeg path to:", ffmpeg_static)&#xA;ffmpeg.setFfmpegPath(ffmpeg_static);&#xA;&#xA;exports.transcodeVideo = (event, callback) => {&#xA;    const bucket = storage.bucket(event.bucket);&#xA;    console.log(event);&#xA;    if (event.name.indexOf(&#x27;uploads/&#x27;) === -1) {&#xA;        console.log("File " &#x2B; event.name &#x2B; " is not to be processed.")&#xA;        return;&#xA;    }&#xA;&#xA;    // ensure that you only proceed if the file is newly createdxxs&#xA;    if (event.metageneration !== &#x27;1&#x27;) {&#xA;        callback();&#xA;        return;&#xA;    }&#xA;&#xA;    // Open write stream to new bucket, modify the filename as needed.&#xA;    const targetName = event.name.replace("uploads/", "").replace(/[.][a-z0-9]&#x2B;$/, "");&#xA;    console.log("Target name will be: " &#x2B; targetName);&#xA;&#xA;    const remoteWriteStream = bucket.file("processed/" &#x2B; targetName &#x2B; ".mp4")&#xA;        .createWriteStream({&#xA;            metadata: {&#xA;                //metadata: event.metadata, // You may not need this, my uploads have associated metadata&#xA;                contentType: &#x27;video/mp4&#x27;, // This could be whatever else you are transcoding to&#xA;            },&#xA;        });&#xA;&#xA;    // Open read stream to our uploaded file&#xA;    const remoteReadStream = bucket.file(event.name).createReadStream();&#xA;&#xA;    // Transcode&#xA;    ffmpeg()&#xA;        .input(remoteReadStream)&#xA;        .outputOptions(&#x27;-c:v copy&#x27;) // Change these options to whatever suits your needs&#xA;        .outputOptions(&#x27;-c:a aac&#x27;)&#xA;        .outputOptions(&#x27;-b:a 160k&#x27;)&#xA;        .outputOptions(&#x27;-f mp4&#x27;)&#xA;        .outputOptions(&#x27;-preset fast&#x27;)&#xA;        .outputOptions(&#x27;-movflags frag_keyframe&#x2B;empty_moov&#x27;)&#xA;        // https://github.com/fluent-ffmpeg/node-fluent-ffmpeg/issues/346#issuecomment-67299526&#xA;        .on(&#x27;start&#x27;, (cmdLine) => {&#xA;            console.log(&#x27;Started ffmpeg with command:&#x27;, cmdLine);&#xA;        })&#xA;        .on(&#x27;end&#x27;, () => {&#xA;            console.log(&#x27;Successfully re-encoded video.&#x27;);&#xA;            callback();&#xA;        })&#xA;        .on(&#x27;error&#x27;, (err, stdout, stderr) => {&#xA;            console.error(&#x27;An error occured during encoding&#x27;, err.message);&#xA;            console.error(&#x27;stdout:&#x27;, stdout);&#xA;            console.error(&#x27;stderr:&#x27;, stderr);&#xA;            callback(err);&#xA;        })&#xA;        .pipe(remoteWriteStream, { end: true }); // end: true, emit end event when readable stream ends&#xA;};&#xA;&#xA;

    &#xA;&#xA;

    This version correctly runs and I can see this in logs :

    &#xA;&#xA;

    2020-06-16 21:24:22.606  Function execution took 912 ms, finished with status: &#x27;ok&#x27;&#xA;2020-06-16 21:24:52.902  Started ffmpeg with command: ffmpeg -i pipe:0 -c:v copy -c:a aac -b:a 160k -f mp4 -preset fast -movflags frag_keyframe&#x2B;empty_moov pipe:1&#xA;

    &#xA;&#xA;

    It seems the function execution ends before the actual ffmpeg command, which then never finishes.

    &#xA;&#xA;

    Is there a way to make the ffmpeg "synchronous" or "blocking" so that it finishes before the function execution ?

    &#xA;