Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Autres articles (84)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (11836)

  • Adding watermark to video

    27 avril 2018, par equallyhero

    I am able to use the moviepy library to add a watermark to a section of video. However when I do this it is taking the watermarked segment, and creating a new file with it. I am trying to figure out if it is possible to simply splice in the edited part back into the original video, as moviepy is EXTREMELY slow writing to the disk, so the smaller the segment the better.

    I was thinking maybe using shutil ?

    video = mp.VideoFileClip("C:\\Users\\admin\\Desktop\\Test\\demovideo.mp4").subclip(10,20)

    logo = (mp.ImageClip("C:\\Users\\admin\\Desktop\\Watermark\\watermarkpic.png")
             .set_duration(20)
             .resize(height=20) # if you need to resize...
             .margin(right=8, bottom=8, opacity=0) # (optional) logo-border padding
             .set_pos(("right","bottom")))

    final = mp.CompositeVideoClip([video, logo])
    final.write_videofile("C:\\Users\\admin\\Desktop\\output\\demovideo(watermarked).mp4", audio = True, progress_bar = False)

    Is there a way to copy the 10 second watermarked snippet back into the original video file ? Or is there another library that allows me to do this ?

  • ffmpeg RTSP error while decoding MB

    2 mai 2018, par Hugh W

    I’m using ffmpeg to read an h264 RTSP stream from a Cisco 3050 IP camera and reencode it to disk as h264 (there are reasons why I’m not just using -codec:copy).

    The ffmpeg version is as follows :

    ffmpeg version 3.2.6 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 6.3.0 (Alpine 6.3.0)

    I’ve also tried with ffmpeg 2.8.14-0ubuntu0.16.04.1 and the latest ffmpeg built from source (I used this commit) and see the same behaviour as below.

    The command I’m running is :

    ffmpeg -rtsp_transport udp -i 'rtsp://<user>:<pw>@<ip>:554/StreamingSetting?version=1.0&amp;action=getRTSPStream&amp;ChannelID=1&amp;ChannelName=Channel1' -r 10 -c:v h264 -crf 23 -x264-params keyint=60:min-keyint=60 -an -f ssegment -segment_time 60 -strftime 1 /output/%Y%m%d_%H%M%S.ts -abort_on empty_output
    </ip></pw></user>

    I get a variety of errors at a fairly steady rate of at least one per second. Here’s a sample :

    [rtsp @ 0x7f268c5e9220] max delay reached. need to consume packet
    [rtsp @ 0x7f268c5e9220] RTP: missed 40 packets
    [h264 @ 0x55b1e115d400] left block unavailable for requested intra mode
    [h264 @ 0x55b1e115d400] error while decoding MB 0 12, bytestream 114567
    [h264 @ 0x55b1e115d400] concealing 3889 DC, 3889 AC, 3889 MV errors in I frame

    The most common one is ’error while decoding MB x x, bytestream x’. This corresponds to severe corruption in the video file when played back.

    I see many references to that error message on stackoverflow and elsewhere, but I’ve yet to find a satisfying explanation or workaround. It comes from this line which appears to correspond to missing data at the end of the stream. ’left block unavailable’ comes from here and also looks like missing data.

    Others have suggested using -rtsp_transport tcp instead (1, 2, 3) which in my case just gives a slightly different mix of errors, and still video corruption :

    [h264 @ 0x557923191b00] left block unavailable for requested intra4x4 mode -1
    [h264 @ 0x557923191b00] error while decoding MB 0 28, bytestream 31068
    [h264 @ 0x557923191b00] concealing 2609 DC, 2609 AC, 2609 MV errors in I frame
    [rtsp @ 0x7f88e817b220] CSeq 5 expected, 0 received.

    Using Wireshark I confirmed that in both UDP and TCP mode, all of the packets are making it from the camera to the PC (sequential RTP sequence numbers without any missing) which makes me think the data is being lost after it arrives at ffmpeg.

    I also see similar behaviour when running the same command against a Panasonic WV-SFV110 camera, but with less frequent errors overall. Switching from UDP to TCP on the Panasonic camera reduces but does not completely eliminate the errors/corruption.

    I also tried a similar command with VLC and got similar errors (cvlc rtsp://<user>:<pw>@<ip>/MediaInput/h264 :sout='#transcode{vcodec=h264}:std{access=file, mux=ts, dst="output.ts"}</ip></pw></user>) — presumably the code hasn’t diverged much since libav forked from ffmpeg.

    The camera is plugged directly into a PoE port on the PC so network congestion can’t be a problem. Given that the PC has enough CPU to keep up encoding the live stream, it seems to me a problem with ffmpeg that it still drops data from the TCP stream.

    Qualitatively, there are several factors which seem to make the problem worse :

    • Higher video resolution
    • Higher system load on the machine running ffmpeg (e.g. transcoding to a low res .avi file produces fewer errors than transcoding to h264 VBR ; using -codec:copy eliminates all errors except a couple while ffmpeg is starting up)
    • Greater motion within the camera view

    What the does the error mean ? And what can I do about it ?

  • Output multiple SDP files using FFMPEG

    2 mai 2018, par mikeyb976

    Is it possible when using FFMpeg, to output multiple SDP files for transcoded streams within a single FFMpeg session ?

    Below is my ffmpeg command and my attempt to transcode using one input stream, and output 2 rtp streams. First output stream (camera1) is transcoded at lower resolution at 540x360 and the second stream (camera2) is outputting at native resolution.

    .\ffmpeg -protocol_whitelist file,udp,rtp,tcp -i "rtsp ://admin:admin@172.16.250.99/media/video1"

    -c:v libx264 -vf scale=540:360 -r 5 -maxrate 500000 -bufsize 300000 -minrate 500000 -b:v 500000 -muxdelay 0.1 -threads 4 -sc_threshold 0 -f rtp rtp ://172.16.250.156:4321/camera1 -sdp_file "c :\test\camera1.sdp"

    -c:v libx264 -r 5 -maxrate 500000 -bufsize 300000 -minrate 500000 -b:v 500000 -muxdelay 0.1 -threads 4 -sc_threshold 0 -f rtp rtp ://172.16.250.156:4322/camera2 -sdp_file "c :\test\camera2.sdp"

    I was expecting this to output 2 SDP files, but instead I only get camera2.sdp being stored on disk.

    Also the camera2.sdp contains video streams for both camera1 and camera2 (see below)

    Is there anyway I can get this command to output the 2 sdp files to disk please ?

    SDP :

    v=0

    o=- 0 0 IN IP4 127.0.0.1

    s=Sony RTSP Server

    t=0 0

    a=tool:libavformat 57.56.100

    m=video 4321 RTP/AVP 96

    c=IN IP4 172.16.250.156

    b=AS:500

    a=rtpmap:96 H264/90000

    a=fmtp:96 packetization-mode=1

    m=video 4322 RTP/AVP 96

    c=IN IP4 172.16.250.156

    b=AS:500

    a=rtpmap:96 H264/90000

    a=fmtp:96 packetization-mode=1