Recherche avancée

Médias (0)

Mot : - Tags -/page unique

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

Autres articles (66)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (7338)

  • Saving frames from a network camera (RTSP) to a mp4 file

    24 novembre 2015, par Dídac Pérez

    I am quite confused about how to save a video stream into a mp4 file. I am using ffmpeg. Let me explain the problem :

    1. I connect to a network camera via RTSP (H.264 stream) with avformat_open_input(), avformat_find_stream_info(), av_read_play(), and I get frames with av_read_frame().
    2. Each time I get a frame with av_read_frame(), I store the corresponding AVPacket in a circular buffer.
    3. In some points in my application, a range of this circular buffer is selected. I find a key frame used to start from.
    4. Once I have a list of AVPacket’s starting from a key frame, I write header, frames, and tail, as I described below in the code.

    The problem is that the resulting mp4 video has artifacts if I try to watch it using VLC, Windows Media Player, or another one.

    I have also realized that the pts of that packets are not continuous, while dts are continuous. I know about B frames, but is this a problem in my case ?

    // Prepare the output
    AVFormatContext* oc = avformat_alloc_context();
    oc->oformat = av_guess_format(NULL, "video.mp4", NULL);

    // Must write header, packets, and trailing
    avio_open2(&oc->pb, "video.mp4", AVIO_FLAG_WRITE, NULL, NULL);

    // Write header
    AVStream* stream = avformat_new_stream(oc, (AVCodec*) context->streams[video_stream_index]->codec->codec);
    avcodec_copy_context(stream->codec, context->streams[video_stream_index]->codec);
    stream->sample_aspect_ratio = context->streams[video_stream_index]->codec->sample_aspect_ratio;
    avformat_write_header(oc, NULL);

    // FOR EACH FRAME...
    ... av_write_frame(oc, circular[k]); ...

    // Write trailer and close the file
    av_write_trailer(oc);
    avcodec_close(stream->codec);
    avio_close(oc->pb);
    avformat_free_context(oc);

    Thank you so much,

  • Fastest way to convert video to frames wihout saving the frames locally

    24 février 2020, par Abhik Sarkar

    I want to apply batch prediction on Videos using Pytorch.

    The Problem is I am having many videos to process and don’t want to save additional frames.
    Is there a way I can save ’n frames’ in 1FPS and apply deep learning at the same time ?

    In other words, I am having VIDEODATASET is there any VIDEODATALOADER ?

  • Convert file without saving it using fluent-ffmpeg in nodejs

    17 avril 2020, par Scherer

    What I am trying to do is create a node application that receives a mkv file, converts it to mp4, hardburning the subtitles, and sends it back so the user can download it. In the command line this works perfectly

    



    ffmpeg -i input.mkv -threads 1 -vf subtitles=input.mkv -acodec copy output.mp4

    



    Then, I tried to translate this into a node route using fluent-ffmpeg

    



    var ffmpeg = require('fluent-ffmpeg');

routes.post('/process', (req, res) => {
    //file sent
    const file = req.files.file
    const path = __dirname + '/public/data/'

    //saves file in server
    file.mv(path + file.name, err => {
        if (err) return res.sendStatus(500).send(err)
        console.log('upload successful')
    })

    //convert the file to mp4 with the hardburned subtitle
    ffmpeg(path + file.name).toFormat('mp4')
    .addOutputOption(["-threads 1"])
    .addOutputOption(["-acodec copy"])
    .addOutputOption(['-vf subtitles=' + path + file.name])
    .on('end', () => {
        console.log('done')
        res.sendStatus(200)
    })
    .on('error', console.log)
    .saveToFile(path + 'output.mp4') //saves file in server
})


    



    Unfortunately, this didn't work and the code returned the following error message

    



    Error: ffmpeg exited with code 1: Error reinitializing filters!&#xA;Failed to inject frame into filter network: Invalid argument&#xA;Error while processing the decoded data for stream #0:0&#xA;Conversion failed!&#xA;&#xA;    at ChildProcess.<anonymous> (C:\Users\fsvic\Desktop\ffmpeg_teste_node\node_modules\fluent-ffmpeg\lib\processor.js:182:22)&#xA;    at ChildProcess.emit (events.js:182:13)&#xA;    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12) &#x27;&#x27; &#x27;ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers\n  built with gcc 9.1.1 (GCC) 20190807\n  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt\n  libavutil      56. 31.100 / 56. 31.100\n  libavcodec     58. 54.100 / 58. 54.100\n  libavformat    58. 29.100 / 58. 29.100\n  libavdevice    58.  8.100 / 58.  8.100\n  libavfilter     7. 57.100 /  7. 57.100\n  libswscale      5.  5.100 /  5.  5.100\n  libswresample   3.  5.100 /  3.  5.100\n  libpostproc    55.  5.100 / 55.  5.100\nInput #0, matroska,webm, from \&#x27;C:\\Users\\fsvic\\Desktop\\ffmpeg_teste_node/public/data/star_trails.mkv\&#x27;:\n  Metadata:\n    COMPATIBLE_BRANDS: mp42mp41\n    MAJOR_BRAND     : mp42\n    MINOR_VERSION   : 0\n    ENCODER         : Lavf57.66.105\n  Duration: 00:00:21.25, start: 0.000000, bitrate: 1893 kb/s\n    Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tbc (default)\n    Metadata:\n      HANDLER_NAME    : ?Mainconcept Video Media Handler\n      ENCODER         : Lavc57.83.101 libx264\n      DURATION        : 00:00:21.163000000\n    Stream #0:1(eng): Audio: vorbis, 48000 Hz, stereo, fltp (default)\n    Metadata:\n      HANDLER_NAME    : #Mainconcept MP4 Sound Media Handler\n      ENCODER         : Lavc57.83.101 libvorbis\n      DURATION        : 00:00:21.251000000\nStream mapping:\n  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))\n  Stream #0:1 -> #0:1 (copy)\nPress [q] to stop, [?] for help\n[subtitles @ 000001cc091dbb80] Unable to parse option value "UsersfsvicDesktopffmpeg_teste_node/public/data/star_trails.mkv" as image size\n    Last message repeated 1 times\n[subtitles @ 000001cc091dbb80] Error setting option original_size to value UsersfsvicDesktopffmpeg_teste_node/public/data/star_trails.mkv.\n[Parsed_subtitles_0 @ 000001cc0910a8c0] Error applying options to the filter.\n[AVFilterGraph @ 000001cc0912ba80] Error initializing filter \&#x27;subtitles\&#x27; with args \&#x27;C:UsersfsvicDesktopffmpeg_teste_node/public/data/star_trails.mkv\&#x27;\nError reinitializing filters!\nFailed to inject frame into filter network: Invalid argument\nError while processing the decoded data for stream #0:0\nConversion failed!\n&#x27;&#xA;</anonymous>

    &#xA;&#xA;

    Besides that, I cannot save anything in the server side due to memory limitations, so I need a way to use the FFmpeg commands without an actual file in the folder. I discovered that the pipe feature might do the job, but I have no idea on how I could implement it in the current code.

    &#xA;