Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (111)

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

  • Les notifications de la ferme

    1er décembre 2010, par

    Afin d’assurer une gestion correcte de la ferme, il est nécessaire de notifier plusieurs choses lors d’actions spécifiques à la fois à l’utilisateur mais également à l’ensemble des administrateurs de la ferme.
    Les notifications de changement de statut
    Lors d’un changement de statut d’une instance, l’ensemble des administrateurs de la ferme doivent être notifiés de cette modification ainsi que l’utilisateur administrateur de l’instance.
    À la demande d’un canal
    Passage au statut "publie"
    Passage au (...)

  • Initialisation de MediaSPIP (préconfiguration)

    20 février 2010, par

    Lors de l’installation de MediaSPIP, celui-ci est préconfiguré pour les usages les plus fréquents.
    Cette préconfiguration est réalisée par un plugin activé par défaut et non désactivable appelé MediaSPIP Init.
    Ce plugin sert à préconfigurer de manière correcte chaque instance de MediaSPIP. Il doit donc être placé dans le dossier plugins-dist/ du site ou de la ferme pour être installé par défaut avant de pouvoir utiliser le site.
    Dans un premier temps il active ou désactive des options de SPIP qui ne le (...)

Sur d’autres sites (7370)

  • ffmpeg - less frames getting extracted than expected

    20 juin 2021, par Vrajesh Doshi
    


    ffmpeg -i instagram.mp4 -vf fps=29.97 thumb%06d.jpg -hide_banner

    
 


    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'instagram.mp4' : Metadata :
 major_brand : isom
 minor_version : 512
 compatible_brands : isomiso2avc1mp41
 encoder : Lavf55.19.104 Duration : 00:00:13.61, start : 0.000000, bitrate : 1163 kb/s
 Stream #0:0(und) : Video : h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x640 [SAR 1:1 DAR 1:1], 1099 kb/s, 29.97 fps,
 29.97 tbr, 11988 tbn, 59.94 tbc (default)
 Metadata :
 handler_name : VideoHandler
 Stream #0:1(und) : Audio : aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 64 kb/s (default)
 Metadata :
 handler_name : SoundHandler Stream mapping : Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native)) Press [q] to stop, [?] for help [swscaler @ 0x55b2b53cf440] deprecated pixel format used, make sure
 you did set range correctly Output #0, image2, to 'thumb%06d.jpg' :
    
 Metadata :
 major_brand : isom
 minor_version : 512
 compatible_brands : isomiso2avc1mp41
 encoder : Lavf57.83.100
 Stream #0:0(und) : Video : mjpeg, yuvj420p(pc), 640x640 [SAR 1:1 DAR 1:1], q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc (default)
 Metadata :
 handler_name : VideoHandler
 encoder : Lavc57.107.100 mjpeg
 Side data :
 cpb : bitrate max/min/avg : 0/0/200000 buffer size : 0 vbv_delay : -1 frame= 405 fps=231 q=24.8 Lsize=N/A time=00:00:13.51 bitrate=N/A speed=7.72x video:5961kB audio:0kB subtitle:0kB other streams:0kB
 global headers:0kB muxing overhead : unknown

    


    



    The video duration is 13.61 seconds and frame rate is 29.97. So I was expecting 13.61 * 29.97 = 407.8917 i.e. 407 frames. But have got 405 frames. I am new to ffmpeg, need help to correctly get all 407 frames.

    



    I had also tried following command,

    



    ffmpeg -i instagram.mp4 thumb%06d.jpg -hide_banner


    



    but the output was same 405 frames.

    



    Possibly the start 2 frames are missing.

    



    I need to display the frames generated in the base video timeline. And on clicking on the frame I need to exactly seek the video to the frame position using HTML5 currentTime. Since the first 2 frames are not getting available, exact mapping is not getting possible.

    



    Please guide.

    


  • Why does Nvenc Encoder improve decoding speed ?

    22 juillet 2019, par Khoa Tran

    I am trying to improve the speed of decoding h264 video to mp4 video using Ffmpeg in c++. I have found a cli command that can do that but I still do not fully understand the command to reproduce it in c++ so I hope you guys can give me an explanation.

    The command that I found uses h264_nvenc encoder to improve the speed using GPU. However, I cannot understand why an h264 encoder would improve the speed of decoding h264 video (or maybe encoding to mp4 frame). Can anyone please give me a detailed explanation ?

    Here is the cli command that I found :

    ffmpeg -hwaccel cuvid -r 120 -i  -c:v h264_nvenc -preset fast -b:v 8M -vf scale=960:1080 -pix_fmt yuv420p  -y

    Thanks

    Edited :
    Log of command with option "-c:v h264_nvenc"

    C:\Users\Shared\GolfTec\test>ffmpeg.exe -hwaccel cuvid -r 120 -i C:\\Users\\Shared\\GolfTec\\test\\raw0.h264 -c:v h264_nvenc -preset medium -b:v 8M -vf scale=960:1080 -pix_fmt yuv420p C:\\Users\\Shared\\GolfTec\\test\\video0.mp4 -y
    ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 7.2.0 (GCC)
     configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
    --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy
    --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
    --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis
    --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc
    --enable-dxva2 --enable-avisynth --enable-libmfx
     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
     libswscale      4.  8.100 /  4.  8.100
     libswresample   2.  9.100 /  2.  9.100
     libpostproc    54.  7.100 / 54.  7.100
    [h264 @ 0000027ecb2a6700] Stream #0: not enough frames to estimate rate; consider increasing probesize
    Input #0, h264, from 'C:\\Users\\Shared\\GolfTec\\test\\raw0.h264':
     Duration: N/A, bitrate: N/A
       Stream #0:0: Video: h264 (CAVLC 4:4:4), yuv444p(progressive), 960x1080, 25 fps, 25 tbr, 1200k tbn, 50 tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_nvenc))
    Press [q] to stop, [?] for help
    Output #0, mp4, to 'C:\\Users\\Shared\\GolfTec\\test\\video0.mp4':
     Metadata:
       encoder         : Lavf57.83.100
       Stream #0:0: Video: h264 (h264_nvenc) (Main) (avc1 / 0x31637661), yuv420p, 960x1080, q=-1--1, 8000 kb/s, 120 fps, 15360 tbn, 120 tbc
       Metadata:
         encoder         : Lavc57.107.100 h264_nvenc
       Side data:
         cpb: bitrate max/min/avg: 0/0/8000000 buffer size: 16000000 vbv_delay: -1
    frame=  269 fps=261 q=25.0 Lsize=    2551kB time=00:00:02.23 bitrate=9356.5kbits/s speed=2.17x
    video:2549kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.074325%

    Log of command without option "-c:v h264_nvenc"

    C:\Users\Shared\GolfTec\test>ffmpeg.exe -hwaccel cuvid -r 120 -i C:\\Users\\Shared\\GolfTec\\test\\raw0.h264 -preset medium -b:v 8M -vf scale=960:1080 -pix_fmt yuv420p C:\\Users\\Shared\\GolfTec\\test\\video0.mp4 -y
    ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 7.2.0 (GCC)
     configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
     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
     libswscale      4.  8.100 /  4.  8.100
     libswresample   2.  9.100 /  2.  9.100
     libpostproc    54.  7.100 / 54.  7.100
    [h264 @ 0000021e33556640] Stream #0: not enough frames to estimate rate; consider increasing probesize
    Input #0, h264, from 'C:\\Users\\Shared\\GolfTec\\test\\raw0.h264':
     Duration: N/A, bitrate: N/A
       Stream #0:0: Video: h264 (CAVLC 4:4:4), yuv444p(progressive), 960x1080, 25 fps, 25 tbr, 1200k tbn, 50 tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    [libx264 @ 0000021e335589a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
    [libx264 @ 0000021e335589a0] profile High, level 4.2
    [libx264 @ 0000021e335589a0] 264 - core 152 r2851 ba24899 - 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=abr mbtree=1 bitrate=8000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to 'C:\\Users\\Shared\\GolfTec\\test\\video0.mp4':
     Metadata:
       encoder         : Lavf57.83.100
       Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 960x1080, q=-1--1, 8000 kb/s, 120 fps, 15360 tbn, 120 tbc
       Metadata:
         encoder         : Lavc57.107.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/8000000 buffer size: 0 vbv_delay: -1
    frame=  269 fps= 39 q=-1.0 Lsize=    2279kB time=00:00:02.21 bitrate=8423.8kbits/s speed=0.32x
    video:2277kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.119200%
    [libx264 @ 0000021e335589a0] frame I:2     Avg QP:25.09  size: 16508
    [libx264 @ 0000021e335589a0] frame P:193   Avg QP:23.94  size:  9094
    [libx264 @ 0000021e335589a0] frame B:74    Avg QP:23.92  size:  7332
    [libx264 @ 0000021e335589a0] consecutive B-frames: 62.8%  1.5%  0.0% 35.7%
    [libx264 @ 0000021e335589a0] mb I  I16..4: 38.2% 54.3%  7.6%
    [libx264 @ 0000021e335589a0] mb P  I16..4:  9.2% 11.8%  0.8%  P16..4: 46.5%  3.4%  3.8%  0.0%  0.0%    skip:24.5%
    [libx264 @ 0000021e335589a0] mb B  I16..4:  4.3%  3.7%  0.2%  B16..8: 35.0%  1.5%  0.2%  direct: 9.5%  skip:45.5%  L0:56.6% L1:40.9% BI: 2.5%
    [libx264 @ 0000021e335589a0] final ratefactor: 19.31
    [libx264 @ 0000021e335589a0] 8x8 transform intra:53.1% inter:88.1%
    [libx264 @ 0000021e335589a0] coded y,uvDC,uvAC intra: 22.0% 41.2% 4.5% inter: 12.8% 39.4% 0.0%
    [libx264 @ 0000021e335589a0] i16 v,h,dc,p: 18% 32% 19% 31%
    [libx264 @ 0000021e335589a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 17% 54%  2%  3%  3%  4%  1%  2%
    [libx264 @ 0000021e335589a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11%  9% 63%  3%  4%  3%  3%  2%  2%
    [libx264 @ 0000021e335589a0] i8c dc,h,v,p: 63% 23% 13%  1%
    [libx264 @ 0000021e335589a0] Weighted P-Frames: Y:86.0% UV:64.8%
    [libx264 @ 0000021e335589a0] ref P L0: 53.6%  8.3% 17.1% 11.4%  9.6%
    [libx264 @ 0000021e335589a0] ref B L0: 58.9% 14.4% 26.6%
    [libx264 @ 0000021e335589a0] ref B L1: 84.8% 15.2%
    [libx264 @ 0000021e335589a0] kb/s:8317.64
  • Working Directory : null Environment : null

    23 avril 2020, par Mert

    I am trying to use ffmpeg.so on Android I am getting Working Directory : null Environment : null error.

    



    try {
    Process p = Runtime.getRuntime().exec("/data/data/com.example.foo/files/ffmpeg -f image2 -i "
+ Environment.getExternalStorageDirectory().getAbsolutePath() + "/img/b%d.jpg " 
+ Environment.getExternalStorageDirectory().getAbsolutePath() + "/DCIM/Camera/a444.mp4");   
} catch (IOException e) {
    e.printStackTrace();
}


    



    ERROR LOG

    



    04-09 01:50:45.683: I/Adreno-EGL(18393): : EGL 1.4 QUALCOMM Build: I0404c4692afb8623f95c43aeb6d5e13ed4b30ddbDate: 11/06/13
04-09 01:50:45.713: D/OpenGLRenderer(18393): Enabling debug mode 0
04-09 01:53:56.487: D/dalvikvm(18551): Trying to load lib /data/app-lib/com.example.sodeneme-1/libffmpeg.so 0x423d7d00
04-09 01:53:56.487: D/dalvikvm(18551): Added shared lib /data/app-lib/com.example.sodeneme-1/libffmpeg.so 0x423d7d00
04-09 01:53:56.487: D/dalvikvm(18551): No JNI_OnLoad found in /data/app-lib/com.example.sodeneme-1/libffmpeg.so 0x423d7d00, skipping init
04-09 01:53:56.537: W/System.err(18551): java.io.IOException: Error running exec(). Command: [/data/data/com.example.sodeneme/files/ffmpeg, -f, image2, -i, /storage/emulated/0/img/b%d.jpg, /storage/emulated/0/DCIM/Camera/a444.mp4] Working Directory: null Environment: null
04-09 01:53:56.537: W/System.err(18551):    at java.lang.ProcessManager.exec(ProcessManager.java:211)
04-09 01:53:56.537: W/System.err(18551):    at java.lang.Runtime.exec(Runtime.java:173)
04-09 01:53:56.537: W/System.err(18551):    at java.lang.Runtime.exec(Runtime.java:246)
04-09 01:53:56.537: W/System.err(18551):    at java.lang.Runtime.exec(Runtime.java:189)
04-09 01:53:56.537: W/System.err(18551):    at com.example.sodeneme.MainActivity.onCreate(MainActivity.java:40)
04-09 01:53:56.537: W/System.err(18551):    at android.app.Activity.performCreate(Activity.java:5231)
04-09 01:53:56.537: W/System.err(18551):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
04-09 01:53:56.537: W/System.err(18551):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
04-09 01:53:56.537: W/System.err(18551):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
04-09 01:53:56.537: W/System.err(18551):    at android.app.ActivityThread.access$800(ActivityThread.java:135)
04-09 01:53:56.537: W/System.err(18551):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
04-09 01:53:56.537: W/System.err(18551):    at android.os.Handler.dispatchMessage(Handler.java:102)
04-09 01:53:56.537: W/System.err(18551):    at android.os.Looper.loop(Looper.java:136)
04-09 01:53:56.537: W/System.err(18551):    at android.app.ActivityThread.main(ActivityThread.java:5017)
04-09 01:53:56.537: W/System.err(18551):    at java.lang.reflect.Method.invokeNative(Native Method)
04-09 01:53:56.537: W/System.err(18551):    at java.lang.reflect.Method.invoke(Method.java:515)
04-09 01:53:56.537: W/System.err(18551):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
04-09 01:53:56.537: W/System.err(18551):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
04-09 01:53:56.537: W/System.err(18551):    at dalvik.system.NativeStart.main(Native Method)
04-09 01:53:56.547: W/System.err(18551): Caused by: java.io.IOException: No such file or directory
04-09 01:53:56.547: W/System.err(18551):    at java.lang.ProcessManager.exec(Native Method)
04-09 01:53:56.547: W/System.err(18551):    at java.lang.ProcessManager.exec(ProcessManager.java:209)
04-09 01:53:56.547: W/System.err(18551):    ... 18 more
04-09 01:53:56.577: I/Adreno-EGL(18551): : EGL 1.4 QUALCOMM Build: I0404c4692afb8623f95c43aeb6d5e13ed4b30ddbDate: 11/06/13
04-09 01:53:56.607: D/OpenGLRenderer(18551): Enabling debug mode 0


    



    PERMISSIONS