Recherche avancée

Médias (1)

Mot : - Tags -/ogv

Autres articles (112)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (15305)

  • How to write a video stream containing B-frame and no DTS to a MP4 container ?

    14 février 2020, par SteveH

    I want to save a h264 video stream received from a RTSP source to a MP4 container.
    Not like other questions asked on SO, here the challenges I face are :

    • The stream contains B frames.

    • The stream has only PTS given by the RTP/RTCP.

    Here is the code I did

    //  ffmpeg
       pkt->data = ..;
       pkt->size = ..;
       pkt->flags = bKeyFrame? AV_PKT_FLAG_KEY : 0;    
       pkt->dts = AV_NOPTS_VALUE;
       pkt->pts = PTS;

       // PTS is based on epoch microseconds so I ignored re-scaling.
       //av_packet_rescale_ts(pkt, { 1, AV_TIME_BASE }, muxTimebase);

       auto ret = av_interleaved_write_frame(m_pAVFormatCtx, pkt);

    I received a lot of error messages like this :
    "Application provided invalid, non monotonically increasing dts to muxer ...".

    Result : the mp4 file is playable via VLC but the FPS is just a half of the original FPS and the video duration is incorrect (VLC shows a weird number).

    So how do I set correct DTS and PTS before sending to the container ?

    Update :
    I have tried some changes, though not successfully yet, I found that the reason of the frame rate drop is due to the muxer discards frames having incorrect DTS.
    Additionally, if I set start of PTS and DTS value too big, some players like VLC has to delay some time before showing video.

  • OpenCV VideoCapture closes with videos from GoPro

    10 février 2021, par Michael

    I have a videofile from a GoPro device and I simply work with it from a VideoCapture like this :

    



    cap = cv2.VideoCapture(path)
        index = 0
        start = time.time()

        while cap.isOpened():
            ret, frame = cap.read()
            if not ret:
                break
            # do something here
        end = time.time()


    



    It is very weird, but I can operate with any files except ones, captured at the GoPro. Stream just closes at some point because ret value becomes False and frame becomes None. No exceptions or anything else.

    



    Googling helped me to find this question. I have deleted audio streams from file with ffmpeg tool and then everything works just fine. So why it is like so ? Pleas help !

    



    I am using Python 3.6.4 x64, Windows 10 (however at Linux same) and precompiled binaries for OpenCV from this resource.

    


  • FFMPEG YUV444 to YUV420 [duplicate]

    9 août 2020, par Juan Felipe

    Soo I need to use a video reader which onl accepts yuv420.
I have videos which are yuv444 and have very weird resolutions (they come from an algorith and they are videos manually created stacking frames)

    


    Soo I tried the following

    


    ffmpeg -i CJMOPvsinJE.mp4 -pix_fmt yuv420p yuv420.mp4


    


    But it seems that resolution have to be even.

    


    [libx264 @ 0x556e02626660] width not divisible by 2 (241x1080)
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height


    


    Sooo I solved it by cropping.

    


    ffmpeg -i CJMOPvsinJE.mp4 -filter:v "crop=240:1080:1:0" -pix_fmt yuv420p yuv420.mp4


    


    Buuut The fact is that I need to perform this operation for a bunch of videos.

    


    Is there a way to tell ffmpeg to crop to the nearest even resolution ? Namely, if resolution is odd just to remove 1 row/column.