Recherche avancée

Médias (91)

Autres articles (1)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (2516)

  • avcodec/libvpxenc : update the ranges for "cpu_used" so it matches the "speed" alias

    6 juin 2014, par Michael Niedermayer
    avcodec/libvpxenc : update the ranges for "cpu_used" so it matches the "speed" alias
    

    Reviewed-by : James Zern <jzern@google.com>
    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavcodec/libvpxenc.c
  • python request.put causing my entire function to loop infinitely

    16 mars 2018, par M.Izzat

    I created a function to convert a video using ffmpeg on form save and then update the same entry with the new convered video path using API request.put, but for some reason this function cause the ffmpeg to convert the video over and over again, how can I terminate the process without closing my terminal. also because im using 'rb' it create a new video file with binary which I’m not needed and update that in my database, I try using 'r' and 'r+' but its not working

    Be low is my code :

    def video_conversion(video_id, raw_file):
       cmd = "ffmpeg -i {} -s 1280x720 {}".format(input, output)
       thumbnail_cmd = "ffmpeg -ss {} -i {} -vframes 1 {}".format(middle_duration, input, image_output)
       subprocess.call(cmd)
       subprocess.call(thumbnail_cmd)
       mp4_480_file = {'mp4_480': open('D:/Development/VideoConverter/media/{}.mp4'.format(filename), 'rb')}
       video_request = requests.put(
                   'http://127.0.0.1:8000/api/lemoncore/video_detail/{}/'.format(video_id),
                   data={'id': video_id},
                   files=mp4_480_file
                   )
       video_request.close()
       return output
  • Is packet duration guaranteed to be uniform for entire stream ?

    13 décembre 2013, par karl_

    I use packet duration to translate from frame index to pts and back, and I'd like to be sure that this is a reliable method of doing so.

    Alternatively, is there a better way to translate pts to a frame index and vice versa ?

    A snippet showing my usage :

    bool seekFrame(int64_t frame)
    {
       if(frame > container.frameCount)
           frame = container.frameCount;

       // Seek to a frame behind the desired frame because nextFrame() will also increment the frame index
       int64_t seek = pts_cache[frame-1];  // pts_cache is an array of all frame pts values

       // get the nearest prior keyframe
       int preceedingKeyframe = av_index_search_timestamp(container.video_st, seek, AVSEEK_FLAG_BACKWARD);

       // here&#39;s where I&#39;m worried that packetDuration isn&#39;t a reliable method of translating frame index to
       // pts value
       int64_t nearestKeyframePts = preceedingKeyframe * container.packetDuration;

       avcodec_flush_buffers(container.pCodecCtx);

       int ret = av_seek_frame(container.pFormatCtx, container.videoStreamIndex, nearestKeyframePts, AVSEEK_FLAG_ANY);

       if(ret &lt; 0) return false;

       container.lastPts = nearestKeyframePts;

       AVFrame *pFrame = NULL;

       while(nextFrame(pFrame, NULL) &amp;&amp; container.lastPts &lt; seek)
       {
           ;
       }

       container.currentFrame = frame-1;
       av_free(pFrame);
       return true;
    }