Recherche avancée

Médias (1)

Mot : - Tags -/musée

Autres articles (38)

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

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    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 (...)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

Sur d’autres sites (2199)

  • Ffmpeg H.264 encode video is sped up if camera capture with low light

    10 août 2020, par Expressingx

    I'm encoding everything to H.264. If h264_qsv is available I'm using it, else libx264. Works fine, but I noticed that if the camera is recording in low light, the video saved is sped up like x2 or x3. And I'm not sure where the problem is. Creating the input format context :

    


        private AVFormatContext* CreateFormatContext()
    {
        AVDictionary* options = null;

        ffmpeg.av_dict_set(&options, "packet-buffering", "0", 0);
        ffmpeg.av_dict_set(&options, "sync", "1", 0);
        ffmpeg.av_dict_set(&options, "rtsp_transport", "tcp", 0);
        ffmpeg.av_dict_set(&options, "reconnect", "1", 0);
        ffmpeg.av_dict_set(&options, "analyzeduration", "2000000", 0);
        ffmpeg.av_dict_set(&options, "probesize", (16384 * 16).ToString(), 0);
        ffmpeg.av_dict_set(&options, "max_delay", "0", 0);
        ffmpeg.av_dict_set(&options, "reorder_queue_size", "0", 0);
        ffmpeg.av_dict_set(&options, "skip_frame", "8", 0);
        ffmpeg.av_dict_set(&options, "skip_loop_filter", "48", 0);
        ffmpeg.av_dict_set(&options, "rtbufsize", "1000M", 0);

        AVFormatContext* pInputFmtCtx = ffmpeg.avformat_alloc_context();

        AVInputFormat* inputFormat = null;

        if (!string.IsNullOrEmpty(_format))
        {
            inputFormat = ffmpeg.av_find_input_format(_format);

            if (inputFormat == null)
            {
                //throw
            }
        }

        int ret = ffmpeg.avformat_open_input(&pInputFmtCtx, _streamUrl, inputFormat, &options);

        if (ret != 0)
        {
            //throw
        }

        return pInputFmtCtx;
    }


    


    video decoder

    


        private void CreateVideoDecoder()
    {
        AVStream* videoStream = InputFormatContext->streams[VideoStreamIndex];
        AVCodecParameters* videoCodecParams = videoStream->codecpar;
        AVCodec* videoDecoder = ffmpeg.avcodec_find_decoder(videoCodecParams->codec_id);

        VideoDecodeContext = ffmpeg.avcodec_alloc_context3(videoDecoder);

        if (ffmpeg.avcodec_parameters_to_context(VideoDecodeContext, videoCodecParams) < 0)
        {
            //throw
        }

        if (ffmpeg.avcodec_open2(VideoDecodeContext, videoDecoder, null) < 0)
        {
            //throw
        }
    }


    


    and the h264 encoder

    


    private void CreateH264Encoder(AVStream* inputStream, AVStream* outputStream)
    {
        AVRational framerate = ffmpeg.av_guess_frame_rate(_inputContext.InputFormatContext, inputStream, null);

        AVCodec* videoEncoder = ffmpeg.avcodec_find_encoder_by_name("h264_qsv");
        if (videoEncoder == null)
        {
            videoEncoder = ffmpeg.avcodec_find_encoder_by_name("libx264");
            PixelFormat = AVPixelFormat.AV_PIX_FMT_YUV420P;
        }

        if (videoEncoder == null)
        {
            //throw
        }

        VideoEncodeContext = ffmpeg.avcodec_alloc_context3(videoEncoder);

        if (VideoEncodeContext == null)
        {
            //throw
        }

        VideoEncodeContext->width = _inputContext.VideoDecodeContext->width;
        VideoEncodeContext->height = _inputContext.VideoDecodeContext->height;
        VideoEncodeContext->pix_fmt = PixelFormat;
        VideoEncodeContext->bit_rate = 2 * 1000 * 1000;
        VideoEncodeContext->rc_buffer_size = 4 * 1000 * 1000;
        VideoEncodeContext->rc_max_rate = 2 * 1000 * 1000;
        VideoEncodeContext->rc_min_rate = 3 * 1000 * 1000;
        VideoEncodeContext->framerate = framerate;
        VideoEncodeContext->max_b_frames = 0;
        VideoEncodeContext->time_base = ffmpeg.av_inv_q(framerate);
        VideoEncodeContext->flags |= ffmpeg.AV_CODEC_FLAG_GLOBAL_HEADER;

        ffmpeg.av_opt_set(VideoEncodeContext->priv_data, "preset", "slow", 0);
        ffmpeg.av_opt_set(VideoEncodeContext->priv_data, "vprofile", "baseline", 0);

        if (ffmpeg.avcodec_open2(VideoEncodeContext, videoEncoder, null) < 0)
        {
            //throw
        }

        ffmpeg.avcodec_parameters_from_context(outputStream->codecpar, VideoEncodeContext);
    }


    


    I'm using ffmpeg 4.0.1, so I'm decoding/encoding with the new format API which I'll skip to share for now because its nothing more than following the link : https://ffmpeg.org/doxygen/3.3/group__lavc__encdec.html

    


  • Joining Lots of clips with crossfade filter using FFmpeg

    26 juillet 2020, par Mr. Who

    I have many video-only clips and I would like to join them with crossfade filter using FFmpeg. My Idea was that I join first two then join it with the next and so on. I implemented the loop in the python and run bash commend using os.system(). My code has been demonstrated below :

    


    out_n = '0.mp4' # output of step n (current step)
for i in range(1,10):
    out_np1 = 'mm%d.mp4'%(i)  # output of step n+1 (next step)
    t0 = time.time() 
    o = os.system('ffmpeg  -i %s -i %d.mp4  -f lavfi -i "color=black:s=1920x1080:d=9" -filter_complex "[0:v]format=pix_fmts=yuva420p,fade=t=out:st=4:d=1:alpha=1,setpts=PTS-STARTPTS[va0];[1:v]format=pix_fmts=yuva420p,fade=t=in:st=0:d=1:alpha=1,setpts=PTS-STARTPTS+4/TB[va1];[2:v][va0]overlay[over1];[over1][va1]overlay=format=yuv420[outv]" -vcodec libx264 -map [outv] %s'%(out_n, i, out_np1))
    print('# %d'%i,(time.time() - t0)/60,o)
    os.remove(out_n) 
    out_n = out_np1  


    


    My Problem is that it won't work properly, the very last output does not even contain all of the last clip and there is no trace of previous ones.

    


  • Linux - ffmpeg 3.4.6 vs. 4.2.1 - bash script with Tee (record & stream) runs in older version just fine - what needs to change for new version ?

    22 juillet 2020, par pomptondrive

    Thanks for reading my post. I have a bash script that I tested and it ran just fine ; although I was putting the script into identical hardware as the test computer, I forgot that the target computer would have a newer version of ffmpeg. It should be simple. I'm splitting the signal, recording, and streaming via UDP. Here's the script, that runs just fine with ffmpeg 3.4.6 :

    


    ffmpeg -f v4l2 -i /dev/video0 -t 00:30:00 -vf "drawtext=fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf:text='%{localtime\:%T}':x=20:y=20:fontcolor=white" \
-profile:v high -pix_fmt yuvj420p -level:v 4.1 -preset ultrafast -tune \
zerolatency -vcodec libx264 -r 15 -b:v 512k -s 960x720 -f mpegts -flush_packets 0 \
-f tee -map 0:v "/media/dkm/video_usb/videos/video_$(date +%Y-%m-%d_%H.%M.%S).mkv|[f=mpegts]udp://192.168.0.19:5000?pkt_size=1316"


    


    I could try to downgrade, but that doesn't seem right, since that computer is running Linux Mint 19.2 and the original test computer was Ubuntu 18.4 LTS. Is there something basic that I need to change for v. 4.2.1 ?

    


    I'm hoping that this is a quick fix, since it runs in the old version, but I've learned not to get my hopes up for such things. Any help would be appreciated. I've perused the documentation, but I wasn't able to see anything salient. Thanks in advance !