Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (111)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

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

Sur d’autres sites (3205)

  • Merge commit ’f4c444e17d137c786f0ed2da0e5943df505d5f9e’

    9 août 2014, par Michael Niedermayer
    Merge commit ’f4c444e17d137c786f0ed2da0e5943df505d5f9e’
    

    * commit ’f4c444e17d137c786f0ed2da0e5943df505d5f9e’ :
    Postpone API-incompatible changes until the next bump.

    Merged-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavcodec/version.h
    • [DH] libavfilter/version.h
    • [DH] libavformat/version.h
    • [DH] libavresample/version.h
    • [DH] libavutil/version.h
    • [DH] libswscale/version.h
  • How can I convert .MTS file (AVCHD) to .mp4 by ffmpeg without re-encoding H264 video stream correctly ?

    2 septembre 2014, par kaorukobo

    I posted an same question to another community Video Production that I’ve found later, and which seems to be a better place for this question :

    See : http://video.stackexchange.com/questions/12156/how-can-i-convert-mts-file-avchd-to-mp4-by-ffmpeg-without-re-encoding-h264-v/


    1. What I tried

    I have some .MTS (AVCHD format) files recoreded with my AVCHD camera. Its specification is as shown below :

    $ ffprobe 140612_Canon-00000.MTS
    ffprobe version 2.2.1 Copyright (c) 2007-2014 the FFmpeg developers
    (snip)
    Input #0, mpegts, from '140612_Canon-00000.MTS':
     Duration: 00:48:58.40, start: 0.800300, bitrate: 5563 kb/s
     Program 1
       Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448),
         yuv420p, 1440x1080 [SAR 4:3 DAR 16:9],
         29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
       Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz,
         stereo, fltp, 256 kb/s

    Pay attention to the part of framerate/timebase : 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc

    Now I’d like to convert this file to .mp4 file, without re-encoding H264 video stream, on the other hand, with transcoding its audio stream to AAC.
    So I tried the following command :

    ffmpeg -i 140612_Canon-00000.MTS -t 60 -y -vcodec copy -acodec libfaac -ab 128k 140612_Canon-00001.MTS.mp4

    2. Result

    and output file’s specification is as shown below :

    $ ffprobe 140612_Canon-00000.MTS.mp4
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '140612_Canon-00000.MTS.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf55.33.100

     Duration: 00:01:00.04, start: 0.021333, bitrate: 4590 kb/s

       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
           1440x1080 [SAR 4:3 DAR 16:9], 4448 kb/s,
           59.94 fps, 59.94 tbr, 90k tbn, 59.94 tbc (default)
       Metadata:
         handler_name    : VideoHandler

       Stream #0:1(und): Audio: aac (mp4a / 0x6134706D),
           48000 Hz, stereo, fltp, 128 kb/s (default)
       Metadata:
         handler_name    : SoundHandler

    Look at the part of framerate/timebase : 59.94 fps, 59.94 tbr, 90k tbn, 59.94 tbc.
    Although ffmpeg just copied the video stream, framerate and timebase has been changed to twice value.

    So, when I open and playback the output file with QuickTime Player or VLC Player,
    the audio has no problem, however, the video stream is not played correctly.
    The video is played back with having its frame forward and backward quiveringly repeatedly.

    3. Question

    1. How can I convert .MTS file (AVCHD) to .mp4 by ffmpeg without re-encoding H264 video stream correctly ?
    2. How can I keep the original framerate/timebase values (fps/tbr/tbn/tbc) when I convert the container with ffmpeg and its -vcodec copy switch.
    3. How can I set framerate/timebase values (fps/tbr/tbn/tbc) by ffmpeg’s command line options without re-encoding a video stream.

    Any ideas ?

  • FFMPEG keeping quality when reducing FPS and streaming over RTSP with rtsp-simple-server

    25 janvier 2021, par Jens Schneider

    I'm using the rtsp-simple-server (https://github.com/aler9/rtsp-simple-server) and feed the RTSP Server with a FFMPEG stream.

    &#xA;

    I use a docker compose file to start the stream :

    &#xA;

    version: "3.8"&#xA;&#xA;services:&#xA;&#xA;  ffmpeg:&#xA;    container_name: ffmpeg-base&#xA;    restart: always&#xA;    image: "jenssgb/rtspffmpeg:base"&#xA;    depends_on:&#xA;      - rtsp-server&#xA;    volumes:&#xA;      - $PWD/:/video&#xA;    network_mode: "host"&#xA;    command: "ffmpeg -re -stream_loop -1 -i /video/footage-1-b.mp4 -c copy -f rtsp rtsp://localhost:8554/compose-rtsp"&#xA;  &#xA;  rtsp-server:&#xA;    container_name: rtsp-server-base&#xA;    restart: always&#xA;    image: "aler9/rtsp-simple-server"&#xA;    network_mode: "host"&#xA;

    &#xA;

    Now I'm trying to reduce the FPS of my video with transcoding it :

    &#xA;

    command: -re -stream_loop -1 -i ${VIDEO_FILE} -vf "fps=${FPS_COMPOSE}" -f rtsp rtsp://localhost:8554/compose-rtsp&#xA;

    &#xA;

    This is basically working, but the quality of the output video becomes pretty bad. I tried a lot of things like -c:v libx264 which did help for a minute but let ffmpeg crash then.

    &#xA;

    av_interleaved_write_frame(): Broken pipe0:00:09.99 bitrate=N/A speed=0.985x    &#xA;[rtsp @ 0x5563b1755640] Packets poorly interleaved, failed to avoid negative timestamp -33660 in stream 0.&#xA;Try -max_interleave_delta 0 as a possible workaround.&#xA;av_interleaved_write_frame(): Broken pipe&#xA;Error writing trailer of rtsp://localhost:8554/compose-rtsp: Broken pipe&#xA;

    &#xA;

    Any idea how I can reduce the FPS send the stream to the server but keep the video quality ? Later I'm going to reduce the resolution as well - but for now I want to keep resolution and quality but only reduce the FPS.

    &#xA;

    Full logs from my test with -c:v libx264 :

    &#xA;

        ffmpeg -re -stream_loop -1 -i footage-1-b.mp4 -vf "fps=5" -c:v libx264 -f rtsp rtsp://localhost:8554/compose-rtsp&#xA;ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)&#xA;  configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared&#xA;  libavutil      56. 31.100 / 56. 31.100&#xA;  libavcodec     58. 54.100 / 58. 54.100&#xA;  libavformat    58. 29.100 / 58. 29.100&#xA;  libavdevice    58.  8.100 / 58.  8.100&#xA;  libavfilter     7. 57.100 /  7. 57.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  5.100 /  5.  5.100&#xA;  libswresample   3.  5.100 /  3.  5.100&#xA;  libpostproc    55.  5.100 / 55.  5.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;footage-1-b.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    title           : Session streamed by "nessyMediaServer"&#xA;    encoder         : Lavf58.29.100&#xA;    comment         : h264_3&#xA;  Duration: 00:59:59.63, start: 0.000000, bitrate: 2099 kb/s&#xA;    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuvj420p(pc), 1280x720 [SAR 1:1 DAR 16:9], 2061 kb/s, 24.96 fps, 25 tbr, 12800 tbn, 25 tbc (default)&#xA;    Metadata:&#xA;      handler_name    : VideoHandler&#xA;    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 8000 Hz, mono, fltp, 35 kb/s (default)&#xA;    Metadata:&#xA;      handler_name    : SoundHandler&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))&#xA;  Stream #0:1 -> #0:1 (aac (native) -> aac (native))&#xA;Press [q] to stop, [?] for help&#xA;[aac @ 0x56277bc7f840] Too many bits 8832.000000 > 6144 per frame requested, clamping to max&#xA;[libx264 @ 0x56277bbc33c0] using SAR=1/1&#xA;[libx264 @ 0x56277bbc33c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2&#xA;[libx264 @ 0x56277bbc33c0] profile High, level 3.1&#xA;[libx264 @ 0x56277bbc33c0] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - 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=12 lookahead_threads=2 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=5 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&#xA;Output #0, rtsp, to &#x27;rtsp://localhost:8554/compose-rtsp&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    title           : Session streamed by "nessyMediaServer"&#xA;    comment         : h264_3&#xA;    encoder         : Lavf58.29.100&#xA;    Stream #0:0(und): Video: h264 (libx264), yuvj420p(pc), 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 5 fps, 90k tbn, 5 tbc (default)&#xA;    Metadata:&#xA;      handler_name    : VideoHandler&#xA;      encoder         : Lavc58.54.100 libx264&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1&#xA;    Stream #0:1(und): Audio: aac (LC), 8000 Hz, mono, fltp, 48 kb/s (default)&#xA;    Metadata:&#xA;      handler_name    : SoundHandler&#xA;      encoder         : Lavc58.54.100 aac&#xA;av_interleaved_write_frame(): Broken pipe0:00:09.87 bitrate=N/A speed=0.978x    &#xA;[rtsp @ 0x56277bba0640] Packets poorly interleaved, failed to avoid negative timestamp -33660 in stream 0.&#xA;Try -max_interleave_delta 0 as a possible workaround.&#xA;av_interleaved_write_frame(): Broken pipe&#xA;Error writing trailer of rtsp://localhost:8554/compose-rtsp: Broken pipe&#xA;frame=   50 fps=4.6 q=23.0 Lsize=N/A time=00:00:10.21 bitrate=N/A speed=0.947x    &#xA;video:162kB audio:8kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown&#xA;[libx264 @ 0x56277bbc33c0] frame I:1     Avg QP:19.85  size:165667&#xA;[libx264 @ 0x56277bbc33c0] frame P:13    Avg QP:20.88  size:140481&#xA;[libx264 @ 0x56277bbc33c0] frame B:36    Avg QP:24.58  size: 55445&#xA;[libx264 @ 0x56277bbc33c0] consecutive B-frames:  4.0%  0.0%  0.0% 96.0%&#xA;[libx264 @ 0x56277bbc33c0] mb I  I16..4:  4.4% 30.8% 64.8%&#xA;[libx264 @ 0x56277bbc33c0] mb P  I16..4:  4.1% 10.6% 20.0%  P16..4: 24.4% 24.8% 13.3%  0.0%  0.0%    skip: 2.6%&#xA;[libx264 @ 0x56277bbc33c0] mb B  I16..4:  0.8%  2.0%  4.0%  B16..8: 40.3% 14.5%  5.2%  direct:11.8%  skip:21.4%  L0:77.1% L1: 7.9% BI:14.9%&#xA;[libx264 @ 0x56277bbc33c0] 8x8 transform intra:30.1% inter:11.9%&#xA;[libx264 @ 0x56277bbc33c0] coded y,uvDC,uvAC intra: 82.5% 60.9% 26.6% inter: 55.0% 42.4% 2.7%&#xA;[libx264 @ 0x56277bbc33c0] i16 v,h,dc,p: 17% 26% 34% 23%&#xA;[libx264 @ 0x56277bbc33c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 33% 15%  3%  4%  5%  4%  3%  9%&#xA;[libx264 @ 0x56277bbc33c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 22% 13%  3% 17% 11%  5%  3%  6%&#xA;[libx264 @ 0x56277bbc33c0] i8c dc,h,v,p: 54% 25% 16%  5%&#xA;[libx264 @ 0x56277bbc33c0] Weighted P-Frames: Y:7.7% UV:7.7%&#xA;[libx264 @ 0x56277bbc33c0] ref P L0: 33.2% 11.6% 29.0% 23.9%  2.4%&#xA;[libx264 @ 0x56277bbc33c0] ref B L0: 79.6% 11.9%  8.5%&#xA;[libx264 @ 0x56277bbc33c0] ref B L1: 95.9%  4.1%&#xA;[libx264 @ 0x56277bbc33c0] kb/s:3190.34&#xA;[aac @ 0x56277bc7f840] Qavg: 65536.000&#xA;Conversion failed!&#xA;

    &#xA;

    Thank you,&#xA;J

    &#xA;