Recherche avancée

Médias (0)

Mot : - Tags -/signalement

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

Autres articles (65)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (6012)

  • lavc/cbrt_tablegen : speed up tablegen

    11 janvier 2016, par Ganesh Ajjanagadde
    lavc/cbrt_tablegen : speed up tablegen
    

    This exploits an approach based on the sieve of Eratosthenes, a popular
    method for generating prime numbers.

    Tables are identical to previous ones.

    Tested with FATE with/without —enable-hardcoded-tables.

    Sample benchmark (Haswell, GNU/Linux+gcc) :
    prev :
    7860100 decicycles in cbrt_tableinit, 1 runs, 0 skips
    7777490 decicycles in cbrt_tableinit, 2 runs, 0 skips
    [...]
    7582339 decicycles in cbrt_tableinit, 256 runs, 0 skips
    7563556 decicycles in cbrt_tableinit, 512 runs, 0 skips

    new :
    2099480 decicycles in cbrt_tableinit, 1 runs, 0 skips
    2044470 decicycles in cbrt_tableinit, 2 runs, 0 skips
    [...]
    1796544 decicycles in cbrt_tableinit, 256 runs, 0 skips
    1791631 decicycles in cbrt_tableinit, 512 runs, 0 skips

    Both small and large run count given as this is called once so small run
    count may give a better picture, small numbers are fairly consistent,
    and there is a consistent downward trend from small to large runs,
    at which point it stabilizes to a new value.

    Reviewed-by : Michael Niedermayer <michael@niedermayer.cc>
    Signed-off-by : Ganesh Ajjanagadde <gajjanagadde@gmail.com>

    • [DH] libavcodec/cbrt_tablegen.h
  • arm64 : port synth_filter_float_neon from arm

    1er décembre 2015, par Janne Grunau
    arm64 : port synth_filter_float_neon from arm
    

     25% faster dts decoding overall. The checkasm CPU cycles numbers are
    not that useful since synth_filter_float() calls FFTContext.imdct_half().

    cortex-a57 cortex-a53
    synth_filter_float_c : 1866.2 3490.9
    synth_filter_float_neon : 915.0 1531.5

    With fftc.imdct_half forced to imdct_half_neon :
    cortex-a57 cortex-a53
    synth_filter_float_c : 1718.4 3025.3
    synth_filter_float_neon : 926.2 1530.1

    • [DBH] libavcodec/aarch64/Makefile
    • [DBH] libavcodec/aarch64/asm-offsets.h
    • [DBH] libavcodec/aarch64/dcadsp_init.c
    • [DBH] libavcodec/aarch64/synth_filter_neon.S
    • [DBH] libavcodec/synth_filter.c
    • [DBH] libavcodec/synth_filter.h
  • ffmpeg video slides vertically after 'Invalid buffer size, packet size expected frame_size' error (vsync screen tearing glitch) ?

    7 juillet 2020, par GlabbichRulz

    I have a video which i want to cut and crop using opencv and ffmpeg.

    &#xA;

    diagram what i am trying to do

    &#xA;

    I want the output to be H265, so i am using a ffmpeg subprocess (writing frame bytes to stdin) as explained here. This is a minimum version of my code that leads to the error :

    &#xA;

    import os, shlex, subprocess, cv2, imutils&#xA;&#xA;VIDEO_DIR = &#x27;../SoExample&#x27; # should contain a file &#x27;in.mpg&#x27;&#xA;TIMESPAN = (3827, 3927)  # cut to this timespan (frame numbers)&#xA;CROP = dict(min_x=560, max_x=731, min_y=232, max_y=418)  # crop to this area&#xA;&#xA;#  calculate output video size&#xA;size = (CROP[&#x27;max_x&#x27;]-CROP[&#x27;min_x&#x27;], CROP[&#x27;max_y&#x27;]-CROP[&#x27;min_y&#x27;])  # (w,h)&#xA;# ffmpeg throws an error when having odd dimensions that are not dividable by 2,&#xA;# so i just add a pixel to the size and stretch the original image by 1 pixel later.&#xA;size_rounded = (size[0]&#x2B;1 if size[0] % 2 != 0 else size[0],&#xA;                size[1]&#x2B;1 if size[1] % 2 != 0 else size[1])&#xA;&#xA;# read input video&#xA;vid_path_in = os.path.join(VIDEO_DIR, &#x27;in.mpg&#x27;)&#xA;cap = cv2.VideoCapture(vid_path_in)&#xA;fps = int(cap.get(cv2.CAP_PROP_FPS))&#xA;&#xA;# generate and run ffmpeg command&#xA;ffmpeg_cmd = (f&#x27;/usr/bin/ffmpeg -y -s {size_rounded[0]}x{size_rounded[1]} -pixel_format&#x27;&#xA;              &#x2B; f&#x27; bgr24 -f rawvideo -r {fps} -re -i pipe: -vcodec libx265 -pix_fmt yuv420p&#x27;&#xA;              &#x2B; f&#x27; -crf 24 -x265-params "ctu=64" "{os.path.join(VIDEO_DIR, "out.mp4")}"&#x27;)&#xA;print("using cmd", ffmpeg_cmd)&#xA;process = subprocess.Popen(shlex.split(ffmpeg_cmd), stdin=subprocess.PIPE)&#xA;&#xA;# seek to the beginning of the cutting timespan and loop through frames of input video&#xA;cap.set(cv2.CAP_PROP_POS_FRAMES, TIMESPAN[0])&#xA;frame_returned = True&#xA;while cap.isOpened() and frame_returned:&#xA;    frame_returned, frame = cap.read()&#xA;    frame_number = cap.get(cv2.CAP_PROP_POS_FRAMES) - 1&#xA;&#xA;    # check if timespan end is not reached yet&#xA;    if frame_number &lt; TIMESPAN[1]:&#xA;&#xA;        # crop to relevant image area&#xA;        frame_cropped = frame[CROP[&#x27;min_y&#x27;]:CROP[&#x27;max_y&#x27;],&#xA;                              CROP[&#x27;min_x&#x27;]:CROP[&#x27;max_x&#x27;]]&#xA;&#xA;        # resize to even frame size if needed:&#xA;        if size != size_rounded:&#xA;            frame_cropped = imutils.resize(frame_cropped, width=size_rounded[0],&#xA;                                           height=size_rounded[1])&#xA;&#xA;        # Show processed image using opencv: I see no errors here.&#xA;        cv2.imshow(&#x27;Frame&#x27;, frame_cropped)&#xA;&#xA;        # Write cropped video frame to input stream of ffmpeg sub-process.&#xA;        process.stdin.write(frame_cropped.tobytes())&#xA;    else:&#xA;        break&#xA;&#xA;    # Press Q on keyboard to exit earlier&#xA;    if cv2.waitKey(25) &amp; 0xFF == ord(&#x27;q&#x27;):&#xA;        break&#xA;&#xA;process.stdin.close()  # Close and flush stdin&#xA;process.wait()         # Wait for sub-process to finish&#xA;process.terminate()    # Terminate the sub-process&#xA;&#xA;print("Done!")&#xA;

    &#xA;

    Unfortunately, my output looks like this :

    &#xA;

    gif of the sliding glitch

    &#xA;

    The output should not include this vertical sliding glitch. Does anyone know how to fix it ?

    &#xA;

    My console output for aboves script shows :

    &#xA;

    using cmd /usr/bin/ffmpeg -y -s 172x186 -pixel_format bgr24 -f rawvideo -r 23 -i pipe: -vcodec libx265 -pix_fmt yuv420p -crf 24 -x265-params "ctu=64" "../SoExample/out.mp4"&#xA;ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers&#xA;  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)&#xA;  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-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;  WARNING: library configuration mismatch&#xA;  avcodec     configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-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 --enable-version3 --disable-doc --disable-programs --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc&#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, rawvideo, from &#x27;pipe:&#x27;:&#xA;  Duration: N/A, start: 0.000000, bitrate: 17659 kb/s&#xA;    Stream #0:0: Video: rawvideo (BGR[24] / 0x18524742), bgr24, 172x186, 17659 kb/s, 23 tbr, 23 tbn, 23 tbc&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (rawvideo (native) -> hevc (libx265))&#xA;x265 [info]: HEVC encoder version 2.6&#xA;x265 [info]: build info [Linux][GCC 7.2.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-2 (Main tier)&#xA;x265 [info]: Thread pool created using 4 threads&#xA;x265 [info]: Slices                              : 1&#xA;x265 [info]: frame threads / pool features       : 2 / wpp(3 rows)&#xA;x265 [warning]: Source height &lt; 720p; disabling lookahead-slices&#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 / 2&#xA;x265 [info]: Keyframe min / max / scenecut / bias: 23 / 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 / on / on&#xA;x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 1.0 / 32 / 1&#xA;x265 [info]: Rate Control / qCompress            : CRF-24.0 / 0.60&#xA;x265 [info]: tools: rd=3 psy-rd=2.00 rskip signhide tmvp strong-intra-smoothing&#xA;x265 [info]: tools: deblock sao&#xA;Output #0, mp4, to &#x27;../SoExample/out.mp4&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf57.83.100&#xA;    Stream #0:0: Video: hevc (libx265) (hev1 / 0x31766568), yuv420p, 172x186, q=2-31, 23 fps, 11776 tbn, 23 tbc&#xA;    Metadata:&#xA;      encoder         : Lavc57.107.100 libx265&#xA;[rawvideo @ 0x564ebd221aa0] Invalid buffer size, packet size 51600 &lt; expected frame_size 95976    &#xA;Error while decoding stream #0:0: Invalid argument&#xA;frame=  100 fps= 30 q=-0.0 Lsize=      36kB time=00:00:04.21 bitrate=  69.1kbits/s speed=1.25x    &#xA;video:32kB audio:0kB subtitle:0kB other streams:0kB global headers:2kB muxing overhead: 12.141185%&#xA;x265 [info]: frame I:      1, Avg QP:22.44  kb/s: 179.77  &#xA;x265 [info]: frame P:     29, Avg QP:24.20  kb/s: 130.12  &#xA;x265 [info]: frame B:     70, Avg QP:29.99  kb/s: 27.82   &#xA;x265 [info]: Weighted P-Frames: Y:0.0% UV:0.0%&#xA;x265 [info]: consecutive B-frames: 20.0% 3.3% 16.7% 43.3% 16.7% &#xA;&#xA;encoded 100 frames in 3.35s (29.83 fps), 59.01 kb/s, Avg QP:28.23&#xA;Done!&#xA;

    &#xA;

    As you can see, there is an error : Invalid buffer size, packet size 51600 &lt; expected frame_size 95976 Error while decoding stream #0:0: Invalid argument, do you think this could be the cause to the shown problem ? I am not sure, as in the end, it tells me all 100 frames would have been encoded.

    &#xA;

    In case you want to reproduce this on the exact same video, you can find actions1.mpg in the UCF Aerial Action Dataset.

    &#xA;

    I would greatly appreciate any help as i am really stuck on this error.

    &#xA;