Recherche avancée

Médias (1)

Mot : - Tags -/remix

Autres articles (69)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (10154)

  • Is there any control property to fix video playback speed problem when using ffmpeg to decode in Qt platform ?

    16 février 2019, par SoloWang

    I want to play local video file in Qt platform using ffmpeg to decode.Everything is OK except that play speed is as twice as normal.
    The first thing I think about is that there must be a sampling frequency involved.But to be a new to ffmpeg,I don’t know how to fix this problem.
    Above is my code to read frame,is anyone can tell me what’s wrong with the code ?

    void VideoThread::run()
    {
       m_pInFmtCtx = avformat_alloc_context(); //ini struct
       char path[] = "d:/test.mp4";
       // open specific file
       if(avformat_open_input(&m_pInFmtCtx, *path, NULL, NULL)){
       {
           qDebug()<<"get rtsp failed";
           return;
       }
       else
       {
           qDebug()<<"get rtsp success";
       }


       if(avformat_find_stream_info(m_pInFmtCtx, NULL) < 0)
       {
           qDebug()<<"could not find stream information";
           return;
       }
       int nVideoIndex = -1;
       for(int i = 0; i < m_pInFmtCtx->nb_streams; i++)
       {
           if(m_pInFmtCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
           {
               nVideoIndex = i;
               break;
           }
       }
       if(nVideoIndex == -1)
       {
           qDebug()<<"could not find video stream";
           return;
       }

       qDebug("---------------- File Information ---------------");
       m_pCodecCtx = m_pInFmtCtx->streams[nVideoIndex]->codec;
       m_pCodec = avcodec_find_decoder(m_pCodecCtx->codec_id);
       if(!m_pCodec)
       {
           qDebug()<<"could not find codec";
           return;
       }
       //start Decoder
       if (avcodec_open2(m_pCodecCtx, m_pCodec, NULL) < 0) {
           qDebug("Could not open codec.\n");
           return;
       }


       //malloc space for stroring frame
       m_pFrame     = av_frame_alloc();
       m_pFrameRGB  = av_frame_alloc();
       m_pOutBuf = (uint8_t*)av_malloc(avpicture_get_size(AV_PIX_FMT_RGB32, m_pCodecCtx->width, m_pCodecCtx->height));
       avpicture_fill((AVPicture*)m_pFrameRGB, m_pOutBuf, AV_PIX_FMT_RGB32, m_pCodecCtx->width, m_pCodecCtx->height);

       //for color switch,from YUV to RGB
       struct SwsContext *pImgCtx = sws_getContext(m_pCodecCtx->width, m_pCodecCtx->height, m_pCodecCtx->pix_fmt,
                                                   m_pCodecCtx->width, m_pCodecCtx->height, AV_PIX_FMT_RGB32, SWS_BICUBIC, NULL, NULL, NULL);


       int nSize = m_pCodecCtx->width * m_pCodecCtx->height;
       m_pPacket = (AVPacket *)av_malloc(sizeof(AVPacket));
       if(av_new_packet(m_pPacket, nSize) != 0)
       {
           qDebug()<<"new packet failed";
       }

       //isInterruptionRequested is a flag,determine whether the thread is over
       // read each frame from specific video file
       while (!isInterruptionRequested())
       {
           int nGotPic = 0;
           if(av_read_frame(m_pInFmtCtx, m_pPacket) >= 0)
           {
               if(m_pPacket->stream_index == nVideoIndex)
               {
                   //avcodec_decode_video2()transform from packet to frame
                   if(avcodec_decode_video2(m_pCodecCtx, m_pFrame, &nGotPic, m_pPacket) < 0)
                   {
                       qDebug()<<"decode failed";
                       return;
                   }
                   if(nGotPic)
                   {   // transform to RGB color
                       sws_scale(pImgCtx, (const uint8_t* const*)m_pFrame->data,
                                 m_pFrame->linesize, 0, m_pCodecCtx->height, m_pFrameRGB->data,
                                 m_pFrameRGB->linesize);
                       // save to QImage,for later use
                       QImage *pImage = new QImage((uchar*)m_pOutBuf, m_pCodecCtx->width, m_pCodecCtx->height, QImage::Format_RGB32);
                   }

               }
           }

           av_free_packet(m_pPacket);
           msleep(5);
       }
       exec();
    }
  • unable to download youtube video portion via extracted video URL from youtube-dl and ffmpeg

    29 juillet 2020, par karma

    I've read the following link, and did :

    


    youtube-dl --rm-cache-dir


    


    But it still give me 403 forbidden.

    


    This is my process :

    


    youtube-dl -g https://www.youtube.com/watch?v=kGDgGsrA78s


    


    It gave me a result like this :

    


    https://r2---sn-uigxxi0ujipnvo-q2ne.googlevideo.com/videoplayback?expire=1596034295&ei=lzghX6SHKMOD8QPlx5SQBw&ip=223.255.228.87&id=o-AK6cYo88zJXe5Xb4y1QsXspuRnVCy-zPFpMaHcAaTQ-_&itag=137&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278&source=youtube&requiressl=yes&mh=DA&mm=31%2C29&mn=sn-uigxxi0ujipnvo-q2ne%2Csn-npoe7nlz&ms=au%2Crdu&mv=m&mvi=2&pl=24&initcwndbps=173750&vprv=1&mime=video%2Fmp4&gir=yes&clen=456970484&dur=1389.955&lmt=1521825834085900&mt=1596012582&fvip=5&keepalive=yes&fexp=23883098&c=WEB&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAMvZrHYvC1YrkvtARzhjyD8dnMnlefobGrOFM1rX6QZPAiEAqqeIsKdZ19y-SlHf-l8YwTx2yYbo1p5sFlVoC87oXEQ%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgAIwAVMPrcMhAL476uN_ZzWj8vKPGGW58KCpHBYBsKeICICRgVWgthNvgbGl8VgQwscjJ0n8ib4XBNjRxRgSg2T5r&ratebypass=yes
https://r2---sn-uigxxi0ujipnvo-q2ne.googlevideo.com/videoplayback?expire=1596034295&ei=lzghX6SHKMOD8QPlx5SQBw&ip=223.255.228.87&id=o-AK6cYo88zJXe5Xb4y1QsXspuRnVCy-zPFpMaHcAaTQ-_&itag=140&source=youtube&requiressl=yes&mh=DA&mm=31%2C29&mn=sn-uigxxi0ujipnvo-q2ne%2Csn-npoe7nlz&ms=au%2Crdu&mv=m&mvi=2&pl=24&initcwndbps=173750&vprv=1&mime=audio%2Fmp4&gir=yes&clen=22077901&dur=1390.039&lmt=1521818817521456&mt=1596012582&fvip=5&keepalive=yes&fexp=23883098&c=WEB&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIhANHMaZK4jYg7p4t2dID3d21VRv18I1nhBtXqYRSZo0C7AiAEjO8LwjhXeNQiKqdiZFQ_DsHuXT4rgvPnNQhaDGj9hg%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgAIwAVMPrcMhAL476uN_ZzWj8vKPGGW58KCpHBYBsKeICICRgVWgthNvgbGl8VgQwscjJ0n8ib4XBNjRxRgSg2T5r&ratebypass=yes


    


    The result gave me two URL, so I only copy the first line and since what I want is just to copy a few minutes video portion - so in ffmpeg :

    


    ffmpeg -ss 00:00:15.00 -i https://r2---sn-uigxxi0ujipnvo-q2ne.googlevideo.com/videoplayback?expire=1596034295&ei=lzghX6SHKMOD8QPlx5SQBw&ip=223.255.228.87&id=o-AK6cYo88zJXe5Xb4y1QsXspuRnVCy-zPFpMaHcAaTQ-_&itag=140&source=youtube&requiressl=yes&mh=DA&mm=31%2C29&mn=sn-uigxxi0ujipnvo-q2ne%2Csn-npoe7nlz&ms=au%2Crdu&mv=m&mvi=2&pl=24&initcwndbps=173750&vprv=1&mime=audio%2Fmp4&gir=yes&clen=22077901&dur=1390.039&lmt=1521818817521456&mt=1596012582&fvip=5&keepalive=yes&fexp=23883098&c=WEB&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIhANHMaZK4jYg7p4t2dID3d21VRv18I1nhBtXqYRSZo0C7AiAEjO8LwjhXeNQiKqdiZFQ_DsHuXT4rgvPnNQhaDGj9hg%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgAIwAVMPrcMhAL476uN_ZzWj8vKPGGW58KCpHBYBsKeICICRgVWgthNvgbGl8VgQwscjJ0n8ib4XBNjRxRgSg2T5r&ratebypass=yes -t 00:00:10.00 -c copy out.mp4


    


    But then the result in command prompt is like this :

    


    ffmpeg version N-93300-g96451477b9 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20190212
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 47.103 / 58. 47.103
  libavformat    58. 26.101 / 58. 26.101
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 48.100 /  7. 48.100
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
[https @ 0000020137c895c0] HTTP error 403 Forbidden
https://r2---sn-uigxxi0ujipnvo-q2ne.googlevideo.com/videoplayback?expire=1596034295: Server returned 403 Forbidden (access denied)
'ei' is not recognized as an internal or external command,
operable program or batch file.
'ip' is not recognized as an internal or external command,
operable program or batch file.
'id' is not recognized as an internal or external command,
operable program or batch file.
.... and so on....


    


    BTW, I've also tried to copy the second URL, still 403 error.
    
I also tried to copy both URL, still 403 error.

    


    On the other hand, when I tried to paste the URL into Internet Download Manager,
    
IDM directly recognized the URL and I can download the file via IDM.

    


    Is there a way to resolve this ?

    


    Any kind of respond would be greatly appreciated.
    
Thank you in advanced.

    


    EDIT :
I'm very sorry for my ignorant.
    
It turn out I need to put apostrophe at the beginning and at the end of the URL :).

    


    Dear moderator, please close this thread.
    
Thank you for you all.

    


  • How to automatically use python to create ffmpeg's list and use ffmpeg to create mp4 for every word ?

    13 juin 2020, par Kanglando

    wave + image file

    



    Here is wav and image file . and you can donwload it - https://www.dropbox.com/s/iuwt6boc2r2fotc/word_images_file.zip?dl=0

    



    1st step create word list txt file for every word.

    



    put image name to list , and the list name is every word.

    



    but I don't know how to write python code for create every word image list .

    



    example :

    



    accordion-word.txt

  file 'accordion_1_musical_instruments.jpg'
  file 'accordion_2_musical_instruments.jpg'
  file 'accordion_3_musical_instruments.jpg'
  file 'accordion_musical_instruments.jpg'


    



    2nd step create audio file list

    



    don't know how to use python write code to create list for every word audio.

    



    accordion-audio.txt

     file 'slience_2sec.mp3'
     file 'This_is_.mp3'
     file 'slience_2sec.mp3
     file 'accordion.mp3'


    



    3rd step , ffmpeg with concat image list and auido file to one video .mp4

    



    ffmpeg -y -f concat -i 'accordion-word.txt -f concat -i 'accordion-audio file' -shortest accordion.mp4


    



    4th step automatically ,batch create every_word.mp4

    



    Thank you !