Recherche avancée

Médias (91)

Autres articles (102)

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

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

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

Sur d’autres sites (8197)

  • Play AAC in SoundManager2 won't start

    27 novembre 2012, par sasa

    I converted audio file MP4 to AAC and then want to play that file in SoundManager2. If I use some software for Windows for convert, everying is fine, audio is playing well. But, on server side when MP4 file is converted to AAC using ffmpeg, file is loaded in SM2, but playing is not started.

    I use this command :

    ffmpeg -i in.mp4 out.aac

    Here is SoundManager2 log :

    -- SoundManager 2: HTML5 support tests (/^(probably|maybe)$/i): mp3: true (preferring flash), mp4: true (preferring flash), ogg: true, wav: true -- soundmanager2.js:1156
    -- SoundManager 2 V2.97a.20120916 (AS3/Flash 9) + HTML5 audio, high performance mode, custom (1ms) polling, wmode: transparent, flash debug mode, flashBlock mode -- soundmanager2.js:1156
    soundManager::createMovie(): Trying to load /soundmanager/swf/soundmanager2_flash9_debug.swf soundmanager2.js:1156
    soundManager::initMovie(): Waiting for ExternalInterface call from Flash... soundmanager2.js:1158
    soundManager::externalInterfaceOK() (~0 ms) soundmanager2.js:1158
    soundManager::init() soundmanager2.js:1158
    soundManager: Attempting JS to Flash call... soundmanager2.js:1158
    (Flash): SM2 SWF V2.97a.20120916 (AS3/Flash 9) soundmanager2.js:1158
    Flash security sandbox type: remote soundmanager2.js:1158
    (Flash): JS to/from Flash OK soundmanager2.js:1158
    (Flash): Enabling polling, 1 ms interval soundmanager2.js:1158
    -- SoundManager 2 loaded (OK) -- soundmanager2.js:1156
    soundManager: Firing 1 onready() item soundmanager2.js:1158
    threeSixtyPlayer.init() soundmanager2.js:1158
    threeSixtyPlayer.init(): Found 1 relevant items. soundmanager2.js:1158
    handleClick() soundmanager2.js:1158
    soundManager.createSound(): ui360Sound0 (http://[private url]/out.aac?v=1350309261) soundmanager2.js:1156
    soundManager.createSound(): Enabling usePolicyFile for data access soundmanager2.js:1158
    SMSound() merged options: {
    id: ui360Sound0,
    url: http://[private url]/out.aac?v=1350309261,
    onplay: { pl.removeClass(this._360data.oUIBox,this._360data.className); t... },
    onstop: { pl.removeClass(this._360data.oUIBox,this._360data.className); t... },
    onpause: { pl.removeClass(this._360data.oUIBox,this._360data.className); t... },
    onresume: { pl.removeClass(this._360data.oUIBox,this._360data.className); t... },
    onfinish: { var nextLink; pl.removeClass(this._360data.oUIBox,this._360data... },
    onbufferchange: { if (this.isBuffering) { pl.addClass(this._360data.oUIBox,pl.css... },
    whileloading: { if (this.paused) { self.updatePlaying.apply(this); } }... },
    whileplaying: { self.updatePlaying.apply(this); this._360data.fps++; }... },
    useWaveformData: false,
    useEQData: false,
    usePeakData: true,
    autoLoad: false,
    autoPlay: false,
    loops: 1,
    multiShot: true,
    multiShotEvents: false,
    pan: 0,
    stream: true,
    usePolicyFile: true,
    volume: 50,
    useMovieStar: false,
    isMovieStar: false,
    bufferTime: 3
    } soundmanager2.js:1158
    (Flash): SoundManager2_SMSound_AS3: Got duration: 0, autoPlay: false soundmanager2.js:1158
    SMSound.play(): Attempting to load "ui360Sound0" soundmanager2.js:1156
    SMSound.load(): http://[private url]/out.aac?v=1350309261 soundmanager2.js:1156
    SMSound.play(): "ui360Sound0" is starting to play soundmanager2.js:1158
    fanOut: ui360Sound0: http://[private url]/out.aac?v=1350309261 soundmanager2.js:1158
    (Flash): start (ui360Sound0): 0 soundmanager2.js:1158
    SMSound._onbufferchange(): 1 soundmanager2.js:1158
    SMSound._onbufferchange(): 0 soundmanager2.js:1158
    SMSound._onload(): "ui360Sound0" loaded.

    What can be a problem ?

  • How can I use ffmpeg inside my wpf application

    6 avril 2022, par Kanoto

    I'm having some issue about using ffmpeg in my wpf project, I dunno why but it seems to not work inside msvc.

    


    ErrorLoadFFmpeg

    


    But it seems to work just fine in cmd.
I'm trying to use it in GoProControl project.
I already added path, $PATH with "C :\FFmpeg" and "C :\FFmpeg\bin" as well.
I have no idea why it doesn't work.

    


    using Newtonsoft.Json.Linq;&#xA;using System;&#xA;using System.Collections.Generic;&#xA;using System.Diagnostics;&#xA;using System.Linq;&#xA;using System.Net;&#xA;using System.Net.Sockets;&#xA;using System.Text;&#xA;using System.Threading.Tasks;&#xA;using System.Windows;&#xA;using System.Windows.Controls;&#xA;using System.Windows.Data;&#xA;using System.Windows.Documents;&#xA;using System.Windows.Input;&#xA;using System.Windows.Media;&#xA;using System.Windows.Media.Imaging;&#xA;using System.Windows.Navigation;&#xA;using System.Windows.Shapes;&#xA;&#xA;namespace GoProControl&#xA;{&#xA;    /// <summary>&#xA;    /// Logique d&#x27;interaction pour MainWindow.xaml&#xA;    /// </summary>&#xA;    public partial class GoProWindowsControl : Window&#xA;    {&#xA;        bool VERBOSE = false;&#xA;&#xA;        //Sends Record command to GoPro Camera, must be in Video mode!&#xA;        bool RECORD = true;&#xA;&#xA;        //Converts GoPro camera live stream via FFMPEG to a local source, must be in Video mode!&#xA;        bool STREAM = false;&#xA;&#xA;        //Saves the feed to a custom location&#xA;        bool SAVE = false;&#xA;&#xA;        private bool m_status;&#xA;&#xA;        WebClient myWebClient;&#xA;&#xA;&#xA;        public GoProWindowsControl()&#xA;        {&#xA;            myWebClient = new WebClient();&#xA;            m_status = false;&#xA;            InitializeComponent();&#xA;&#xA;            InitializeMainWindow();&#xA;&#xA;            InitializeFFME();&#xA;        }&#xA;&#xA;        private void InitializeMainWindow()&#xA;        {&#xA;&#xA;            PreviewKeyDown &#x2B;= OnWindowKeyDown;&#xA;&#xA;        }&#xA;&#xA;        private void InitializeFFME()&#xA;        {&#xA;            Unosquare.FFME.Library.FFmpegDirectory = @"C:\FFmpeg";&#xA;            if (VERBOSE == false)&#xA;                Unosquare.FFME.Library.FFmpegLogLevel = FFmpeg.AutoGen.ffmpeg.AV_LOG_PANIC;&#xA;            else&#xA;                Unosquare.FFME.Library.FFmpegLogLevel = FFmpeg.AutoGen.ffmpeg.AV_LOG_ERROR;&#xA;            Unosquare.FFME.Library.FFmpegLoadModeFlags = FFmpeg.AutoGen.FFmpegLoadMode.VideoOnly;&#xA;&#xA;            Unosquare.FFME.Library.LoadFFmpeg();&#xA;        }&#xA;

    &#xA;

  • How to create a MPEG4 file using FFMPEG : avcodec_send_frame() indicates error 2

    15 janvier 2024, par Summit

    I am trying to create a MPEG4 file using FFMPEG , the initialize function is successful but the :writeFrame(unsigned char* imageData) function return error code of 2 at this line

    &#xA;

    if (avcodec_send_frame(m_CodecContext, frame) &lt; 0)&#xA;

    &#xA;

    This is my code.

    &#xA;

    FFmpegVideoWriter::FFmpegVideoWriter()&#xA;    : m_Initialized(false)&#xA;{&#xA;&#xA;}&#xA;&#xA;FFmpegVideoWriter::~FFmpegVideoWriter()&#xA;{&#xA;    //dispose();&#xA;}&#xA;&#xA;bool FFmpegVideoWriter::init(const std::string&amp; filename, int width, int height, int fps)&#xA;{&#xA;    if (m_Initialized){&#xA;        return false;&#xA;    }&#xA;&#xA;    avcodec_register_all();&#xA;    m_Codec = avcodec_find_encoder(AV_CODEC_ID_MPEG4);&#xA;    if (!m_Codec) {&#xA;        qDebug() &lt;&lt; "Codec not found";&#xA;        return false;&#xA;    }&#xA;&#xA;    m_CodecContext = avcodec_alloc_context3(m_Codec);&#xA;    m_CodecContext->bit_rate = 4000000;&#xA;    m_CodecContext->width = width;&#xA;    m_CodecContext->height = height;&#xA;    m_CodecContext->time_base = { 1, fps };&#xA;    m_CodecContext->framerate = { fps, 1 };&#xA;    m_CodecContext->gop_size = 10;&#xA;    m_CodecContext->max_b_frames = 1;&#xA;    m_CodecContext->pix_fmt = AV_PIX_FMT_YUV420P;&#xA;&#xA;    if (avcodec_open2(m_CodecContext, m_Codec, nullptr) &lt; 0) {&#xA;        qDebug() &lt;&lt; "Could not open the codec";&#xA;        return false;&#xA;    }&#xA;&#xA;    frame = av_frame_alloc();&#xA;    if (!frame) {&#xA;        qDebug() &lt;&lt; "Could not allocate the frame";&#xA;        return false;&#xA;    }&#xA;&#xA;    frame->format = m_CodecContext->pix_fmt;&#xA;    frame->width = m_CodecContext->width;&#xA;    frame->height = m_CodecContext->height;&#xA;&#xA;    if (av_frame_get_buffer(frame, 32) &lt; 0) {&#xA;        qDebug() &lt;&lt; "Could not allocate the video frame data";&#xA;        return false;&#xA;    }&#xA;&#xA;    struct stat buffer;&#xA;    if (stat(filename.c_str(), &amp;buffer) == 0) {&#xA;        // File exists , ask for overwrite confirmation&#xA;        QMessageBox msgBox;&#xA;        msgBox.setText("The file already exists");&#xA;        msgBox.setInformativeText("Do you want to overwrite it?");&#xA;        msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);&#xA;        msgBox.setDefaultButton(QMessageBox::Yes);&#xA;&#xA;        int ret = msgBox.exec();&#xA;        if (ret == QMessageBox::No) {&#xA;            // User chose not to overwrite , return false&#xA;            return false;&#xA;        }&#xA;        // If Yes , Proceed further&#xA;    }&#xA;&#xA;    file = fopen(filename.c_str(), "wb");&#xA;    if (!file) {&#xA;        qDebug() &lt;&lt; "Could not open or crate output file";&#xA;        return false;&#xA;    }&#xA;    else&#xA;        qDebug() &lt;&lt; "File Opened";&#xA;&#xA;    av_init_packet(&amp;m_Pkt);&#xA;    m_Pkt.data = nullptr;&#xA;    m_Pkt.size = 0;&#xA;    m_Initialized = true;&#xA;    qDebug() &lt;&lt; "AVI WRITER IS INITIALIZED";&#xA;    return true;&#xA;}&#xA;&#xA;bool FFmpegVideoWriter::writeFrame(unsigned char* imageData) {&#xA;    qDebug() &lt;&lt; "Making frame writable "  &lt;&lt;   av_frame_make_writable(frame);&#xA;    // Input image is in RGBA format&#xA;    cv::Mat rgbaFrame(m_CodecContext->height, m_CodecContext->width, CV_8UC4, imageData);&#xA;    cv::Mat yuvFrame;&#xA;    cv::cvtColor(rgbaFrame, yuvFrame, cv::COLOR_RGBA2YUV_I420);&#xA;&#xA;    // Fill the frame data&#xA;/*  for (int i = 0; i &lt; m_CodecContext->height; &#x2B;&#x2B;i) {&#xA;        std::memcpy(frame->data[0] &#x2B; i * frame->linesize[0], yuvFrame.data &#x2B; i * yuvFrame.step, m_CodecContext->width);&#xA;    }*/&#xA;&#xA;    // Fill the frame data with red color&#xA;    for (int i = 0; i &lt; m_CodecContext->height; &#x2B;&#x2B;i) {&#xA;        // Assuming YUV format, set U and V components to 128 (midpoint for red color)&#xA;        std::memset(frame->data[0] &#x2B; i * frame->linesize[0], 255, m_CodecContext->width); // Y (luma)&#xA;        std::memset(frame->data[1] &#x2B; i / 2 * frame->linesize[1], 128, m_CodecContext->width / 2); // U (chroma)&#xA;        std::memset(frame->data[2] &#x2B; i / 2 * frame->linesize[2], 128, m_CodecContext->width / 2); // V (chroma)&#xA;    }&#xA;&#xA;    frame->pts&#x2B;&#x2B;;&#xA;&#xA;    if (avcodec_send_frame(m_CodecContext, frame) &lt; 0) {&#xA;        char errbuf[AV_ERROR_MAX_STRING_SIZE];  // Buffer to store error message&#xA;        av_strerror(errno, errbuf, AV_ERROR_MAX_STRING_SIZE);&#xA;&#xA;        qDebug() &lt;&lt; "Error: Could not send video frame for encoding - " &lt;&lt; QString::fromUtf8(errbuf);&#xA;        qDebug() &lt;&lt; "Could not send video frame for encoding";&#xA;        return false;&#xA;    }&#xA;&#xA;    while (avcodec_receive_packet(m_CodecContext, &amp;m_Pkt) == 0) {&#xA;        fwrite(m_Pkt.data, 1, m_Pkt.size, file);&#xA;        av_packet_unref(&amp;m_Pkt);&#xA;    }&#xA;&#xA;    return true;&#xA;}&#xA;&#xA;void FFmpegVideoWriter::dispose() {&#xA;    if (m_Initialized) {&#xA;        avcodec_free_context(&amp;m_CodecContext);&#xA;        av_frame_free(&amp;frame);&#xA;        fclose(file);&#xA;        m_Initialized = false;&#xA;    }&#xA;}&#xA;&#xA;bool FFmpegVideoWriter::IsInited() const&#xA;{&#xA;    return m_Initialized;&#xA;}&#xA;

    &#xA;