Recherche avancée

Médias (91)

Autres articles (82)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

Sur d’autres sites (6806)

  • FFMPEG - local video to UDP streaming to OpenCV - video quality degraded

    6 juin 2021, par user3925023

    my goal is to re-stream local video content / desktop screencasting, to an UDP flow that I need to process on a Python script.

    



    Here is the FFMPEG script that I'm using :

    



    ffmpeg -re -i C:\Users\test\Downloads\out.ts -strict -2 -c:v copy -an -preset slower -tune stillimage -b 11200k -f rawvideo udp://127.0.0.1:5000


    



    And here is the simple Python script supposed to read the stream flow :

    



    import cv2

cap = cv2.VideoCapture('udp://127.0.0.1:5000',cv2.CAP_FFMPEG)
if not cap.isOpened():
    print('VideoCapture not opened')
    exit(-1)
width = cap.get(cv2.CAP_PROP_FRAME_WIDTH)  # float
height = cap.get(cv2.CAP_PROP_FRAME_HEIGHT)  # float
print(str(width))
print(str(height))
while True:
    ret, frame = cap.read()
    imgray = frame[int(round((height/100)*70,0)):int(round((width/100)*42,0)), int(round((height/100)*74,0)):int(round((width/100)*54,0))]
    if not ret:
        print('frame empty')
        break
    cv2.imshow('image', imgray)
    if cv2.waitKey(1)&0XFF == ord('q'):
        break
cap.release()


    



    I'm able to visualize portion of the stream video as expect, but I'm facing lot of issue in video quality degradation, specially video artifact probably due missing packet processing :

    



    enter image description here

    



    Also these are error log I'm geting from script :

    



    [h264 @ 0000026eb272f280] error while decoding MB 105 66, bytestream -21
[h264 @ 0000026eb2fcb740] error while decoding MB 100 53, bytestream -11
[h264 @ 0000026eb272f280] error while decoding MB 32 22, bytestream -11
[h264 @ 0000026ead9ee300] error while decoding MB 60 20, bytestream -25
[h264 @ 0000026eb27f00c0] error while decoding MB 9 62, bytestream -5
[h264 @ 0000026ead9ee780] error while decoding MB 85 44, bytestream -5
[h264 @ 0000026eb27f0800] error while decoding MB 64 25, bytestream -15
[h264 @ 0000026eb272f280] error while decoding MB 112 23, bytestream -17
[h264 @ 0000026eb2735200] error while decoding MB 30 21, bytestream -7


    



    Actually I don't care about video fluidity,I can also reduce the FPS, important thing is the video quality. Not sure if I'm doing wrong on the scripting python part or if I'm using wrong FFMPEG command.

    



    Many Thanks

    


  • Combining 2 FFMPEG Commands

    11 juillet 2020, par John Doe

    I'm trying to combine 2 ffmpeg commands, one which creates the video, and another which adds a simple fade to the beginning of the created video. Here's what I have :

    


    ffmpeg -y -stream_loop -1 -i "video.mp4" -stream_loop -1 -i "music.mp3" -i "audio.mp3" -filter_complex "[1:a]volume=0.1[a1];[2:a]adelay=5000|5000,apad=pad_dur=10[a2];[a1][a2]amerge=inputs=2,afade=in:st=0:d=5[audio]" -map "0:v" -map "[audio]" -c:v libx264 -c:a aac -ac 2 -ar 22050 -preset veryfast -shortest "output.mp4"

ffmpeg -y -i "output.mp4" -filter_complex "[0:v]fade=in:0:d=5" -c:a copy -preset veryfast -movflags faststart -fflags genpts "done.mp4"


    


    The two commands work perfectly fine, however the second one takes about the same amount of time to process as the first, and I feel it should be relatively easy to do the fade-in during the first encode. For my skillset atleast, I was wrong. Please could someone with more experience lend a helping hand ?

    


    Thanks.

    


  • How to use FFmpeg & "tee" to UDP video (only) stream to another computer while recording to computer with USB camera

    13 juillet 2020, par pomptondrive

    I'm trying to get "tee muxer" to work with FFmpeg, but I'm not having much luck. Basically I would like to stream a USB camera with UDP to another computer with an decent/acceptable result to monitor, while recording around 15 FPS in an economical (compressed) fashion that won't take up too much disk space. Honestly, I don't understand the entire syntax of using "tee"—I guess that's obvious. I have looked at some of the FFmpeg documentation, but it doesn't seem comprehensive enough in this instance.

    


    So, currently, I have experimented a little and this works for streaming (picking up with VLC on the other computer) :

    


    ffmpeg -f v4l2 -i /dev/video0 -profile:v high -pix_fmt yuvj420p -level:v 4.1 -preset ultrafast -tune zerolatency -vcodec libx264 -r 15 -b:v 512k -s 640x480 -f mpegts -flush_packets 0 udp://192.168.0.19:5000?pkt_size=1316


    


    I've also checked and this records OK (I do NOT actually want it to ffplay on this machine ; this was just some code I found to test.) :

    


    ffmpeg -f v4l2 -i /dev/video0 -map 0 -c:v libx264 -f tee "Documents/video01.mkv|[f=nut]pipe:" | ffplay pipe:


    


    So the next objective is to combine the two with tee, and do a UDP stream to the other computer, while recording an mkv file to the computer with the camera. I've tried several ways to do this with no success ; results have been just one or the other, because my syntax is crap, or I'm just particularly inept at this particular task. ;-)

    


    After that (icing on the cake) would be to create separate *.mkv files at 15-minute intervals, and have them self-destruct after a couple of days.

    


    Any help with the tee business would be greatly appreciated.