Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (64)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (8503)

  • subprocess.check_output fails with CalledProcessError but error is empty string. Command works in terminal

    11 août 2022, par Leonardo the Vinchi

    I want to run the command ffprobe -i test.m4a -show_entries format=duration -v quiet -of csv="p=0". It works in the terminal and returns output code 0, but running it with subprocess, i.e.

    


    subprocess.check_output(['ffprobe', '-i', 'test.m4a', '-show_entries', 'format=duration', '-v', 'quiet', '-of', 'csv="p=0"'])


    


    raises a CalledProcessError - {Command} returned non-zero exit status 1.. I tried running this command in a try-except loop and printing the error details, but it just outputs as an empty byte string b''.

    


  • swscale/x86/rgb_2_rgb : Empty MMX state in ff_shuffle_bytes_2103_mmxext

    21 août 2022, par Andreas Rheinhardt
    swscale/x86/rgb_2_rgb : Empty MMX state in ff_shuffle_bytes_2103_mmxext
    

    Fixes FATE-failures with the the filter-2xbr filter-3xbr filter-4xbr
    filter-ep2x filter-ep3x filter-hq2x filter-hq3x filter-hq4x
    filter-paletteuse-bayer filter-paletteuse-bayer0
    filter-paletteuse-nodither and filter-paletteuse-sierra2_4a tests
    when using 32bit x86 with CPUFLAGS ranging from "mmx+mmxext" to
    "mmx+mmxext+sse+sse2+sse3" (the relevant function is only overwritten
    when using SSSE3).

    Reviewed-by : Lynne <dev@lynne.ee>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libswscale/x86/rgb_2_rgb.asm
  • FFMPEG- H.264 encoding BGR image data to YUP420P video file resulting in empty video

    22 septembre 2022, par Cogentleman

    I'm new to FFMPEG and trying to use it to do some screen capture to a video file, but after a lot of online searching I am stumped as to what I'm doing wrong. Basically, I've already done the effort of capturing screen data via DirectX which stores in a BGR pixel format and I'm just trying to put each frame in a video file. There's two functions, setup which does all the ffmpeg initialization work, and addImage which is called in the main program loop and puts each buffer of BGR image data into a video file. The technique I'm doing for this is to make two frames, one with the BGR data and one with YUP420P (doesn't need to be the latter but after a lot of trial and error it was all I was able to get working with H.264), and use sws_scale to copy data between the two, and then send that frame to video.mp4. The file seems to be having data written to it successfully (the file size grows and grows as the program runs), but when I try and view it in VLC I see nothing- indeed, VLC fails to fetch a length of the video, and bringing up codec and media information both are empty. I turned on ffmpeg verbose logging but all that is spit out is the following :

    &#xA;

    Setting default whitelist &#x27;Epu��&#x27;&#xA;Timestamps are unset in a packet for stream -1259342440. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly&#xA;Encoder did not produce proper pts, making some up.&#xA;

    &#xA;

    From what I am reading, I understand this to be warnings rather than errors that would totally corrupt my video file. I separately went through all the error codes being spit out and everything seems nominal to me (zero for success for most calls, -11 sometimes for avcodec_receive_packet but the docs indicate that's expected sometimes).

    &#xA;

    Based on my understanding of things as they are, this should be working, but isn't, and the logs and error codes give me nothing to go on, so someone with experience with this I reckon would save me a ton of time. The code is as follows :

    &#xA;

    VideoService.h

    &#xA;

    #ifndef VIDEO_SERVICE_H&#xA;#define VIDEO_SERVICE_H&#xA;&#xA;extern "C" {&#xA;#include <libavcodec></libavcodec>avcodec.h>&#xA;#include <libavformat></libavformat>avformat.h>&#xA;#include <libavutil></libavutil>imgutils.h>&#xA;#include <libswscale></libswscale>swscale.h>&#xA;}&#xA;&#xA;class VideoService {&#xA;    public:&#xA;        void setup();&#xA;        void addImage(unsigned char* data, int lineSize, int width, int height, int align);&#xA;    private:&#xA;        AVCodecContext* context;&#xA;        AVFormatContext* formatContext;&#xA;        AVFrame* bgrFrame;&#xA;        AVFrame* yuvFrame;&#xA;        AVStream* videoStream;&#xA;        SwsContext* swsContext;&#xA;};&#xA;&#xA;#endif&#xA;

    &#xA;

    VideoService.cpp

    &#xA;

    #include "VideoService.h"&#xA;#include &#xA;&#xA;void FfmpegLogCallback(void *ptr, int level, const char *fmt, va_list vargs)&#xA;{&#xA;    FILE* f = fopen("ffmpeg.txt", "a");&#xA;    fprintf(f, fmt, vargs);&#xA;    fclose(f);&#xA;}&#xA;&#xA;void VideoService::setup() {&#xA;    int result = 0;&#xA;    av_log_set_level(AV_LOG_VERBOSE);&#xA;    av_log_set_callback(FfmpegLogCallback);&#xA;    bgrFrame = av_frame_alloc();&#xA;    bgrFrame->width = 1920;&#xA;    bgrFrame->height = 1080;&#xA;    bgrFrame->format = AV_PIX_FMT_BGRA;&#xA;    bgrFrame->time_base.num = 1;&#xA;    bgrFrame->time_base.den = 60;&#xA;    result = av_frame_get_buffer(bgrFrame, 1);&#xA;    yuvFrame = av_frame_alloc();&#xA;    yuvFrame->width = 1920;&#xA;    yuvFrame->height = 1080;&#xA;    yuvFrame->format = AV_PIX_FMT_YUV420P;&#xA;    yuvFrame->time_base.num = 1;&#xA;    yuvFrame->time_base.den = 60;&#xA;    result = av_frame_get_buffer(yuvFrame, 1);&#xA;    const AVOutputFormat* outputFormat = av_guess_format("mp4", "video.mp4", "video/mp4");&#xA;    result = avformat_alloc_output_context2(&#xA;        &amp;formatContext,&#xA;        outputFormat,&#xA;        "mp4",&#xA;        "video.mp4"&#xA;    );&#xA;    formatContext->oformat = outputFormat;&#xA;    const AVCodec* codec = avcodec_find_encoder(AVCodecID::AV_CODEC_ID_H264);&#xA;    result = avio_open2(&amp;formatContext->pb, "video.mp4", AVIO_FLAG_WRITE, NULL, NULL);&#xA;    videoStream = avformat_new_stream(formatContext, codec);&#xA;    AVCodecParameters* codecParameters = videoStream->codecpar;&#xA;    codecParameters->codec_type = AVMediaType::AVMEDIA_TYPE_VIDEO;&#xA;    codecParameters->codec_id = AVCodecID::AV_CODEC_ID_HEVC;&#xA;    codecParameters->width = 1920;&#xA;    codecParameters->height = 1080;&#xA;    codecParameters->format = AVPixelFormat::AV_PIX_FMT_YUV420P;&#xA;    videoStream->time_base.num = 1;&#xA;    videoStream->time_base.den = 60;&#xA;    result = avformat_write_header(formatContext, NULL);&#xA;    &#xA;    codec = avcodec_find_encoder(videoStream->codecpar->codec_id);&#xA;    context = avcodec_alloc_context3(codec);&#xA;    context->time_base.num = 1;&#xA;    context->time_base.den = 60;&#xA;    avcodec_parameters_to_context(context, videoStream->codecpar);&#xA;    result = avcodec_open2(context, codec, nullptr);&#xA;    swsContext = sws_getContext(1920, 1080, AV_PIX_FMT_BGRA, 1920, 1080, AV_PIX_FMT_YUV420P, 0, 0, 0, 0);&#xA;}&#xA;&#xA;void VideoService::addImage(unsigned char* data, int lineSize, int width, int height, int align) {&#xA;    int result = 0;&#xA;    result = av_image_fill_arrays(bgrFrame->data, bgrFrame->linesize, data, AV_PIX_FMT_BGRA, 1920, 1080, 1);&#xA;    sws_scale(swsContext, bgrFrame->data, bgrFrame->linesize, 0, 1080, &amp;yuvFrame->data[0], yuvFrame->linesize); &#xA;    result = avcodec_send_frame(context, yuvFrame);&#xA;    AVPacket *packet = av_packet_alloc();&#xA;    result = avcodec_receive_packet(context, packet);&#xA;    if (result != 0) {&#xA;        return;&#xA;    }&#xA;    result = av_interleaved_write_frame(formatContext, packet);&#xA;}&#xA;

    &#xA;

    My environment is windows 10, I'm building with clang++ 12.0.1, and using the FFMPEG 5.1 libs.

    &#xA;