Recherche avancée

Médias (0)

Mot : - Tags -/formulaire

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

Autres articles (105)

  • 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

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (6367)

  • ffmpeg : avcodec_open2 returns invalid argument

    26 octobre 2020, par roari

    I'm reusing the sample code from the developer 64-bit release of FFmpeg in my application to encode a video :

    


    AVCodec* pCodec_{nullptr};
AVCodecContext* pContext_{nullptr};

avcodec_register_all();
pCodec_ = avcodec_find_encoder(AV_CODEC_ID_MPEG2VIDEO);
if (!pCodec_) {}

pContext_ = avcodec_alloc_context3(pCodec_);
if (!pContext_) {}

pContext_->bit_rate = 400000;
pContext_->width = size.width();
pContext_->height = size.height();

pContext_->time_base.den = 1;
pContext_->time_base.num = fps;

pContext_->gop_size = 10;
pContext_->max_b_frames = 1;
pContext_->pix_fmt = AV_PIX_FMT_BGR0;

if (codec_id == AV_CODEC_ID_H264) {
    av_opt_set(pContext_->priv_data, "preset", "slow", 0);
}

int err = avcodec_open2(pContext_, pCodec_, nullptr);
if (err < 0) {}


    


    AVCodec* and AVCodecContext* look like they are allocated correctly. avcodec_open2 then returns invalid argument (-22).

    


    I use : Windows 10 64, VS2013 Compiler, Qt Creator IDE, ffmpeg(2016-05-12) 64bit.

    


    The sample I took the code from is decoding_encoding.c.

    


    Any ideas ?

    


  • VideoJS seekable().end(0) always returns 0

    18 septembre 2022, par Clovis Nyu

    I am trying to jump to a particular timestamp of a video, but using player.currentTime(someTime) always sends the video back to the start. Upon doing some research, I found that running player.seekable().end(0) always returns 0. I realize that this might be a problem with the fact that I'm using MP4, but I've tried using

    


    ffmpeg -i input.mp4 -c copy -movflags +faststart output.mp4


    


    to fix it and it doesn't work. Below is my code

    


    &#xA;&#xA;    &#xA;&#xA;&#xA;    <source src="http://localhost:8000/some_video.mp4" type="video/mp4"></source>&#xA;    <p class="vjs-no-js">&#xA;        To view this video please enable JavaScript, and consider upgrading to a&#xA;        web browser that&#xA;        <a href="https://videojs.com/html5-video-support/" target="_blank">supports HTML5 video&#xA;    </a></p>&#xA;&#xA;&#xA;<button>Jump</button>&#xA;&#xA;<code class="echappe-js">&lt;script src=&quot;https://vjs.zencdn.net/7.7.5/video.js&quot;&gt;&lt;/script&gt;&#xA;&lt;script&gt;&amp;#xA;    var VIDEO_JS = videojs(&amp;#x27;my-video&amp;#x27;);&amp;#xA;&amp;#xA;    function jump() {&amp;#xA;        VIDEO_JS.currentTime(10);&amp;#xA;    }&amp;#xA;&lt;/script&gt;&#xA;&#xA;

    &#xA;

    For more context, the videos are taken from youtube, the audio is then split into vocals and accompaniment using spleeter, then ffmpeg is used to merge back the resulting audio files into the original video.

    &#xA;

    Any help would be appreciated. Thanks !

    &#xA;

  • libav/ffmpeg : avcodec_decode_video2() returns -1 when separating demultiplexing and decoding

    26 avril 2013, par unbekannt

    I'm using libav (from a C++ program on Linux and Windows) to decode video streams from a file, which works fine (decoding various formats like H264 and MPEG2) using avformat_open_input(), av_read_frame() and avcodec_decode_video2().

    Now I have to separate demultiplexing and decoding. One class will call avformat_open_input() and av_read_frame() and then pass the AVPackets into a queue that is read by another class. There I use avcodec_alloc_context3() to get the AVCodecContext needed for avcodec_decode_video2(). I've tested that with a MPEG2 video stream and it works.

    Problems arise if I try to decode a H264 stream : avcodec_decode_video2() always returns -1 and outputs "no frame". I understand that additional data (SPS/PPS) is needed to decode this stream, so I've tried to replicate the original AVCodecContext from the demultiplexer in the decoder, but it won't work :

    • Copying the content of the extradata field and setting all other values that differ from the default ones in the decoder : -1 is returned
    • Using the same context (i.e. passing along the pointer) results in a crash

    I also tried to set CODEC_FLAG2_CHUNKS. avcodec_decode_video2() then always returns packet.size - 3 (??) and frameFinished is never set to 1.

    In my opinion I have a general problem here that will arise whenever settings from the original CodecContext are needed to decode the AVPackets. I'd be grateful for any hints on how to solve that problem !

    EDIT : Sometimes writing down your problem helps solving it... Using a copy of the context struct (avcodec_copy_context) and opening the codec only after receiving the copy results in decoded frames. Does anyone know if that is safe or the best way to do it ?