Recherche avancée

Médias (91)

Autres articles (42)

  • 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 : (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (6351)

  • Do not leave positive values undefined when negative are defined as error

    15 septembre 2013, par Michael Niedermayer
    Do not leave positive values undefined when negative are defined as error
    

    Define positive return values as non errors and leave further meaning undefined
    This allows future extensions to use these values

    Reviewed-by : Paul B Mahol <onemda@gmail.com>
    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] cmdutils.h
    • [DH] libavcodec/iff.c
    • [DH] libavcodec/version.h
    • [DH] libavcodec/wmaprodec.c
    • [DH] libavfilter/avcodec.h
    • [DH] libavfilter/avfilter.h
    • [DH] libavfilter/avfiltergraph.c
    • [DH] libavfilter/graphparser.c
    • [DH] libavfilter/internal.h
    • [DH] libavfilter/lavfutils.h
    • [DH] libavfilter/version.h
    • [DH] libavformat/avio.h
    • [DH] libavformat/avio_internal.h
    • [DH] libavformat/url.h
    • [DH] libavformat/version.h
    • [DH] libavutil/eval.h
    • [DH] libavutil/parseutils.h
    • [DH] libavutil/version.h
  • lavc : rename AV_CODEC_CAP_AUTO_THREADS->AV_CODEC_CAP_OTHER_THREADS

    9 mars 2021, par Anton Khirnov
    lavc : rename AV_CODEC_CAP_AUTO_THREADS->AV_CODEC_CAP_OTHER_THREADS
    

    This cap is currently used to mark multithreading-capable codecs that
    wrap external libraries with their own multithreading code. The name is
    highly confusing for our API users, since libavcodec ALWAYS handles
    thread_count=0 (see commit message in previous commit). Therefore rename
    the cap and update its documentation to make its meaning clear.

    The old name is kept deprecated until next+1 major bump.

    • [DH] doc/APIchanges
    • [DH] fftools/cmdutils.c
    • [DH] libavcodec/codec.h
    • [DH] libavcodec/libaomdec.c
    • [DH] libavcodec/libaomenc.c
    • [DH] libavcodec/libdav1d.c
    • [DH] libavcodec/libdavs2.c
    • [DH] libavcodec/libkvazaar.c
    • [DH] libavcodec/libopenh264enc.c
    • [DH] libavcodec/librav1e.c
    • [DH] libavcodec/libsvtav1.c
    • [DH] libavcodec/libuavs3d.c
    • [DH] libavcodec/libvpxdec.c
    • [DH] libavcodec/libvpxenc.c
    • [DH] libavcodec/libx264.c
    • [DH] libavcodec/libx265.c
    • [DH] libavcodec/libxavs.c
    • [DH] libavcodec/libxavs2.c
    • [DH] libavcodec/version.h
  • Pipe opencv frames into ffmpeg

    25 juin 2023, par Dmytro Soltusyuk

    I am trying to pipe opencv frames into ffmpeg, but it does not work.

    &#xA;

    After the research, I found this answer (https://stackoverflow.com/a/62807083/10676682) to work the best for me, so I have the following :

    &#xA;

    def start_streaming_process(rtmp_url, width, height, fps):&#xA;    # fmt: off&#xA;    cmd = [&#x27;ffmpeg&#x27;,&#xA;           &#x27;-y&#x27;,&#xA;           &#x27;-f&#x27;, &#x27;rawvideo&#x27;,&#xA;           &#x27;-vcodec&#x27;, &#x27;rawvideo&#x27;,&#xA;           &#x27;-pix_fmt&#x27;, &#x27;bgr24&#x27;,&#xA;           &#x27;-s&#x27;, "{}x{}".format(width, height),&#xA;           &#x27;-r&#x27;, str(fps),&#xA;           &#x27;-i&#x27;, &#x27;-&#x27;,&#xA;           &#x27;-c:v&#x27;, &#x27;libx264&#x27;,&#xA;           &#x27;-pix_fmt&#x27;, &#x27;yuv420p&#x27;,&#xA;           &#x27;-preset&#x27;, &#x27;ultrafast&#x27;,&#xA;           &#x27;-f&#x27;, &#x27;flv&#x27;,&#xA;           &#x27;-flvflags&#x27;, &#x27;no_duration_filesize&#x27;,&#xA;           rtmp_url]&#xA;    # fmt: on&#xA;&#xA;    return subprocess.Popen(cmd, stdin=subprocess.PIPE)&#xA;

    &#xA;

    def main():&#xA;    width, height, fps = get_video_size(SOURCE_VIDEO_PATH)&#xA;    streaming_process = start_streaming_process(&#xA;        TARGET_VIDEO_PATH,&#xA;        width,&#xA;        height,&#xA;        fps,&#xA;    )&#xA;&#xA;    model = load_yolo(WEIGHTS_PATH)&#xA;    frame_iterator = read_frames(video_source=SOURCE_VIDEO_PATH)&#xA;    processed_frames_iterator = process_frames(&#xA;        model, frame_iterator, ball_target_area=400&#xA;    )&#xA;&#xA;    for processed_frame in processed_frames_iterator:&#xA;        streaming_process.communicate(processed_frame.tobytes())&#xA;&#xA;    streaming_process.kill()&#xA;

    &#xA;

    processed_frame here is an annotated OpenCV frame.

    &#xA;

    However, after I do my first streaming_process.communicate call, the ffmpeg process exits with code 0 (meaning everything was ok), but it is not. I can not feed the rest of the frames into ffmpeg, because the process exited.

    &#xA;

    Here are the logs :

    &#xA;

    Input #0, rawvideo, from &#x27;fd:&#x27;:&#xA;  Duration: N/A, start: 0.000000, bitrate: 663552 kb/s&#xA;  Stream #0:0: Video: rawvideo (BGR[24] / 0x18524742), bgr24, 1280x720, 663552 kb/s, 30 tbr, 30 tbn&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))&#xA;[libx264 @ 0x132e05570] using cpu capabilities: ARMv8 NEON&#xA;[libx264 @ 0x132e05570] profile High, level 3.1, 4:2:0, 8-bit&#xA;[libx264 @ 0x132e05570] 264 - core 164 r3095 baee400 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - h&#xA;ttp://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme&#xA;=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 &#xA;fast_pskip=1 chroma_qp_offset=-2 threads=15 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 inter&#xA;laced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=&#xA;1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbt&#xA;ree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00&#xA;Output #0, flv, to &#x27;rtmp://global-live.mux.com:5222/app/9428e064-e5d3-0bee-dc67-974ba53ce164&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf60.3.100&#xA;  Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), yuv420p(tv, progressive), 1280x720, q=2-31, 30 fps&#xA;, 1k tbn&#xA;    Metadata:&#xA;      encoder         : Lavc60.3.100 libx264&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A&#xA;frame=    1 fps=0.0 q=29.0 Lsize=      41kB time=00:00:00.00 bitrate=N/A speed=   0x    eed=N/A    &#xA;video:40kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.678311%&#xA;[libx264 @ 0x132e05570] frame I:1     Avg QP:25.22  size: 40589&#xA;[libx264 @ 0x132e05570] mb I  I16..4: 37.7% 33.4% 28.9%&#xA;[libx264 @ 0x132e05570] 8x8 transform intra:33.4%&#xA;[libx264 @ 0x132e05570] coded y,uvDC,uvAC intra: 51.1% 53.2% 14.4%&#xA;[libx264 @ 0x132e05570] i16 v,h,dc,p: 32% 38% 20% 10%&#xA;[libx264 @ 0x132e05570] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 36% 28%  3%  2%  2%  3%  3%  6%&#xA;[libx264 @ 0x132e05570] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 37% 17%  4%  4%  4%  5%  4%  7%&#xA;[libx264 @ 0x132e05570] i8c dc,h,v,p: 46% 37% 12%  4%&#xA;[libx264 @ 0x132e05570] kb/s:9741.36&#xA;

    &#xA;

    That's all. Exit code 0.

    &#xA;