Recherche avancée

Médias (2)

Mot : - Tags -/plugins

Autres articles (31)

  • 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 ;

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (7530)

  • FFMPEG : how to create a "title slide" for 3 seconds before a video [closed]

    15 mars 2024, par ashay

    I'm trying to make a lecture video to put online. I have the video itself, and I have a title slide that I'd like to play for 3 seconds before the main video.

    


    I tried using ffmpeg to (1) create a 3 second long video from the title slide and (2) concat the two videos together.

    


    I'm having issues concatenating the videos together — when I do so, the resulting video is much longer than it should be. When I look online, others have similar problems — and this seems to occur when the parameters of the two videos do not match perfectly.

    


    I'd prefer to do this without re-encoding the main video — and it seems this should be possible because I should be able to control what parameters are set for the "lecture slide video".

    


    Here are the commands I've run.
The main video has framerate 25, resolution 1920x1080, and an audio stream at #0:0 and a video stream at #0:1 (according to ffmpeg -i [video].

    


    To create the video of the title slide, I ran ffmpeg -framerate 25 -i lec01_title.png -t 3 -c:v libx264 -x265-params lossless=1 -pix_fmt yuvj420p -vf scale=1920:1080 lec01_title.mp4 -f lavfi -i anullsrc -c:a aac -shortest.
Then to reorder the streams to match the main video, I ran ffmpeg -i lec01_title.mp4 -map 0:a -map 0:v -c:v copy -c:a copy lec01_title_matched.mp4.

    


    Then to concatenate the two files together, I created a text file "concat_list" with :
file 'lec01_title_matched.mp4' file 'lec01.mp4', and ran the command ffmpeg -f concat -safe 0 -i concat_list.txt -c copy -movflags +faststart output.mp4.

    


    The main video is 53 minutes long, but the final output video after concatenating is 1 hour and 43 minutes long.

    


    I'm looking for advice for how to create the "lecture title video" properly to match the parameters of the second video so that I can concatenate them without problems.

    


    Here's the output of ffmpeg -i lec01.mp4 :

    


    ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
  built with Apple clang version 15.0.0 (clang-1500.1.0.2.5)
  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/6.1.1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'dcai_lec01.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : 2-190-wideshot
    encoder         : Lavf60.16.100
  Duration: 00:47:39.08, start: 0.000000, bitrate: 1435 kb/s
  Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 96000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 1298 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
      encoder         : Lavc60.31.102 libx264


    


    Described above in detail.

    


  • Can't import moviepy due to missing ffmpex.exe

    9 mars, par SilentGrove_99

    I was trying to create an application with python using the moviepy library. I installed it using :

    


    pip install moviepy


    


    I found this from a MoviePy crash-course :

    


    # Import everything needed to edit video clips
from moviepy.editor import *
# or 
from moviepy import *  # moviepy v2 after removal of editor


    


    After trying to run this line i get this error :

    


    Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32     bit (Intel)] on win32&#xA;Type "help", "copyright", "credits" or "license" for more information.&#xA;>>> # Import everything needed to edit video clips&#xA;... from moviepy.editor import *&#xA;Traceback (most recent call last):&#xA;  File "<stdin>", line 2, in <module>&#xA;  File "C:\Python27\lib\site-packages\moviepy\editor.py", line 22, in <module>&#xA;    from .video.io.VideoFileClip import VideoFileClip&#xA;  File "C:\Python27\lib\site-packages\moviepy\video\io\VideoFileClip.py", line 3, in <module>&#xA;    from moviepy.video.VideoClip import VideoClip&#xA;  File "C:\Python27\lib\site-packages\moviepy\video\VideoClip.py", line 20, in <module>&#xA;    from .io.ffmpeg_writer import ffmpeg_write_image, ffmpeg_write_video&#xA;  File "C:\Python27\lib\site-packages\moviepy\video\io\ffmpeg_writer.py", line 15, in <module>&#xA;    from moviepy.config import get_setting&#xA;  File "C:\Python27\lib\site-packages\moviepy\config.py", line 38, in <module>&#xA;    FFMPEG_BINARY = get_exe()&#xA;  File "C:\Python27\lib\site-packages\imageio\plugins\ffmpeg.py", line 86, in get_exe&#xA;    raise NeedDownloadError(&#x27;Need ffmpeg exe. &#x27;&#xA;imageio.core.fetching.NeedDownloadError: Need ffmpeg exe. You can download it by calling:&#xA;  imageio.plugins.ffmpeg.download()&#xA;</module></module></module></module></module></module></stdin>

    &#xA;

    What is the problem here, and how can i fix it ?

    &#xA;

  • FFmpeg -ss parameter is the video duration, Output file is empty

    16 avril 2024, par noun nil

    The main function is to obtain the corresponding video frame based on the input seconds.Before processing, the duration of the video will be obtained to determine whether the input is within the duration range of the video. If so, the corresponding instruction will be executed.

    &#xA;

    > ffprobe input.mp4&#xA;  ...&#xA;  Duration: 00:00:28.05, start: 0.000000, bitrate: 1136 kb/s&#xA;

    &#xA;

    > ffmpeg -ss 00:00:28 -i input.mp4 -frames:v 1 output.png&#xA; ffmpeg version 7.0 Copyright (c) 2000-2024 the FFmpeg developers&#xA;  built with Apple clang version 15.0.0 (clang-1500.3.9.4)&#xA;  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.0 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags=&#x27;-Wl,-ld_classic&#x27; --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopenvino --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon&#xA;  libavutil      59.  8.100 / 59.  8.100&#xA;  libavcodec     61.  3.100 / 61.  3.100&#xA;  libavformat    61.  1.100 / 61.  1.100&#xA;  libavdevice    61.  1.100 / 61.  1.100&#xA;  libavfilter    10.  1.100 / 10.  1.100&#xA;  libswscale      8.  1.100 /  8.  1.100&#xA;  libswresample   5.  1.100 /  5.  1.100&#xA;  libpostproc    58.  1.100 / 58.  1.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;input.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    encoder         : Lavf58.29.100&#xA;    description     : Packed by Bilibili XCoder v2.0.2&#xA;  Duration: 00:00:28.05, start: 0.000000, bitrate: 1136 kb/s&#xA;  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 720x1280 [SAR 1:1 DAR 9:16], 1005 kb/s, 25.27 fps, 25.25 tbr, 16k tbn (default)&#xA;      Metadata:&#xA;        handler_name    : VideoHandler&#xA;        vendor_id       : [0][0][0][0]&#xA;  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)&#xA;      Metadata:&#xA;        handler_name    : SoundHandler&#xA;        vendor_id       : [0][0][0][0]&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 (native) -> png (native))&#xA;Press [q] to stop, [?] for help&#xA;[swscaler @ 0x1187a0000] [swscaler @ 0x110e48000] No accelerated colorspace conversion found from yuv420p to rgb24.&#xA;[swscaler @ 0x1187a0000] [swscaler @ 0x110e58000] No accelerated colorspace conversion found from yuv420p to rgb24.&#xA;[swscaler @ 0x1187a0000] [swscaler @ 0x110e68000] No accelerated colorspace conversion found from yuv420p to rgb24.&#xA;[swscaler @ 0x1187a0000] [swscaler @ 0x110e78000] No accelerated colorspace conversion found from yuv420p to rgb24.&#xA;[swscaler @ 0x1187a0000] [swscaler @ 0x110e88000] No accelerated colorspace conversion found from yuv420p to rgb24.&#xA;[swscaler @ 0x1187a0000] [swscaler @ 0x110e98000] No accelerated colorspace conversion found from yuv420p to rgb24.&#xA;[swscaler @ 0x1187a0000] [swscaler @ 0x110ea8000] No accelerated colorspace conversion found from yuv420p to rgb24.&#xA;[swscaler @ 0x1187a0000] [swscaler @ 0x110eb8000] No accelerated colorspace conversion found from yuv420p to rgb24.&#xA;[swscaler @ 0x1187a0000] [swscaler @ 0x110ec8000] No accelerated colorspace conversion found from yuv420p to rgb24.&#xA;[vost#0:0/png @ 0x12ce06840] No filtered frames for output stream, trying to initialize anyway.&#xA;Output #0, image2, to &#x27;output.png&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    description     : Packed by Bilibili XCoder v2.0.2&#xA;    encoder         : Lavf61.1.100&#xA;  Stream #0:0(und): Video: png, rgb24(progressive), 720x1280 [SAR 1:1 DAR 9:16], q=2-31, 200 kb/s, 25.25 fps, 16k tbn (default)&#xA;      Metadata:&#xA;        handler_name    : VideoHandler&#xA;        vendor_id       : [0][0][0][0]&#xA;        encoder         : Lavc61.3.100 png&#xA;[out#0/image2 @ 0x600000e983c0] video:0KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown&#xA;[out#0/image2 @ 0x600000e983c0] Output file is empty, nothing was encoded(check -ss / -t / -frames parameters if used)&#xA;frame=    0 fps=0.0 q=0.0 Lsize=N/A time=N/A bitrate=N/A speed=N/A    &#xA;&#xA;

    &#xA;

    -ss 00:00:28 within the video duration range, but still cannot obtain frames...

    &#xA;

    -ss 00:00:27 Can obtain video frames

    &#xA;