Recherche avancée

Médias (1)

Mot : - Tags -/géodiversité

Autres articles (62)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

Sur d’autres sites (8315)

  • ffmpeg could not find codec parameters for stream 0 on Ubuntu 22.04, works fine on Ubuntu 18.04

    22 février 2023, par ngm

    I'm new to ffmpeg but I've got an odd issue which seems to arise from using it on different Ubuntu versions.

    &#xA;

    I have an NVIDIA Jetson Nano running Ubuntu 18.04.5 LTS (GNU/Linux 4.9.201-tegra aarch64). Plugged into the Nano's carrier board is an embedded camera that shows up as a Sunplus Innovation Technology Inc. USB2.0 Camera RGB when I run lsusb.

    &#xA;

    When I run this ffmpeg command, I can successfully record video from the camera, which seems to be mjpeg codec with yuvj422p pixel format. The output is as follows :

    &#xA;

    ffmpeg -f video4linux2 -i /dev/video0 -an -vcodec libx264 test_capture.mp4&#xA;ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with gcc 7 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)&#xA;  configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared&#xA;  libavutil      55. 78.100 / 55. 78.100&#xA;  libavcodec     57.107.100 / 57.107.100&#xA;  libavformat    57. 83.100 / 57. 83.100&#xA;  libavdevice    57. 10.100 / 57. 10.100&#xA;  libavfilter     6.107.100 /  6.107.100&#xA;  libavresample   3.  7.  0 /  3.  7.  0&#xA;  libswscale      4.  8.100 /  4.  8.100&#xA;  libswresample   2.  9.100 /  2.  9.100&#xA;  libpostproc    54.  7.100 / 54.  7.100&#xA;Input #0, video4linux2,v4l2, from &#x27;/dev/video0&#x27;:&#xA;  Duration: N/A, start: 166.142773, bitrate: N/A&#xA;    Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 928x400, 100 fps, 100 tbr, 1000k tbn, 1000k tbc&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))&#xA;Press [q] to stop, [?] for help&#xA;[libx264 @ 0x558553df70] using cpu capabilities: ARMv8 NEON&#xA;[libx264 @ 0x558553df70] profile High 4:2:2, level 3.2, 4:2:2 8-bit&#xA;[libx264 @ 0x558553df70] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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=6 lookahead_threads=1 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&#xA;Output #0, mp4, to &#x27;test_capture.mp4&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf57.83.100&#xA;    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuvj422p(pc), 928x400, q=-1--1, 100 fps, 12800 tbn, 100 tbc&#xA;    Metadata:&#xA;      encoder         : Lavc57.107.100 libx264&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1&#xA;frame=  192 fps= 65 q=-1.0 Lsize=     151kB time=00:00:01.89 bitrate= 654.4kbits/s dup=150 drop=0 speed=0.642x    &#xA;video:148kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.072495%&#xA;[libx264 @ 0x558553df70] frame I:1     Avg QP:23.62  size: 36953&#xA;[libx264 @ 0x558553df70] frame P:49    Avg QP:25.25  size:  2121&#xA;[libx264 @ 0x558553df70] frame B:142   Avg QP:30.55  size:    70&#xA;[libx264 @ 0x558553df70] consecutive B-frames:  1.0%  1.0%  0.0% 97.9%&#xA;[libx264 @ 0x558553df70] mb I  I16..4: 10.1% 78.8% 11.1%&#xA;[libx264 @ 0x558553df70] mb P  I16..4:  1.1%  1.9%  0.0%  P16..4: 19.1%  3.0%  2.0%  0.0%  0.0%    skip:72.8%&#xA;[libx264 @ 0x558553df70] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  2.7%  0.0%  0.0%  direct: 0.1%  skip:97.2%  L0:36.8% L1:62.3% BI: 0.9%&#xA;[libx264 @ 0x558553df70] 8x8 transform intra:68.4% inter:77.4%&#xA;[libx264 @ 0x558553df70] coded y,uvDC,uvAC intra: 42.0% 80.2% 41.3% inter: 2.2% 5.4% 0.2%&#xA;[libx264 @ 0x558553df70] i16 v,h,dc,p: 50% 17% 10% 23%&#xA;[libx264 @ 0x558553df70] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21%  9% 32%  5%  7%  7%  5%  8%  5%&#xA;[libx264 @ 0x558553df70] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 15% 12%  5% 14% 11%  8%  5%  7%&#xA;[libx264 @ 0x558553df70] i8c dc,h,v,p: 50% 12% 26% 12%&#xA;[libx264 @ 0x558553df70] Weighted P-Frames: Y:28.6% UV:28.6%&#xA;[libx264 @ 0x558553df70] ref P L0: 56.4% 28.2% 12.0%  2.5%  0.9%&#xA;[libx264 @ 0x558553df70] ref B L0: 93.4%  5.3%  1.3%&#xA;[libx264 @ 0x558553df70] ref B L1: 94.9%  5.1%&#xA;[libx264 @ 0x558553df70] kb/s:628.21&#xA;Exiting normally, received signal 2.&#xA;

    &#xA;

    However, I'd like to replace this Nano with another that I've upgraded to Ubuntu 22.04.1 LTS (GNU/Linux 4.9.299-tegra aarch64). The device still shows up as the same type when running lsusb. Running the exact same command results in the following :

    &#xA;

    ffmpeg -f video4linux2 -i /dev/video0 -an -vcodec libx264 test_capture.mp4&#xA;ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)&#xA;  configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --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-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared&#xA;  libavutil      56. 70.100 / 56. 70.100&#xA;  libavcodec     58.134.100 / 58.134.100&#xA;  libavformat    58. 76.100 / 58. 76.100&#xA;  libavdevice    58. 13.100 / 58. 13.100&#xA;  libavfilter     7.110.100 /  7.110.100&#xA;  libswscale      5.  9.100 /  5.  9.100&#xA;  libswresample   3.  9.100 /  3.  9.100&#xA;  libpostproc    55.  9.100 / 55.  9.100&#xA;[video4linux2,v4l2 @ 0x55cab86450] Could not find codec parameters for stream 0 (Video: mjpeg, none(bt470bg/unknown/unknown), 1856x800): unspecified pixel format&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; (0) and &#x27;probesize&#x27; (5000000) options&#xA;Input #0, video4linux2,v4l2, from &#x27;/dev/video0&#x27;:&#xA;  Duration: N/A, bitrate: N/A&#xA;  Stream #0:0: Video: mjpeg, none(bt470bg/unknown/unknown), 1856x800, 60 fps, 60 tbr, 1000k tbn, 1000k tbc&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))&#xA;Press [q] to stop, [?] for help&#xA;Cannot determine format of input stream 0:0 after EOF&#xA;Error marking filters as finished&#xA;Exiting normally, received signal 2.&#xA;

    &#xA;

    I'm not sure why I can't read this video stream when everything seems to be the same but the OS and the ffmpeg version.

    &#xA;

    I've checked the available codecs and pixel formats using ffmpeg -codecs and ffmpeg -pix_fmts :

    &#xA;

    Ubuntu 18.04.5, ffmpeg version 3.4.8-0ubuntu0.2 :

    &#xA;

    DEVIL. mjpeg                Motion JPEG (encoders: mjpeg mjpeg_vaapi )

    &#xA;

    IO... yuvj422p               3            16

    &#xA;

    Ubuntu 22.04.1, ffmpeg version 4.4.2-0ubuntu0.22.04.1 :

    &#xA;

    DEVIL. mjpeg                Motion JPEG (decoders: mjpeg mjpeg_cuvid ) (encoders: mjpeg mjpeg_vaapi )

    &#xA;

    IO... yuvj422p               3            16

    &#xA;

    So it seems like I should be able to record video on both with this codec/pixel format combination.

    &#xA;

    I've also tried forcing ffmpeg to use this combination on the 22.04 Nano with the following command :

    &#xA;

    ffmpeg -f v4l2 -input_format mjpeg -framerate 100 -video_size 928x400 -pix_fmt yuvj422p -i /dev/video0 -an -vcodec libx264 test_capture.mp4

    &#xA;

    But I get the same error. I've also tried increasing the -analyzeduration and -probesize arguments to 100M, with no luck.

    &#xA;

    Are there other commands or settings I should use ? Should I downgrade my ffmpeg version if possible ?

    &#xA;

  • ffmpeg API : handle frame loss in hevc encoding

    8 janvier 2024, par Mario

    Everything works fine until the introduction of frame->pts increment due to frame loss.

    &#xA;

    Below is the regular progression without frame->pts increments :

    &#xA;

    &#xA;

    frame->pts=8 pkt->pts=512 pkt->dts=-512 pkt->flags=1
    &#xA;frame->pts=9 pkt->pts=2560 pkt->dts=0 pkt->flags=0
    &#xA;frame->pts=10 pkt->pts=1536 pkt->dts=512 pkt->flags=0
    &#xA;frame->pts=11 pkt->pts=1024 pkt->dts=1024 pkt->flags=0
    &#xA;frame->pts=12 pkt->pts=2048 pkt->dts=1536 pkt->flags=0
    &#xA;frame->pts=13 pkt->pts=4608 pkt->dts=2048 pkt->flags=0
    &#xA;frame->pts=14 pkt->pts=3584 pkt->dts=2560 pkt->flags=0
    &#xA;frame->pts=15 pkt->pts=3072 pkt->dts=3072 pkt->flags=0
    &#xA;frame->pts=16 pkt->pts=4096 pkt->dts=3584 pkt->flags=0
    &#xA;frame->pts=17 pkt->pts=6656 pkt->dts=4096 pkt->flags=0
    &#xA;frame->pts=18 pkt->pts=5632 pkt->dts=4608 pkt->flags=0

    &#xA;

    &#xA;

    When I introduce the frame->pts increment it happens :

    &#xA;

    &#xA;

    frame->pts=15 pkt->pts=512 pkt->dts=-512 pkt->flags=1
    &#xA;frame->pts=17 pkt->pts=4608 pkt->dts=2048 pkt->flags=0
    &#xA;frame->pts=19 pkt->pts=2560 pkt->dts=1536 pkt->flags=0
    &#xA;[mp4 @ 0x7eff842222c0] Application provided invalid, non monotonically increasing dts to muxer in stream 0 : 2048 >= 1536

    &#xA;

    &#xA;

    So I wrote the following code as a "quick" solution (between av_packet_rescale_ts() and av_interleaved_write_frame()) :

    &#xA;

       av_packet_rescale_ts(pkt, c->time_base, st->time_base);  &#xA;   ...&#xA;   if (pkt->dts&lt;=previous_dts)  &#xA;     {  &#xA;      if (pkt->pts&lt;=previous_pts)  &#xA;        {  &#xA;         pkt->pts=previous_dts&#x2B;1&#x2B;pkt->pts-pkt->dts;  &#xA;        }  &#xA;       pkt->dts=previous_dts&#x2B;1;  &#xA;     }  &#xA;   previous_dts=pkt->dts;  &#xA;   previous_pts=pkt->pts;  &#xA;   ...&#xA;   ret = av_interleaved_write_frame(fmt_ctx, pkt);  &#xA;

    &#xA;

    Now I no longer have the error, but the values are :

    &#xA;

    &#xA;

    frame->pts=15 pkt->pts=512 pkt->dts=-512 pkt->flags=1
    &#xA;changed frame->pts=15 pkt->pts=512 pkt->dts=1 pkt->flags=1
    &#xA;frame->pts=17 pkt->pts=4608 pkt->dts=2048 pkt->flags=0
    &#xA;frame->pts=19 pkt->pts=2560 pkt->dts=1536 pkt->flags=0
    &#xA;changed frame->pts=19 pkt->pts=3073 pkt->dts=2049 pkt->flags=0
    &#xA;frame->pts=21 pkt->pts=1536 pkt->dts=1536 pkt->flags=0
    &#xA;changed frame->pts=21 pkt->pts=2050 pkt->dts=2050 pkt->flags=0
    &#xA;frame->pts=23 pkt->pts=4096 pkt->dts=3584 pkt->flags=0
    &#xA;frame->pts=25 pkt->pts=8704 pkt->dts=6144 pkt->flags=0
    &#xA;frame->pts=27 pkt->pts=6656 pkt->dts=5632 pkt->flags=0
    &#xA;changed frame->pts=27 pkt->pts=7169 pkt->dts=6145 pkt->flags=0
    &#xA;frame->pts=29 pkt->pts=5632 pkt->dts=5632 pkt->flags=0
    &#xA;changed frame->pts=29 pkt->pts=6146 pkt->dts=6146 pkt->flags=0
    &#xA;frame->pts=31 pkt->pts=7680 pkt->dts=7168 pkt->flags=0
    &#xA;frame->pts=33 pkt->pts=12800 pkt->dts=10240 pkt->flags=0
    &#xA;frame->pts=35 pkt->pts=10752 pkt->dts=9728 pkt->flags=0
    &#xA;changed frame->pts=35 pkt->pts=11265 pkt->dts=10241 pkt->flags=0
    &#xA;frame->pts=37 pkt->pts=9728 pkt->dts=9728 pkt->flags=0
    &#xA;changed frame->pts=37 pkt->pts=10242 pkt->dts=10242 pkt->flags=0

    &#xA;

    &#xA;

    What is the correct way to handle frame loss scenario ?&#xA;Is there a way to inform the encoder about frame loss ?

    &#xA;

    The encoder is "hevc_qsv" and the output format is mov (.mp4).

    &#xA;

  • FFMPEG error when saving NDI stream to mp4

    22 septembre 2020, par user1163234

    I am trying to record a NDI stream to a MP4 file(I want to stream the mp4 to rtmp endpoint after saving file). However I am getting this error when running this class. https://github.com/WalkerKnapp/devolay/blob/master/examples/src/main/java/com/walker/devolayexamples/recording/RecordingExample.java

    &#xA;

    Error :

    &#xA;

    Connecting to source: DESKTOP-GQNH46Q (Ari PC output)&#xA;[file @ 0x7fb4f2d48540] Setting default whitelist &#x27;file,crypto&#x27;&#xA;x265 [info]: HEVC encoder version 0.0&#xA;x265 [info]: build info [Mac OS X][clang 8.1.0][64 bit] 8bit&#x2B;10bit&#x2B;12bit&#xA;x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2&#xA;x265 [info]: Main profile, Level-3.1 (Main tier)&#xA;x265 [info]: Thread pool created using 8 threads&#xA;x265 [info]: Slices                              : 1&#xA;x265 [info]: frame threads / pool features       : 1 / wpp(12 rows)&#xA;x265 [info]: Coding QT: max CU size, min CU size : 64 / 8&#xA;x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra&#xA;x265 [info]: ME / range / subpel / merge         : hex / 57 / 2 / 3&#xA;x265 [info]: Keyframe min / max / scenecut / bias: 1 / 250 / 40 / 5.00&#xA;x265 [info]: Lookahead / bframes / badapt        : 20 / 4 / 2&#xA;x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0&#xA;x265 [info]: References / ref-limit  cu / depth  : 3 / off / on&#xA;x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1&#xA;x265 [info]: Rate Control / qCompress            : CRF-28.0 / 0.60&#xA;x265 [info]: tools: rd=3 psy-rd=2.00 early-skip rskip signhide tmvp b-intra&#xA;x265 [info]: tools: strong-intra-smoothing lslices=4 deblock sao&#xA;[SWR @ 0x7fb4f8893000] Using fltp internally between filters&#xA;[mp4 @ 0x7fb4f3820200] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 135 >= 107&#xA;Failed to write video flush packet, skipping: Invalid argument&#xA;configurationVersion:                1&#xA;general_profile_space:               0&#xA;general_tier_flag:                   0&#xA;general_profile_idc:                 1&#xA;general_profile_compatibility_flags: 0x60000000&#xA;general_constraint_indicator_flags:  0x900000000000&#xA;general_level_idc:                   93&#xA;min_spatial_segmentation_idc:        0&#xA;parallelismType:                     0&#xA;chromaFormat:                        1&#xA;bitDepthLumaMinus8:                  0&#xA;bitDepthChromaMinus8:                0&#xA;avgFrameRate:                        0&#xA;constantFrameRate:                   0&#xA;numTemporalLayers:                   1&#xA;temporalIdNested:                    1&#xA;lengthSizeMinusOne:                  3&#xA;numOfArrays:                         4&#xA;array_completeness[0]:               0&#xA;NAL_unit_type[0]:                    32&#xA;numNalus[0]:                         1&#xA;nalUnitLength[0][0]:                 24&#xA;array_completeness[1]:               0&#xA;NAL_unit_type[1]:                    33&#xA;numNalus[1]:                         1&#xA;nalUnitLength[1][0]:                 41&#xA;array_completeness[2]:               0&#xA;NAL_unit_type[2]:                    34&#xA;numNalus[2]:                         1&#xA;nalUnitLength[2][0]:                 7&#xA;array_completeness[3]:               0&#xA;NAL_unit_type[3]:                    39&#xA;numNalus[3]:                         1&#xA;nalUnitLength[3][0]:                 2050&#xA;[AVIOContext @ 0x7fb4f2d48640] Statistics: 2 seeks, 4 writeouts&#xA;x265 [info]: frame I:      1, Avg QP:14.03  kb/s: 16.33   &#xA;x265 [info]: frame P:     36, Avg QP:21.67  kb/s: 0.04    &#xA;x265 [info]: frame B:     73, Avg QP:24.22  kb/s: 0.03    &#xA;x265 [info]: Weighted P-Frames: Y:0.0% UV:0.0%&#xA;x265 [info]: consecutive B-frames: 28.9% 13.2% 18.4% 2.6% 36.8% &#xA;&#xA;encoded 110 frames in 15.13s (7.27 fps), 0.18 kb/s, Avg QP:23.29&#xA;[aac @ 0x7fb4f6aa6200] Qavg: 65536.000&#xA;

    &#xA;