Recherche avancée

Médias (0)

Mot : - Tags -/flash

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

Autres articles (110)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (28026)

  • How can I play a transport stream file in Angular ?

    26 juin 2023, par Ricardo

    In my angular app, I have a use case where the user must select a transport stream (.ts) file via a file input. The file must then be played in the html video element available for the user to see.

    


    The problem I believe I'm facing is that html5 does not support .ts files as a src for the video element and I am not sure how else I can manage to play the video.

    


    I do have some limitations for the solution :

    


      

    1. If we have to convert the file, the process must be fast so that the user is not stuck waiting for too long. This likely means that we cannot upload the file to the backend for processing as upload times for 30 minutes+ .ts video files will probably take long to upload and then download the mp4.
    2. 


    3. I have thought of using ffmpeg, but I am not sure that it is feasible. FFmpeg also uses a gpl license which can be a limitation too.
    4. 


    


    As a side note, I am fine with a solution in which we only retrieve a few frames, as the end goal is for the user to select a frame from the video. However, I am okay with the frame being predetermined.

    


  • Duplicated PTS value when using rtsp transport UDP (H264 FU-A)

    25 janvier, par Christoph

    I’m implementing a packet loss counter based on the PTS from the av_packet, and it works fine when using RTSP/TCP as the transport mode. However, when I switched to RTSP/UDP, two packets consistently share the same PTS. This puzzled me because I assumed that av_read_frame would parse the stream and provide "valid" packets.

    


    In both cases, the stream is FU-A H.264, and I expected FFmpeg to handle reassembly in both transport modes identically. My understanding was that if UDP packets were splitted, FFmpeg would reassemble them into a single av_packet, similar to how it handles reassembly for TCP packets split due to MTU and FU-A.

    


    I could adapt my packet loss calculation by simply ignoring packets with the same PTS as the previous one, but I want to understand what’s happening here.

    


    TCP

    


    packet pts: -9223372036854775808, dts: -9223372036854775808, size: 52672, key-frame: true, discard: false, corrupt: false
packet pts: 3598, dts: 3598, size: 6034, key-frame: false, discard: false, corrupt: false
packet pts: 7196, dts: 7196, size: 5730, key-frame: false, discard: false, corrupt: false
packet pts: 10794, dts: 10794, size: 6153, key-frame: false, discard: false, corrupt: false
packet pts: 14392, dts: 14392, size: 2269, key-frame: false, discard: false, corrupt: false
packet pts: 17989, dts: 17989, size: 2656, key-frame: false, discard: false, corrupt: false
packet pts: 21587, dts: 21587, size: 2659, key-frame: false, discard: false, corrupt: false


    


    UDP

    


    packet pts: -9223372036854775808, dts: -9223372036854775808, size: 1391, key-frame: true, discard: false, corrupt: false
packet pts: 0, dts: 0, size: 109265, key-frame: true, discard: false, corrupt: false
packet pts: 3598, dts: 3598, size: 878, key-frame: false, discard: false, corrupt: false
packet pts: -> 3598, dts: 3598, size: 7728, key-frame: false, discard: false, corrupt: false
packet pts: 7195, dts: 7195, size: 887, key-frame: false, discard: false, corrupt: false
packet pts: -> 7195, dts: 7195, size: 7149, key-frame: false, discard: false, corrupt: false
packet pts: 10793, dts: 10793, size: 795, key-frame: false, discard: false, corrupt: false
packet pts: -> 10793, dts: 10793, size: 7777, key-frame: false, discard: false, corrupt: false
packet pts: 14391, dts: 14391, size: 119, key-frame: false, discard: false, corrupt: false
packet pts: -> 14391, dts: 14391, size: 2075, key-frame: false, discard: false, corrupt: false


    


    For reference here my code

    


    // PackageLossDetection detects possible packet loss based on PTS (Presentation Time Stamp) values.
// It compares the PTS of the packet with the expected PTS, calculated using the stream's time base and average frame rate.
// If the deviation between the expected and actual PTS exceeds a defined tolerance.
//
// Parameters:
//   - pkt: incoming packet whose PTS is to be checked.
//   - stream: the stream containing time base and average frame rate information.
func (s *AvSource) PackageLossDetection(pkt *astiav.Packet, stream *astiav.Stream) {

    // When using UDP as RTSP Transport packages in tuple has same PTS
    // TODO: Maybe we should invest more time to find a better solution
    if s.lastPts == pkt.Pts() {
        return
    }

    if pkt.Pts() > 0 {

        const tolerance = 4 // Allowable deviation in PTS steps
        if stream.AvgFrameRate().Num() == 0 {
            s.log.Warn().Str("stream", s.stream.Name).Msg("PackageLossDetection, no frame rate information available")
            return
        }

        var ptsBetween = stream.TimeBase().Den() * stream.TimeBase().Num() / stream.AvgFrameRate().Num()
        if math.Abs(float64(pkt.Pts()-(s.lastPts+int64(ptsBetween)))) > tolerance {
            s.log.Warn().Str("stream", s.stream.Name).Msgf("PackageLossDetection, PTS steps: %d, expected: %d, got: %d", int(ptsBetween), s.lastPts+int64(ptsBetween), pkt.Pts())
            utils.SafeIncrementInt64(&s.metrics.LossCount)
        }

        s.lastPts = pkt.Pts()
    }
}


    


  • ffmpeg rtsp to rtmp conversion gives error -> nonmatching transport in server reply

    7 décembre 2017, par wfine

    I’m trying to convert rtsp to rtmp using ffmpeg tool ?
    ffmpeg -f lavfi -i anullsrc -rtsp_transport tcp -i rtsp ://192.168.1.23:554/onvif1 -tune zerolatency -vcodec libx264 -pix_fmt + -c:v copy -c:a aac -strict experimental -f flv rtmp ://a.rtmp.youtube.com/live2/

    but it gives error like :

    Nonmatching transport in server reply.
    invalid data found when processing request.

    what is the right command to convert rtsp to rtmp using ffmpeg ?