Recherche avancée

Médias (91)

Autres articles (88)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (7424)

  • Cannot play mp4 video with ffplay, but mpv can

    4 septembre 2021, par guapi

    I want to play a mp4 video on Debian 9.

    


    First, I try to use ffplay to play the video. I use the command ffplay test.mp4, but it cannot play, and display many same errors Receive_frame and send_packet both returned EAGAIN, which is an API violation.. There are detailed logs.

    


    $ffplay test.mp4
ffplay version n3.4.1-1-g84bbe2b650-1 Copyright (c) 2003-2017 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18) 20170516
  configuration: --prefix=/usr --extra-version=1 --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-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-version3 --enable-rkmpp --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --cross-prefix=aarch64-linux-gnu- --arch=arm64 --target-os=linux --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':q=    0B f=0/0   
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    artist          : 陈奕迅
    comment         : 163 key(Don't modify):clknHbeu87C/TSIpwWw5+/XVNX46iNc6ZUUI/NNBEnGJkB4J9X28bm/OzW54+zpI0NB1+t6V7QGaqmB68bMFun4XNP4wNmDOIp4WWeRm39qy/b0byW/uCuwv/MCWns8cctlzaCGCgZ1BwPvgwiafBMYcHpKHd1o0LSoaK+04tV2kClpKQTalNso32/6iLaRha+HEQqp6uyHtqsB8zoqnbIwint4Dni3AwFID6Y4aN
    title           : 梦想天空分外蓝
    encoder         : Lavf57.71.100
  Duration: 00:03:20.45, start: 0.000000, bitrate: 834 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 854x480 [SAR 1:1 DAR 427:240], 700 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
mpi: mpp version: 073ceeb author: Jacob Chen DEBIAN: update rules for release_20171218
mpp_log: can not found match soc name: rockchip,rp px30 linux rockchip,px30 
hal_h264d_api: hal_h264d_init mpp_buffer_group_get_internal used ion In
mpp_rt: NOT found ion allocator
mpp_rt: found drm allocator
[h264_rkmpp @ 0x7f7003a000] Decoder noticed an info change (854x480), format=0
[h264_rkmpp @ 0x7f7003a000] Receive_frame and send_packet both returned EAGAIN, which is an API violation.
[h264_rkmpp @ 0x7f7003a000] Receive_frame and send_packet both returned EAGAIN, which is an API violation.
[h264_rkmpp @ 0x7f7003a000] Receive_frame and send_packet both returned EAGAIN, which is an API violation.
[h264_rkmpp @ 0x7f7003a000] Receive_frame and send_packet both returned EAGAIN, which is an API violation.
[h264_rkmpp @ 0x7f7003a000] Receive_frame and send_packet both returned EAGAIN, which is an API violation.
[h264_rkmpp @ 0x7f7003a000] Receive_frame and send_packet both returned EAGAIN, which is an API violation.
[h264_rkmpp @ 0x7f7003a000] Receive_frame and send_packet both returned EAGAIN, which is an API violation.



    


    Then, I try to use mpv to play the video. I use the command mpv test.mp4, and it successfully play the video. There are detailed logs.

    


    $mpv test.mp4
Playing: test.mp4
 (+) Video --vid=1 (*) (h264 854x480 25.000fps)
 (+) Audio --aid=1 --alang=und (*) (aac 2ch 44100Hz)
File tags:
 Artist: 陈奕迅
 Comment: 163 key(Don't modify):clknHbeu87C/TSIpwWw5+/XVNX46iNc6ZUUI/NNBEnGJkB4J9X28bm/OzW54+zpI0NB1+t6V7QGaqmB68bMFun4XNP4wNmDOIp4WWeRm39qy/b0byW/uCuwv/MCWns8cctlzaCGCgZ1BwPvgwiafBMYcHpKHd1o0LSoaK+04tV2kClpKQTalNso32/6iLaRha+HEQqp6uyHtqsB8zoqnbIwint4Dni3AwFID6Y4aNZYwtXYGiF6L7DDWSezw0ICX
 Title: 梦想天空分外蓝
ERROR: The DDK is not compatible with any of the Mali GPUs on the system.
The DDK was built for 0x860 r2p0 status range [0..15], but none of the GPUs matched:
/dev/mali0 detected as 0x7093 r0p0 status 0
[vo/x11] Warning: this legacy VO has bad performance. Consider fixing your graphics drivers, or not forcing the x11 VO.
AO: [alsa] 44100Hz stereo 2ch float
VO: [x11] 854x480 yuv420p
[ffmpeg] swscaler: No accelerated colorspace conversion found from yuv420p to bgra.
[ffmpeg] swscaler: No accelerated colorspace conversion found from yuv420p to bgra.
[ffmpeg] swscaler: No accelerated colorspace conversion found from yuv420p to bgra.
AV: 00:00:03 / 00:03:20 (1%) A-V:  0.000



    


    I don’t know much about video encoding and decoding. Both mpv and ffplay use ffmpeg for video decoding, but why are the results different ?
Thanks in advance.

    


    There is the information of my system.

    


    $uname -a
Linux linaro-alip 4.4.189 #24 SMP Tue Jul 21 17:01:59 CST 2020 aarch64 GNU/Linux


    


    $cat /proc/version
Linux version 4.4.189 (rpdzkj@rpdzkj) (gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05) ) #24 SMP Tue Jul 21 17:01:59 CST 2020


    


    $lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.13 (stretch)
Release:    9.13
Codename:   stretch


    


  • FFMpeg Watermark Quality Very Bad

    22 janvier 2016, par John Cliven

    I’m trying to add a watermark to a video which works fine, the only issue is the quality is greatly degraded. It also reduces the resolution of the video, making it a smaller size than it originally was. I am using the following command :

    ffmpeg -i fade.mp4 -i watermark.png -filter_complex "scale=512:-2,overlay=(main_w-overlay_w)-2:(main_h-overlay_h)-2" -strict -2 final.mp4

    I have also tried the following to specify high quality, but it produces the same bad quality video :

    ffmpeg -i fade.mp4 -i watermark.png -filter_complex "scale=512:-2,overlay=(main_w-overlay_w)-2:(main_h-overlay_h)-2" -qscale 0 -strict -2 final.mp4

    Here is the output from ffmpeg :

    root@shell:~/videos# ffmpeg -i fade.mp4 -i watermark.png -filter_complex "scale=512:-2,overlay=(main_w-overlay_w)-2:(main_h-overlay_h)-2" -strict -2 final.mp4
    ffmpeg version 2.7.4-0ubuntu0.15.10.1 Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
     configuration: --prefix=/usr --extra-version=0ubuntu0.15.10.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-frei0r --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-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-openal --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libxvid --enable-libzvbi --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-libssh --enable-libsoxr --enable-libx264 --enable-libopencv --enable-libx265
     libavutil      54. 27.100 / 54. 27.100
     libavcodec     56. 41.100 / 56. 41.100
     libavformat    56. 36.100 / 56. 36.100
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 16.101 /  5. 16.101
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  2.100 /  1.  2.100
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'fade.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf56.36.100
     Duration: 00:00:29.13, start: 0.023220, bitrate: 1158 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1027 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #1, png_pipe, from 'watermark.png':
     Duration: N/A, bitrate: N/A
       Stream #1:0: Video: png, rgba(pc), 200x45 [SAR 11811:11811 DAR 40:9], 25 tbr, 25 tbn, 25 tbc
    [libx264 @ 0x24743c0] using SAR=1/1
    [libx264 @ 0x24743c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 0x24743c0] profile High, level 2.1
    [libx264 @ 0x24743c0] 264 - core 146 r2555 0c21480 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - videolan[cannotpostlink]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=9 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
    Output #0, mp4, to 'final.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf56.36.100
       Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 512x288 [SAR 1:1 DAR 16:9], q=-1--1, 29.97 fps, 30k tbn, 29.97 tbc (default)
       Metadata:
         encoder         : Lavc56.41.100 libx264
       Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, fltp, 128 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
         encoder         : Lavc56.41.100 aac
    Stream mapping:
     Stream #0:0 (h264) -> scale (graph 0)
     Stream #1:0 (png) -> overlay:overlay (graph 0)
     overlay (graph 0) -> Stream #0:0 (libx264)
     Stream #0:1 -> #0:1 (aac (native) -> aac (native))
    Press [q] to stop, [?] for help
    frame=  874 fps= 86 q=-1.0 Lsize=    1308kB time=00:00:29.09 bitrate= 368.2kbits/s dup=1 drop=0
    video:837kB audio:440kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.454302%
    [libx264 @ 0x24743c0] frame I:5     Avg QP:21.11  size: 10348
    [libx264 @ 0x24743c0] frame P:363   Avg QP:22.00  size:  1698
    [libx264 @ 0x24743c0] frame B:506   Avg QP:23.35  size:   371
    [libx264 @ 0x24743c0] consecutive B-frames: 17.0%  7.1% 30.5% 45.3%
    [libx264 @ 0x24743c0] mb I  I16..4: 21.1% 41.7% 37.2%
    [libx264 @ 0x24743c0] mb P  I16..4:  2.6%  3.3%  1.2%  P16..4: 26.6% 12.0%  5.2%  0.0%  0.0%    skip:49.1%
    [libx264 @ 0x24743c0] mb B  I16..4:  0.3%  0.1%  0.0%  B16..8: 32.2%  2.8%  0.3%  direct: 0.2%  skip:64.1%  L0:38.5% L1:57.9% BI: 3.6%
    [libx264 @ 0x24743c0] 8x8 transform intra:44.2% inter:71.4%
    [libx264 @ 0x24743c0] coded y,uvDC,uvAC intra: 41.7% 32.3% 8.2% inter: 6.6% 3.5% 0.1%
    [libx264 @ 0x24743c0] i16 v,h,dc,p: 50% 32%  6% 12%
    [libx264 @ 0x24743c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 21% 24%  4%  5%  7%  5%  5%  6%
    [libx264 @ 0x24743c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 30% 12%  4%  6%  7%  6%  5%  5%
    [libx264 @ 0x24743c0] i8c dc,h,v,p: 67% 19% 12%  2%
    [libx264 @ 0x24743c0] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 0x24743c0] ref P L0: 65.7% 18.3% 11.2%  4.8%
    [libx264 @ 0x24743c0] ref B L0: 84.6% 11.7%  3.7%
    [libx264 @ 0x24743c0] ref B L1: 95.2%  4.8%
    [libx264 @ 0x24743c0] kb/s:234.81
    root@shell:~/videos#
  • FFmpeg videos not working on QuickPlayer (and therefore on OpenCV)

    7 mai 2018, par Gabrielle

    I know that there are several posts about FFMpeg not working on QuickPlayer (and OpenCV) and other players supporting only YUV planar color space, but NONE of the solutions I’ve found worked for me.

    I need it to run on OpenCV, but as far as I found, it will never run on OpenCV if it is not running on QuickPlayer, so, I think I might start fixing the QuickPlayer issue. The generated video is a screen record, and it works perfectly on VLC.

    Configurations used :

    MacOs High Sierra
    ffmpeg version 4.0 (installed with: --with-opus --with-libvpx )
    opencv version 3.4.1_4
    Homebrew 1.6.2 (used to install ffmpeg and opencv)

    Command used to record the video :

    ffmpeg -f avfoundation -video_size 1980x1140 -framerate 30 -i '1'
    -vcodec libx264 -preset ultrafast -an -qp 0 -pix_fmt yuv444p video.mkv -y

    Note1 : I already tried to change -pix_fmt to yuv420p

    Note2 : I already tried to add -vf scale=640:-2,format=yuv420p

    Note3 : I already tried to re-install OpenCV --with-ffmpeg

    Note4 : I tried mkv, mp4, avi. I really don’t care about the extension, I just need it to work.

    Note5 : I need it to be a cross-plataform solution, as far as I read ffmpeg should work in all OS, but first I am trying to fix on mac and then I will check others...

    Any ideas ? Maybe a missing flag ? A missing library ?

    @Gyan suggested me to change the qp flag to a number higher than 0, I did it

    ffmpeg -f avfoundation -video_size 1980x1140 -framerate 30 -i '1' -vcodec libx264 -preset ultrafast -an -qp 2 -pix_fmt yuv444p video_test.mp4 -y

    This is my output :

    ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
     built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-ffplay --enable-frei0r --enable-libass --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-librtmp --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/2.3.0/include/openjpeg-2.3 --enable-nonfree
     libavutil      56. 14.100 / 56. 14.100
     libavcodec     58. 18.100 / 58. 18.100
     libavformat    58. 12.100 / 58. 12.100
     libavdevice    58.  3.100 / 58.  3.100
     libavfilter     7. 16.100 /  7. 16.100
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  1.100 /  5.  1.100
     libswresample   3.  1.100 /  3.  1.100
     libpostproc    55.  1.100 / 55.  1.100
    [avfoundation @ 0x7fbb8f80ee00] Selected pixel format (yuv420p) is not supported by the input device.
    [avfoundation @ 0x7fbb8f80ee00] Supported pixel formats:
    [avfoundation @ 0x7fbb8f80ee00]   uyvy422
    [avfoundation @ 0x7fbb8f80ee00]   yuyv422
    [avfoundation @ 0x7fbb8f80ee00]   nv12
    [avfoundation @ 0x7fbb8f80ee00]   0rgb
    [avfoundation @ 0x7fbb8f80ee00]   bgr0
    [avfoundation @ 0x7fbb8f80ee00] Overriding selected pixel format to use uyvy422 instead.
    [avfoundation @ 0x7fbb8f80ee00] Stream #0: not enough frames to estimate rate; consider increasing probesize
    Input #0, avfoundation, from '1':
     Duration: N/A, start: 118955.291667, bitrate: N/A
       Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 1440x900, 1000k tbr, 1000k tbn, 1000k tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    [mp4 @ 0x7fbb8f87d200] Frame rate very high for a muxer not efficiently supporting it.
    Please consider specifying a lower framerate, a different muxer or -vsync 2
    [libx264 @ 0x7fbb8f87f600] MB rate (5130000000) > level limit (16711680)
    [libx264 @ 0x7fbb8f87f600] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 0x7fbb8f87f600] profile High 4:4:4 Predictive, level 6.2, 4:4:4 8-bit
    [libx264 @ 0x7fbb8f87f600] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=6 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=cqp mbtree=0 qp=2 ip_ratio=1.40 aq=0
    Output #0, mp4, to 'video_test.mp4':
     Metadata:
       encoder         : Lavf58.12.100
       Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv444p, 1440x900, q=-1--1, 1000k fps, 1000k tbn, 1000k tbc
       Metadata:
         encoder         : Lavc58.18.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1