Recherche avancée

Médias (0)

Mot : - Tags -/presse-papier

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

Autres articles (99)

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

  • Formulaire personnalisable

    21 juin 2013, par

    Cette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
    Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire. (...)

  • Qu’est ce qu’un masque de formulaire

    13 juin 2013, par

    Un masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
    Chaque formulaire de publication d’objet peut donc être personnalisé.
    Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
    Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)

Sur d’autres sites (7418)

  • Revision 37456 : rha ... c’est vraiment du hack là

    20 avril 2010, par kent1@… — Log

    rha ... c’est vraiment du hack là

  • ffmpeg : How does one designate what parts of an overlay video stream let the underlay video stream show through ?

    21 février 2023, par Walt Howard

    Stream 0 is a rotating planet created using povray. (https://www.povray.org/)

    


    Stream 1 is just a static jpeg of stars.

    


    I'm using overlay like this :

    


    nice ffmpeg -i protoplanet.mp4 -i stars.jpg \
         -filter_complex "[0:v]scale=1024:768[scaled];[1:v][scaled]overlay=0:0" \
         -movflags faststart -pix_fmt yuv420p -r 10 planet.mp4


    


    I had it working when I used the output from povray directly. I didn't have to know why that worked, because it just did. However, after adding some post processing to the planet video, the entire video has no alpha channel (educated guess) so the background stream (Stream 1) cannot show through.

    


    The post processing I did was this (which works great) : https://www.reddit.com/r/ffmpeg/comments/im2mkp/creating_a_retro_glow_effect_with_ffmpeg/

    


    But that made the video unable to have an overlay background possibly due to it destroying the alpha channel and turning many of the blacks to dark grey.

    


    I can merge the pure POVRAY output and the background and then add the glow effect, but it adds the effect to the background stars and captions also which ruins the effect to some degree. I want to glo-ify the planet first, then stick it on a pure starfield background.

    


    In thinking this over I may have to recreate the alpha channel after adding the glow effect, using a nearest match to black and dark grey to alpha.

    


    Hmmm. It might be a codec issue as I didn't specify any -c:v in any of my commands....

    


  • How can I pipe JPEG files into FFMPEG and create an RTSP, H.264 stream ?

    25 janvier 2023, par Michael Schmidt

    I have an input RTSP stream that I would like to manipulate on a frame-by-frame basis using openCV. After these changes are applied, I'd like to create a separate RTSP stream from those frames. I'm piping the resulting JPEG images to FFMPEG via STDIN. I need the intermediate frame to be a JPEG.

    


    In other words, I must conform to this pattern :
RTSP IN -> Create JPEG as input -> manipulation, JPEG out -> RTSP

    


    The PROBLEM I'm trying to solve deals with a codec at this point. See the last few lines of FFMPEG's output error message.

    


    Here is what I have :

    


    def open_ffmpeg_stream_process():
    args = (
        "ffmpeg -re -stream_loop -1 "
        "-f jpeg_pipe "
        "-s 512x288 "
        "-i pipe:0 "
        "-c:v h264 "
        "-f rtsp "
        "rtsp://localhost:8100/out0"
    ).split()
    return subprocess.Popen(args, stdin=subprocess.PIPE)

video_source = cv2.VideoCapture('rtsp://localhost:9100/in0')

frame_cnt = 0
FRAME_SKIP = 30

ffmpeg_process = open_ffmpeg_stream_process()
while video_source.isOpened():

    frame_cnt += 1
    if frame_cnt % FRAME_SKIP:
      continue
    else:
      frame_cnt = 0

    _, frame = video_source.read()
    _, jpg = cv2.imencode('.jpg', frame)

    # Work on the JPEG occurs here, and the output will be a JPEG

    ffmpeg_process.stdin.write(jpg.astype(np.uint8).tobytes())

    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

video_source.release()


    


    Here is FFMPEG's output :

    


    ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
  configuration: ---- noisy configuration stuff ----
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, jpeg_pipe, from 'pipe:0':
  Duration: N/A, bitrate: N/A
  Stream #0:0: Video: mjpeg, rgb24(bt470bg/unknown/unknown), 512x288, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
[libx264 @ 0x562a1ffc5840] using SAR=1/1
[libx264 @ 0x562a1ffc5840] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x562a1ffc5840] profile High, level 3.1, 4:2:0, 8-bit
[libx264 @ 0x562a1ffc5840] 264 - core 163 r3060 5db6aa6 - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[tcp @ 0x562a20826c00] Connection to tcp://localhost:8100?timeout=0 failed: Connection refused
Could not write header for output file #0 (incorrect codec parameters ?): Connection refused
Error initializing output stream 0:0 -- 
Conversion failed!


    


    How does one create an H.264, RTSP stream from a series of JPEG frames using FFMPEG.

    


    Notes : The FFMPEG command/subproccess might need unrelated improvements, feel free to comment on my crappy code.

    


    Edit : Oof, I just found out the FFMPEG command doesn't even work stand alone.