Recherche avancée

Médias (1)

Mot : - Tags -/bug

Autres articles (31)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 is the first MediaSPIP stable release.
    Its official release date is June 21, 2013 and is announced here.
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

Sur d’autres sites (7079)

  • What encoders/decoders/muxers/demuxers/parsers/filters do I need to enable in FFMpeg for converting an mp4 video to a gif ?

    21 juin 2020, par kostik

    I am building FFmpeg with custom options to reduce the final size of apk file on android. I want just convert a mp4 file to a gif.
Following is my options specified

    


     --disable-everything
 --enable-decoder=mpeg4,mpegvideo,aac,gif,h264
 --enable-parser=aac,mpeg4video,mpegaudio,mpegvideo,gif,h264
 --enable-demuxer=mpegvideo,aac,mov,gif,h264
 --enable-muxer=mp4,gif,mov,h264
 --enable-protocol=file
 --enable-encoder=mpeg4,mov,gif,h264
 --enable-filter=scale,fps,copy,palettegen,vflip,paletteuse,crop


    


    What other options do i need to add to successfully run this command ?

    


    ffmpeg -y -i input.mp4 -vf "fps=15,scale=320:-1:flags=lanczos" -pix_fmt rgb24 output.gif


    


    or this command

    


    ffmpeg -y -i input.mp4 output.gif


    


    After I added module into Android Studio I run FFmpeg command.
Iam getting this error :

    


    2020-06-21 12:16:09.883 8871-9102/com.example.myapplication W/mobile-ffmpeg: [graph 0 input from stream 0:0 @ 0x7088243f40] sws_param option is deprecated and ignored
2020-06-21 12:16:09.885 8871-9102/com.example.myapplication W/mobile-ffmpeg: Incompatible pixel format 'rgb24' for codec 'gif', auto-selecting format 'rgb8'
2020-06-21 12:16:09.885 8871-9102/com.example.myapplication E/mobile-ffmpeg: Output pad "default" with type video of the filter instance "Parsed_scale_1" of scale not connected to any destination
2020-06-21 12:16:09.885 8871-9102/com.example.myapplication E/mobile-ffmpeg: Error reinitializing filters!
2020-06-21 12:16:09.885 8871-9102/com.example.myapplication E/mobile-ffmpeg: Failed to inject frame into filter network: Invalid argument
2020-06-21 12:16:09.886 8871-9102/com.example.myapplication E/mobile-ffmpeg: Error while processing the decoded data for stream #0:0


    


    I also tried to include FULL library and it that case everything worked as expected.

    


    Thanks for your help.

    


  • 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

    



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

    



    const {Storage} = require('@google-cloud/storage');
const storage = new Storage();
const ffmpeg = require('fluent-ffmpeg');
const ffmpeg_static = require('ffmpeg-static');

console.log("Linking ffmpeg path to:", ffmpeg_static)
ffmpeg.setFfmpegPath(ffmpeg_static);

exports.transcodeVideo = (event, callback) => {
    const bucket = storage.bucket(event.bucket);
    console.log(event);
    if (event.name.indexOf('uploads/') === -1) {
        console.log("File " + event.name + " is not to be processed.")
        return;
    }

    // ensure that you only proceed if the file is newly createdxxs
    if (event.metageneration !== '1') {
        callback();
        return;
    }

    // Open write stream to new bucket, modify the filename as needed.
    const targetName = event.name.replace("uploads/", "").replace(/[.][a-z0-9]+$/, "");
    console.log("Target name will be: " + targetName);

    const remoteWriteStream = bucket.file("processed/" + targetName + ".mp4")
        .createWriteStream({
            metadata: {
                //metadata: event.metadata, // You may not need this, my uploads have associated metadata
                contentType: 'video/mp4', // This could be whatever else you are transcoding to
            },
        });

    // Open read stream to our uploaded file
    const remoteReadStream = bucket.file(event.name).createReadStream();

    // Transcode
    ffmpeg()
        .input(remoteReadStream)
        .outputOptions('-c:v copy') // Change these options to whatever suits your needs
        .outputOptions('-c:a aac')
        .outputOptions('-b:a 160k')
        .outputOptions('-f mp4')
        .outputOptions('-preset fast')
        .outputOptions('-movflags frag_keyframe+empty_moov')
        // https://github.com/fluent-ffmpeg/node-fluent-ffmpeg/issues/346#issuecomment-67299526
        .on('start', (cmdLine) => {
            console.log('Started ffmpeg with command:', cmdLine);
        })
        .on('end', () => {
            console.log('Successfully re-encoded video.');
            callback();
        })
        .on('error', (err, stdout, stderr) => {
            console.error('An error occured during encoding', err.message);
            console.error('stdout:', stdout);
            console.error('stderr:', stderr);
            callback(err);
        })
        .pipe(remoteWriteStream, { end: true }); // end: true, emit end event when readable stream ends
};



    



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

    



    2020-06-16 21:24:22.606  Function execution took 912 ms, finished with status: 'ok'
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+empty_moov pipe:1


    



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

    



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

    


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