
Recherche avancée
Autres articles (57)
-
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Publier sur MédiaSpip
13 juin 2013Puis-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
Sur d’autres sites (8478)
-
How to return width and height of a video/image using ffprobe & batch
3 février 2017, par user780756I need to get the width and height of an image file using ffprobe and need to store it in variables using batch (Windows) so I can later use those values.
I tried to do this,
@echo off
for /f "tokens=1-2" %%i in ('ffprobe -v error -of flat=s=_ -select_streams v:0 -show_entries stream=width,height %1') do set W=%%i & set H=%%j
echo %W%
echo %H%But fails to execute with
Argument '_' provided as input filename, but 's' was already specified.
p.s. I also tried imagemagick identify in a similar way, but it seems that identify has a bug when returning height for GIF files
-
How can I detect which audio channels in a video file are silent using FFMPEG ? [migrated]
15 mars 2024, par kfankI need to be able to scan video files and report which audio tracks/channels are silent without knowing anything about the file's audio mapping ahead of time. I have tried this ffmpeg (v4.1) command on a file that contains 16 audio channels :


$ ffmpeg -i foo5.mxf -map 0:a -af astats -f null -
...
Stream mapping:
 Stream #0:1 -> #0:0 (pcm_s24be (native) -> pcm_s16le (native))
 Stream #0:2 -> #0:1 (pcm_s24be (native) -> pcm_s16le (native))
 Stream #0:3 -> #0:2 (pcm_s24be (native) -> pcm_s16le (native))
 Stream #0:4 -> #0:3 (pcm_s24be (native) -> pcm_s16le (native))
 Stream #0:5 -> #0:4 (pcm_s24be (native) -> pcm_s16le (native))
 Stream #0:6 -> #0:5 (pcm_s24be (native) -> pcm_s16le (native))
 Stream #0:7 -> #0:6 (pcm_s24be (native) -> pcm_s16le (native))
 Stream #0:8 -> #0:7 (pcm_s24be (native) -> pcm_s16le (native))
 Stream #0:9 -> #0:8 (pcm_s24be (native) -> pcm_s16le (native))
 Stream #0:10 -> #0:9 (pcm_s24be (native) -> pcm_s16le (native))
 Stream #0:11 -> #0:10 (pcm_s24be (native) -> pcm_s16le (native))
 Stream #0:12 -> #0:11 (pcm_s24be (native) -> pcm_s16le (native))
 Stream #0:13 -> #0:12 (pcm_s24be (native) -> pcm_s16le (native))
 Stream #0:14 -> #0:13 (pcm_s24be (native) -> pcm_s16le (native))
 Stream #0:15 -> #0:14 (pcm_s24be (native) -> pcm_s16le (native))
 Stream #0:16 -> #0:15 (pcm_s24be (native) -> pcm_s16le (native))
...
[Parsed_astats_0 @ 0x9123c0] Channel: 1
[Parsed_astats_0 @ 0x9123c0] DC offset: 0.000070
[Parsed_astats_0 @ 0x9123c0] Min level: -170426368.000000
[Parsed_astats_0 @ 0x9123c0] Max level: 172195840.000000
[Parsed_astats_0 @ 0x9123c0] Min difference: 0.000000
[Parsed_astats_0 @ 0x9123c0] Max difference: 58281984.000000
[Parsed_astats_0 @ 0x9123c0] Mean difference: 3089081.855667
[Parsed_astats_0 @ 0x9123c0] RMS difference: 4825348.720329
[Parsed_astats_0 @ 0x9123c0] Peak level dB: -21.918144
[Parsed_astats_0 @ 0x9123c0] RMS level dB: -34.035425
[Parsed_astats_0 @ 0x9123c0] RMS peak dB: -27.320939
[Parsed_astats_0 @ 0x9123c0] RMS trough dB: -48.414915
[Parsed_astats_0 @ 0x9123c0] Crest factor: 4.035190
[Parsed_astats_0 @ 0x9123c0] Flat factor: 0.000000
[Parsed_astats_0 @ 0x9123c0] Peak count: 2
[Parsed_astats_0 @ 0x9123c0] Bit depth: 20/20
[Parsed_astats_0 @ 0x9123c0] Dynamic range: 98.493854
[Parsed_astats_0 @ 0x9123c0] Zero crossings: 10216
[Parsed_astats_0 @ 0x9123c0] Zero crossings rate: 0.042383
[Parsed_astats_0 @ 0x9123c0] Overall
[Parsed_astats_0 @ 0x9123c0] DC offset: 0.000070
[Parsed_astats_0 @ 0x9123c0] Min level: -170426368.000000
[Parsed_astats_0 @ 0x9123c0] Max level: 172195840.000000
[Parsed_astats_0 @ 0x9123c0] Min difference: 0.000000
[Parsed_astats_0 @ 0x9123c0] Max difference: 58281984.000000
[Parsed_astats_0 @ 0x9123c0] Mean difference: 3089081.855667
[Parsed_astats_0 @ 0x9123c0] RMS difference: 4825348.720329
[Parsed_astats_0 @ 0x9123c0] Peak level dB: -21.918144
[Parsed_astats_0 @ 0x9123c0] RMS level dB: -34.035425
[Parsed_astats_0 @ 0x9123c0] RMS peak dB: -27.320939
[Parsed_astats_0 @ 0x9123c0] RMS trough dB: -48.414915
[Parsed_astats_0 @ 0x9123c0] Flat factor: 0.000000
[Parsed_astats_0 @ 0x9123c0] Peak count: 2.000000
[Parsed_astats_0 @ 0x9123c0] Bit depth: 20/20
[Parsed_astats_0 @ 0x9123c0] Number of samples: 241040
[Parsed_astats_0 @ 0x4def40] Channel: 1
[Parsed_astats_0 @ 0x4def40] DC offset: 0.000070
[Parsed_astats_0 @ 0x4def40] Min level: -170426368.000000
[Parsed_astats_0 @ 0x4def40] Max level: 172199936.000000
[Parsed_astats_0 @ 0x4def40] Min difference: 0.000000
[Parsed_astats_0 @ 0x4def40] Max difference: 58277888.000000
[Parsed_astats_0 @ 0x4def40] Mean difference: 3089075.891088
[Parsed_astats_0 @ 0x4def40] RMS difference: 4825346.346176
[Parsed_astats_0 @ 0x4def40] Peak level dB: -21.917938
[Parsed_astats_0 @ 0x4def40] RMS level dB: -34.035425
[Parsed_astats_0 @ 0x4def40] RMS peak dB: -27.320942
[Parsed_astats_0 @ 0x4def40] RMS trough dB: -48.414908
[Parsed_astats_0 @ 0x4def40] Crest factor: 4.035287
[Parsed_astats_0 @ 0x4def40] Flat factor: 0.000000
[Parsed_astats_0 @ 0x4def40] Peak count: 2
[Parsed_astats_0 @ 0x4def40] Bit depth: 20/20
[Parsed_astats_0 @ 0x4def40] Dynamic range: 98.494061
[Parsed_astats_0 @ 0x4def40] Zero crossings: 10220
[Parsed_astats_0 @ 0x4def40] Zero crossings rate: 0.042400
[Parsed_astats_0 @ 0x4def40] Overall
[Parsed_astats_0 @ 0x4def40] DC offset: 0.000070
[Parsed_astats_0 @ 0x4def40] Min level: -170426368.000000
[Parsed_astats_0 @ 0x4def40] Max level: 172199936.000000
[Parsed_astats_0 @ 0x4def40] Min difference: 0.000000
[Parsed_astats_0 @ 0x4def40] Max difference: 58277888.000000
[Parsed_astats_0 @ 0x4def40] Mean difference: 3089075.891088
[Parsed_astats_0 @ 0x4def40] RMS difference: 4825346.346176
[Parsed_astats_0 @ 0x4def40] Peak level dB: -21.917938
[Parsed_astats_0 @ 0x4def40] RMS level dB: -34.035425
[Parsed_astats_0 @ 0x4def40] RMS peak dB: -27.320942
[Parsed_astats_0 @ 0x4def40] RMS trough dB: -48.414908
[Parsed_astats_0 @ 0x4def40] Flat factor: 0.000000
[Parsed_astats_0 @ 0x4def40] Peak count: 2.000000
[Parsed_astats_0 @ 0x4def40] Bit depth: 20/20
[Parsed_astats_0 @ 0x4def40] Number of samples: 241040
...



By piping to grep (and a little more filtering) I can consolidate this and examine the peak levels on the audio channels :


$ ffmpeg -i foo5.mxf -map 0:a -af astats -f null - 2>&1 | grep -E "(Channel:|Peak level|Overall)"
[Parsed_astats_0 @ 0x9123c0] Channel: 1
[Parsed_astats_0 @ 0x9123c0] Peak level dB: -21.918144
[Parsed_astats_0 @ 0x9123c0] Overall
[Parsed_astats_0 @ 0x9123c0] Peak level dB: -21.918144
[Parsed_astats_0 @ 0x4def40] Channel: 1
[Parsed_astats_0 @ 0x4def40] Peak level dB: -21.917938
[Parsed_astats_0 @ 0x4def40] Overall
[Parsed_astats_0 @ 0x4def40] Peak level dB: -21.917938
[Parsed_astats_0 @ 0xb92180] Channel: 1
[Parsed_astats_0 @ 0xb92180] Peak level dB: -6153.053111
[Parsed_astats_0 @ 0xb92180] Overall
[Parsed_astats_0 @ 0xb92180] Peak level dB: -6153.053111
...



It gets me mostly what I need if I filter out peak levels < -120db. The problem is it identifies all channels as "Channel 1". Maybe this is because each audio stream only has a single channel in it. But I find nothing in the original output to tie each "audio status section" (the part containing "Channel :" through "Sero crossings rate") to the associated stream (e.g., 0:0, 0:1, etc.). Can I reliably deduce this just based on the order of the output ?


Should I be using a different filter (instead of astats) or parameter set to get this info ?


-
ffmpeg video duration is not equal to duration after hls process
9 décembre 2022, par Timur KhazhievProblem


For videofile input I preprocess/encode it to
libx264
. Then I'm trying to cut video into 2 second chunks except last one (last one being < 2 seconds) using hls processing

ffmpeg -v error -i video.mp4 -x264-params "keyint=60:min-keyint=60:scenecut=0" 
-hls_time 2 -hls_list_size 0 -hls_segment_filename chunk%03d.ts index.m3u8



which follows this problem


then looking into
index.m3u8
file reveals that sum of all chunks' durations does not add up to original video duration :

% ffprobe -loglevel quiet -print_format flat -show_entries format=duration index.m3u8 

format.duration="204.880000"

% ffprobe -loglevel quiet -print_format flat -show_entries format=duration video.mp4 

format.duration="204.892813"



Moreover duration of a chunk in
index.m3u8
is not the same as in chunk file.

% ffprobe -loglevel quiet -print_format flat -show_entries format=duration chunk000.ts

format.duration="2.023222"

% cat index.m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:2
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:2.000000,
chunk000.ts
#EXTINF:2.000000,
chunk001.ts
#EXTINF:2.000000,
chunk002.ts
...



Misc


Used these videos : Me at the zoo and I finally found a useful monorail.


OS : macos Monterey 12.3.1 (21E258)


ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
built with Apple clang version 14.0.0 (clang-1400.0.29.102)
configuration: --prefix=/usr/local/Cellar/ffmpeg/5.1.2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --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
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100



What I tried


- 

- Preprocess/transcode video before proceeding with hls
- Force keyframes before proceeding with hls
- Use 1, 3, 4 seconds chunks
- Use different GOP sizes
-hls_flags split_by_time












but it leads to same result or very unequal chunks


Questions


- 

- Is it ok or I'm missing something ?
- If not, what parameters/options should I use to force chunks to be precisely 2 seconds ?