Recherche avancée

Médias (0)

Mot : - Tags -/tags

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

Autres articles (82)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

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

  • FFMpeg How to use multithreading ?

    7 avril 2017, par Wu NL

    I want to decode H264 by ffmpeg, BUT finally I found the decode function only used one cpu core

    system monitor

    env : Ubuntu 14.04 FFMpeg 3.2.4 CPU i7-7500U


    So, I search ffmpeg multithreading and decide using all cpu cores for decoding.
    I set AVCodecContext as this :
    //Init works
    //codecId=AV_CODEC_ID_H264;
    avcodec_register_all();
    pCodec = avcodec_find_decoder(codecId);
    if (!pCodec)
    {
       printf("Codec not found\n");
       return -1;
    }
    pCodecCtx = avcodec_alloc_context3(pCodec);
    if (!pCodecCtx)
    {
       printf("Could not allocate video codec context\n");
       return -1;
    }

    pCodecParserCtx=av_parser_init(codecId);
    if (!pCodecParserCtx)
    {
       printf("Could not allocate video parser context\n");
       return -1;
    }
    pCodecCtx->thread_count = 4;
    pCodecCtx->thread_type = FF_THREAD_FRAME;

    pCodec->capabilities &= CODEC_CAP_TRUNCATED;
    pCodecCtx->flags |= CODEC_FLAG_TRUNCATED;

    if (avcodec_open2(pCodecCtx, pCodec, NULL) < 0)
    {
       printf("Could not open codec\n");
       return -1;
    }
    av_log_set_level(AV_LOG_QUIET);
    av_init_packet(&packet);

    //parse and decode
    //after av_parser_parse2, the packet has a complete frame data
    //in decode function, I just call avcodec_decode_video2 and do some frame copy work
    while (cur_size>0)
    {
       int len = av_parser_parse2(
                     pCodecParserCtx, pCodecCtx,
                     &packet.data, &packet.size,
                     cur_ptr, cur_size,
                     AV_NOPTS_VALUE, AV_NOPTS_VALUE, AV_NOPTS_VALUE);

       cur_ptr += len;
       cur_size -= len;
       if(GetPacketSize()==0)
           continue;

       AVFrame *pFrame = av_frame_alloc();
       int ret = Decode(pFrame);
       if (ret < 0)
       {
           continue;
       }
       if (ret)
       {
         //some works
       }
    }

    But nothing different with before.
    How can I use multithreading in FFMpeg ? Any advise ?

  • Inotifywait giving wrong file path after running ffmpeg

    23 mars 2019, par Morpheus

    So im running a little inotifywait script to monitor a folder for new files and transcode them if they are mxf and contain a video stream. But for some weird reason if the script does call ffmpeg the next fileevent by inotify is giving me a wrong path seemingly random cutting the filepath at any position.

    So far i tried moving the call to an external script, resetting the file variable which shouldnt matter anyway and adding a sleep to the script. I also tried using normal filepaths without whitespaces or - which shouldnt matter but that also didnt help.

    inotifywait -m -r -e close_write -e moved_to --format "%w%f"  "$dir" | while read f

    do
               if ffprobe "$file" 2>&1 | egrep 'Stream #0:0: Video' && ffprobe "$file" 2>&1 | egrep 'MXF' ; then
                   mkdir -vp "$movepath" && mkdir -vp "$trans$path3"  && mkdir -vp "$trans2$path3" && mv -fu "$f" "$trans2$path" && \
                   ffmpeg -y -i "$file" -map_metadata 0 -c:v h264_nvenc -b:v 2m -bufsize 2m -profile:v baseline -level:v 3.0 -pix_fmt yuv420p -vf yadif,scale="iw/4:ih/4" -an "$transpath" 2>> copy_ffmpeg_log.txt
    done

    expected :

    /media/raid/TMO_Media/INGEST-HP.1/WacinS1_19V01.5C935C93A3B4V.mxf

    example for an result after transcode :

    cinS1_19A06.5C935C93A088A.mxf

    do while normal mv commands work and inotify does work as expected when stopped for transcoding a file the next path given by inotify is getting messed up

    link to the entire script : https://pastebin.com/aRNG4rqz

  • FFMPEG mp4 videos not suddenly stops playing on Browsers

    14 janvier 2020, par Harley Lapuz

    I have been struggling with this issue in regards to playing my converted mp4 videos using FFMPEG into an html 5 video player, I basically just use a single video player and just replace the source when the video ends.

    What happens is that a MediaError occurs randomly with different videos saying :

    PIPELINE_ERROR_DECODE: Failed to send audio packet for decoding

    or

    PIPELINE_ERROR_DECODE: audio decode error

    Videos have no issues on Safari, Internet Explorer, and Firefox. But this error shows up randomly on Opera and Google Chrome.

    I am using Laravel [Laravel FFMpeg][1] to convert the videos, please see my conversion code below :

    $bitrateFormat = (new FFMpeg\Format\Video\X264('aac', 'libx264'))->setKiloBitrate(1500);

    $converted_video = FFMpeg::fromDisk('videos')
       ->open($this->video_id)
       ->addFilter(['-pix_fmt', 'yuv420p'], ['-movflags', '+faststart'])
       ->export()
       ->inFormat($bitrateFormat)
       ->toDisk('do_spaces_video')
       ->save($this->video_id);

    Any help would be appreciated guys, thanks in advance !

    EDIT - Added Media Internals Error

    00:04:02.892    for_suspended_start false
    00:04:02.892    pipeline_buffering_state    BUFFERING_HAVE_ENOUGH
    00:04:33.919    error   Failed to send audio packet for decoding: timestamp=272341333 duration=21333 size=346 side_data_size=0 is_key_frame=1 encrypted=0 discard_padding (us)=(0, 0)
    00:04:33.919    error   audio decode error
    00:04:33.943    error   audio error during playing, status: PIPELINE_ERROR_DECODE
    00:04:33.943    pipeline_error  PIPELINE_ERROR_DECODE
    00:04:33.944    pipeline_state  kStopping
    00:04:33.945    pipeline_state  kStopped
    00:04:33.950    event   PAUSE