Recherche avancée

Médias (0)

Mot : - Tags -/alertes

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

Autres articles (13)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

Sur d’autres sites (4031)

  • Timestamp not printed on thumbnails with FFMPEG

    26 août 2021, par mlatelcom

    I have a script using FFMPEG to generate an image with tiled thumbnails every 45 seconds for several videos on a given folder. The images are named with the name of the video it was generated from. It generates the thumbnails for each video but it does not print the time stamps on them. The path to the font file is correct ; so I don't know where the issue is. I'm using the script in Fedora Linux.

    


    Here is the FFMPEG command line code on the script :

    


     ffmpeg -ss 00:00:05 -i test.mp4 -loglevel 40 -frames 1 -bt 20M -vf "drawtext=fontfile=/usr/share/fonts/open-sans/OpenSans-Light.ttf:timecode='00\\:00\\:00\\:00':r=30:fontcolor=white:x=220:y=220:box=1:boxcolor=black@0.5,select=not(mod(n\,1350)),scale=200:150,tile=15x48" -n "${name}.png"


    


    and this is the console output

    


    ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11 (GCC)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags=' -I/usr/include/rav1e' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librav1e --enable-libsmbclient --enable-version3 --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-vapoursynth --enable-libvpx --enable-vulkan --enable-libglslang --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxml2 --enable-libzimg --enable-libzvbi --enable-lv2 --enable-avfilter --enable-avresample --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-lto --enable-libmfx --enable-runtime-cpudetect
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[h264 @ 0x56051b4b3cc0] Reinit context to 1280x720, pix_fmt: yuv420p
[mpegts @ 0x56051b4acc80] max_analyze_duration 5000000 reached at 5000000 microseconds st:0
Input #0, mpegts, from 'test.mp4':
  Duration: 00:04:57.02, start: 1.400000, bitrate: 2853 kb/s
  Program 1 
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
  Stream #0:0[0x100]: Video: h264 (Main), 1 reference frame ([27][0][0][0] / 0x001B), yuv420p(progressive, left), 1280x720 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn, 60 tbc
  Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 96 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> png (native))
Press [q] to stop, [?] for help
[h264 @ 0x56051ba69e00] Reinit context to 1280x720, pix_fmt: yuv420p
[Parsed_scale_2 @ 0x56051b5953c0] w:200 h:150 flags:'bicubic' interl:0
[graph 0 input from stream 0:0 @ 0x56051b725ac0] w:1280 h:720 pixfmt:yuv420p tb:1/90000 fr:30/1 sar:1/1
[Parsed_scale_2 @ 0x56051b5953c0] w:1280 h:720 fmt:yuv420p sar:1/1 -> w:200 h:150 fmt:rgb24 sar:4/3 flags:0x4
Output #0, image2, to '.png':
  Metadata:
    encoder         : Lavf58.76.100
  Stream #0:0: Video: png, 1 reference frame, rgb24(pc, progressive, left), 3000x7200 (0x0) [SAR 4:3 DAR 5:9], q=2-31, 200 kb/s, 0.04 fps, 0.04 tbn
    Metadata:
      encoder         : Lavc58.134.100 png
No more output streams to write to, finishing.00.00 bitrate=N/A speed=   0x    
[AVIOContext @ 0x56051b84c8c0] Statistics: 0 seeks, 2 writeouts
frame=    1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:24.00 bitrate=N/A speed=0.47x    
video:465kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (test.mp4):
  Input stream #0:0 (video): 8761 packets read (96159422 bytes); 8760 frames decoded; 
  Input stream #0:1 (audio): 0 packets read (0 bytes); 
  Total: 8761 packets (96159422 bytes) demuxed
Output file #0 (.png):
  Output stream #0:0 (video): 1 frames encoded; 1 packets muxed (476224 bytes); 
  Total: 1 packets (476224 bytes) muxed
[AVIOContext @ 0x56051b4b5d00] Statistics: 107090352 bytes read, 18 seeks


    


  • FFmpeg converting to .265 corrupts videos

    25 juin 2022, par Alfa

    I'm trying to convert and compress videos in React Native using FFmpegKit, what is strange is it is very slow regardless of the preset I use, Also, no matter how big the input video is, it always produces a video less than 1MB that is corrupt.
This is my first time using FFmpeg, I'm using it due to the lack of good video compressing libraries on React Native.

    


    My command looks like this :

    


    const getFFmpegCommand = (input: string, output: string) => {
  const scale = `"scale='if(gte(iw,ih),min(720,iw),-2):if(lt(iw,ih),min(720,ih),-2)'"`;
  const preset = '-preset veryfast ';
  const ffmpegCommand = `-i ${input} -y -crf 28 -vf ${scale} ${preset} -c:v libx265 ${output}`;
  return ffmpegCommand;
};


    


    This is my log output

    


        ffmpeg version v4.5-dev-3393-g30322ebe3c
    LOG   Copyright (c) 2000-2021 the FFmpeg developers
    LOG  
    LOG    built with Android (7155654, based on r399163b1) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)
    LOG    configuration: --cross-prefix=i686-linux-android- --sysroot=/files/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/storage/light/projects/ffmpeg-kit/prebuilt/android-x86/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=i686 --cpu=i686 --target-os=android --disable-neon --disable-asm --disable-inline-asm --ar=i686-linux-android-ar --cc=i686-linux-android24-clang --cxx=i686-linux-android24-clang++ --ranlib=i686-linux-android-ranlib --strip=i686-linux-android-strip --nm=i686-linux-android-nm --extra-libs='-L/storage/light/projects/ffmpeg-kit/prebuilt/android-x86/cpu-features/lib -lndk_compat' --disable-autodetect --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --disable-static --enable-shared --enable-pthreads --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libx264 --enable-libxvid --enable-libx265 --enable-libvidstab --disable-sdl2 --disable-openssl --enable-zlib --enable-mediacodec --enable-gpl
    LOG    libavutil      57. 13.100 / 57. 13.100
    LOG    libavcodec     59. 15.102 / 59. 15.102
    LOG    libavformat    59. 10.100 / 59. 10.100
    LOG    libavdevice    59.  1.100 / 59.  1.100
    LOG    libavfilter     8. 21.100 /  8. 21.100
    LOG    libswscale      6.  1.102 /  6.  1.102
    LOG    libswresample   4.  0.100 /  4.  0.100
    LOG  Guessed Channel Layout for Input Stream #0.1 : mono
    LOG  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file:///data/user/0/com.orbis.cybersight/files/95fdb965-5074-421f-b6b0-9e67332550ca/VID_20220625_211041.mp4':
    LOG    Metadata:
    LOG      major_brand     :
    LOG  mp42
    LOG  
    LOG      minor_version   :
    LOG  0
    LOG  
    LOG      compatible_brands:
    LOG  isommp42
    LOG  
    LOG      creation_time   :
    LOG  2022-06-25T19:11:17.000000Z
    LOG  
    LOG      location        :
    LOG  +37.4234-122.0839/
    LOG  
    LOG      location-eng    :
    LOG  +37.4234-122.0839/
    LOG  
    LOG      com.android.version:
    LOG  11
    LOG  
    LOG    Duration:
    LOG  00:00:33.68
    LOG  , start:
    LOG  0.000000
    LOG  , bitrate:
    LOG  8302 kb/s
    LOG  
    LOG    Stream #0:0
    LOG  [0x1]
    LOG  (eng)
    LOG  : Video: h264 (avc1 / 0x31637661), yuv420p(tv, gbr/reserved/reserved, progressive), 1280x720, 9007 kb/s
    LOG  , SAR 1:1 DAR 16:9
    LOG  ,
    LOG  22.69 fps,
    LOG  90k tbr,
    LOG  90k tbn
    LOG   (default)
    LOG  
    LOG      Metadata:
    LOG        creation_time   :
    LOG  2022-06-25T19:11:17.000000Z
    LOG  
    LOG        handler_name    :
    LOG  VideoHandle
    LOG  
    LOG        vendor_id       :
    LOG  [0][0][0][0]
    LOG  
    LOG      Side data:
    LOG  
    LOG  displaymatrix: rotation of -90.00 degrees
    LOG  
    LOG    Stream #0:1
    LOG  [0x2]
    LOG  (eng)
    LOG  : Audio: amr_nb (samr / 0x726D6173), 8000 Hz, mono, fltp, 12 kb/s
    LOG   (default)
    LOG  
    LOG      Metadata:
    LOG        creation_time   :
    LOG  2022-06-25T19:11:17.000000Z
    LOG  
    LOG        handler_name    :
    LOG  SoundHandle
    LOG  
    LOG        vendor_id       :
    LOG  [0][0][0][0]
    LOG  
    LOG  [h264 @ 0xebd4c280] The "sub_text_format" option is deprecated: Deprecated, does nothing
    LOG  [amrnb @ 0xebd4dc00] The "sub_text_format" option is deprecated: Deprecated, does nothing
    LOG  Stream mapping:
    LOG    Stream #0:0 -> #0:0
    LOG   (h264 (native) -> hevc (libx265))
    LOG  
    LOG    Stream #0:1 -> #0:1
    LOG   (amr_nb (amrnb) -> aac (native))
    LOG  
    LOG  Press [q] to stop, [?] for help
    LOG  [aac @ 0xebd4a5d0] Too many bits 8832.000000 > 6144 per frame requested, clamping to max
    LOG  Output #0, mp4, to '/storage/emulated/0/Android/data/com.orbis.cybersight/files/3dfb9ef6-6cb3-4adf-9777-8fb4c7762dc7.mp4':
    LOG    Metadata:
    LOG      major_brand     :
    LOG  mp42
    LOG  
    LOG      minor_version   :
    LOG  0
    LOG  
    LOG      compatible_brands:
    LOG  isommp42
    LOG  
    LOG      com.android.version:
    LOG  11
    LOG  
    LOG      location        :
    LOG  +37.4234-122.0839/
    LOG  
    LOG      location-eng    :
    LOG  +37.4234-122.0839/
    LOG  
    LOG      encoder         :
    LOG  Lavf59.10.100
    LOG  
    LOG    Stream #0:0
    LOG  (eng)
    LOG  : Video: hevc (hev1 / 0x31766568), yuv420p(tv, gbr/reserved/reserved, progressive), 720x1280 [SAR 1:1 DAR 9:16], q=2-31
    LOG  ,
    LOG  22.69 fps,
    LOG  2502k tbn
    LOG   (default)
    LOG  
    LOG      Metadata:
    LOG        creation_time   :
    LOG  2022-06-25T19:11:17.000000Z
    LOG  
    LOG        handler_name    :
    LOG  VideoHandle
    LOG  
    LOG        vendor_id       :
    LOG  [0][0][0][0]
    LOG  
    LOG        encoder         :
    LOG  Lavc59.15.102 libx265
    LOG  
    LOG      Side data:
    LOG  
    LOG  cpb:
    LOG  bitrate max/min/avg: 0/0/0 buffer size: 0
    LOG  vbv_delay: N/A
    LOG  
    LOG  
    LOG  displaymatrix: rotation of -0.00 degrees
    LOG  
    LOG    Stream #0:1
    LOG  (eng)
    LOG  : Audio: aac (mp4a / 0x6134706D), 8000 Hz, mono, fltp, 48 kb/s
    LOG   (default)
    LOG  
    LOG      Metadata:
    LOG        creation_time   :
    LOG  2022-06-25T19:11:17.000000Z
    LOG  
    LOG        handler_name    :
    LOG  SoundHandle
    LOG  
    LOG        vendor_id       :
    LOG  [0][0][0][0]
    LOG  
    LOG        encoder         :
    LOG  Lavc59.15.102 aac


    


  • python subprocess ffmpeg return code = 69

    13 juin 2023, par Tim Chen

    I try to call ffmpeg through the subprocess.run(['ffmpeg', '-i', file_name, output_file_name], capture_output=True, text=True) command in python to convert the audio file incoming from the front end to wav format file. The backend code is as follows, using python+fastapi :

    


    @app.post("/api/upload/convert")
async def convert_upload_file(request: Request, file: UploadFile = File(...)):
    token = uuid.uuid4().hex
    tmpFileName = os.path.join(os.path.dirname(__file__), token)
    with open(tmpFileName, "wb") as buffer:
        buffer.write(await file.read())
    await file.seek(0)
    output_path = tmpFileName + '-output.wav'
    command = ['ffmpeg', '-i', tmpFileName, output_path]
    result = subprocess.run(command, capture_output=True, text=True)


    


    This code usually works, but there are some scenarios where it doesn't work. The audio file is recorded by js code (specifically navigator.mediaDevices.getUserMedia({audio: true})).
The code of the audio recorded in windows chrome can run normally and get the converted wav file, but the audio recorded from ios15 safari for more than 3 seconds cannot be converted, prompting returncode=69. The error message is as follows :

    


    CompletedProcess(args=['ffmpeg', '-i', '5cfb52c503a646bda0f422b517c8014a', '5cfb52c503a646bda0f422b517c8014a-output.wav'], returncode=69, stdout='', stderr="
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --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-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil      56. 70.100 / 56. 70.100
libavcodec     58.134.100 / 58.134.100
libavformat    58. 76.100 / 58. 76.100
libavdevice    58. 13.100 / 58. 13.100
libavfilter     7.110.100 /  7.110.100
libswscale      5.  9.100 /  5.  9.100
libswresample   3.  9.100 /  3.  9.100
libpostproc    55.  9.100 / 55.  9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '5cfb52c503a646bda0f422b517c8014a':
  Metadata:
    major_brand     : iso5
    minor_version   : 1
    compatible_brands: isomiso5hlsf
    creation_time   : 2023-06-11T16:36:53.000000Z
  Duration: 00:00:07.06, start: 0.000000, bitrate: 187 kb/s
  Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 184 kb/s (default)
    Metadata:
      creation_time   : 2023-06-11T16:36:53.000000Z
      handler_name    : Core Media Audio
      vendor_id       : [0][0][0][0]
Stream mapping:
  Stream #0:0 -> #0:0 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to '5cfb52c503a646bda0f422b517c8014a-output.wav':
  Metadata:
    major_brand     : iso5
    minor_version   : 1
    compatible_brands: isomiso5hlsf
    ISFT            : Lavf58.76.100
  Stream #0:0(und): Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, mono, s16, 768 kb/s (default)
    Metadata:
      creation_time   : 2023-06-11T16:36:53.000000Z
      handler_name    : Core Media Audio
      vendor_id       : [0][0][0][0]
      encoder         : Lavc58.134.100 pcm_s16le
size=       2kB time=00:00:00.00 bitrate=N/A speed=N/A    
[aac @ 0x55f1f8f19fc0] Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 0x55f1f8f19fc0] Too large remapped id is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[aac @ 0x55f1f8f19fc0] If you want to help, upload a sample of this file to https://streams.videolan.org/upload/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
Error while decoding stream #0:0: Not yet implemented in FFmpeg, patches welcome
[aac @ 0x55f1f8f19fc0] Multiple frames in a packet.
[aac @ 0x55f1f8f19fc0] Reserved bit set.
[aac @ 0x55f1f8f19fc0] Number of bands (18) exceeds limit (13).
Error while decoding stream #0:0: Invalid data found when processing input
[aac @ 0x55f1f8f19fc0] Reserved bit set.
[aac @ 0x55f1f8f19fc0] Prediction is not allowed in AAC-LC.
Error while decoding stream #0:0: Invalid data found when processing input
[aac @ 0x55f1f8f19fc0] Reserved bit set.


    


    For the abnormal code, I tried to execute ffmpeg -i input output.wav after fastapi handle request on the command line and subprocess.run(['ffmpeg', '-i', file_name, output_path], capture_output =True, text=True), all succeeded, which means that the final file must be normal, otherwise the subsequent verification work will get the same error.

    


    This confuses me, is there some information I'm missing ?