
Recherche avancée
Médias (1)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (53)
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...)
Sur d’autres sites (4186)
-
cut fragment of mp3 from, to and apply fade in, fade out
23 juin 2021, par MeviaI am in need of a tool that will complete following tasks


- 

- provide
source
mp3 - provide
data
of fragment to cut (start
time,end
time) - start cutting from
source
wherestart
is - end cutting from
source
whereend
is - apply
X
secondsfade in
beginning ofstart
time - apply
Y
secondsfade out
beginningY
seconds subtracted fromend














By
fade
i meanincrease
/decrease
volume between0 - 100%
/100% - 0


I already have an interface that allows to prepare
data
.

On the backend side, I am working with
node.js
.

After some research i found a tool FFmpeg that was widely recommended to achieve my goal.


After further research i came up with following code :


const { stdout, stderr } = await exec('ffmpeg -y -i "' + sourcePath + '" -ss ' + start + ' -to ' + end + ' -af "afade=in:st=' + start + ':d=' + fadeLength + ',afade=out:st=' + (end - 3) + ':d=' + fadeLength + '" "' + outputPath + '"');

/*
Breakdown:
 ffmpeg
 -y
 -i "sourcePath"
 -ss start
 -to end
 -af "afade=in:st=(start):d=(fadeLength),afade=out:st=(end - fadeLength):d=3"
 "outputPath"

Example:
 ffmpeg
 -y
 -i "/source/test.mp3"
 -ss 89.382716
 -to 172.817231
 -af "afade=in:st=89.382716:d=5,afade=out:st=(172.817231 - 5):d=5"
 "/output/test_cut.mp3"
*/



It's working, but processor throws warnings :


[mp3 @ 0x7fc50a80c800] Estimating duration from bitrate, this may be inaccurate
[swscaler @ 0x114800000] deprecated pixel format used, make sure you did set range correctly
[mp3 @ 0x7fc50a819a00] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2



Full log :


ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
 built with Apple clang version 12.0.0 (clang-1200.0.32.29)
 configuration: --prefix=/usr/local/Cellar/ffmpeg/4.4_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-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --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-avresample --enable-videotoolbox
 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
[mp3 @ 0x7fc50a80c800] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from 'test.mp3':
 Metadata:
 title : Test
 artist : Test
 Duration: 00:03:22.50, start: 0.000000, bitrate: 320 kb/s
 Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 320 kb/s
 Stream #0:1: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 320x240, 90k tbr, 90k tbn, 90k tbc (attached pic)
 Metadata:
 comment : Other
Stream mapping:
 Stream #0:1 -> #0:0 (mjpeg (native) -> png (native))
 Stream #0:0 -> #0:1 (mp3 (mp3float) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
[swscaler @ 0x114800000] deprecated pixel format used, make sure you did set range correctly
[mp3 @ 0x7fc50a819a00] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2
Output #0, mp3, to 'test (CUT).mp3':
 Metadata:
 TIT2 : Test
 TPE1 : Test
 TSSE : Lavf58.76.100
 Stream #0:0: Video: png, rgb24, 320x240, q=2-31, 200 kb/s, 90k fps, 90k tbn (attached pic)
 Metadata:
 comment : Other
 encoder : Lavc58.134.100 png
 Stream #0:1: Audio: mp3, 44100 Hz, stereo, fltp
 Metadata:
 encoder : Lavc58.134.100 libmp3lame
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:39.89 bitrate= 0.0kbits/s speed=31.4x 
[mp3 @ 0x7fc50a819a00] No packets were sent for some of the attached pictures.
frame= 0 fps=0.0 q=0.0 Lsize= 626kB time=00:00:40.02 bitrate= 128.2kbits/s speed=31.4x 
video:0kB audio:626kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.053810%



So my question is, how to change execution command to have it executed properly (avoid warnings and errors) ?


Important thing is that i am only interested in cutting it, if possible avoid re-encondig because i am already working with 320 mp3's that have been produced from master wav's.


- provide
-
ffmpeg video won't play in certain players
25 janvier 2021, par Thomas TiottoI'm generating a video in
/folder/
from a stack of images in/folder/tmp/
using the following command :

ffmpeg -pattern_type glob -i 'folder/tmp/*.png' -c:v libx264 -preset veryslow -crf 17 -tune stillimage -y -pix_fmt yuv420p folder/weight_evolution.mp4



but my video won't play in, for example, QuickTime ("The file isn’t compatible with QuickTime Player.") and even sending it in Telegram gives really strange results. The video plays fine in IINA and VLC.


As you can see, this is what is encoded by Telegram :




and this is what the video should look like :




The output of the command is :


ffmpeg -pattern_type glob -i 'tmp/*.png' -c:v libx264 -preset veryslow -crf 17 -tune stillimage -y -pix_fmt yuv420p weight_evolution.mp4
 ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
 built with Apple clang version 12.0.0 (clang-1200.0.32.28)
 configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1_7 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --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-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --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-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack
 libavutil 56. 51.100 / 56. 51.100
 libavcodec 58. 91.100 / 58. 91.100
 libavformat 58. 45.100 / 58. 45.100
 libavdevice 58. 10.100 / 58. 10.100
 libavfilter 7. 85.100 / 7. 85.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 7.100 / 5. 7.100
 libswresample 3. 7.100 / 3. 7.100
 libpostproc 55. 7.100 / 55. 7.100
 Input #0, image2, from 'tmp/*.png':
 Duration: 00:00:10.28, start: 0.000000, bitrate: N/A
 Stream #0:0: Video: png, rgba(pc), 1280x720 [SAR 3937:3937 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
 Stream mapping:
 Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
 Press [q] to stop, [?] for help
 [libx264 @ 0x7f804c009400] using SAR=1/1
 [libx264 @ 0x7f804c009400] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
 [libx264 @ 0x7f804c009400] profile High, level 5.0, 4:2:0, 8-bit
 [libx264 @ 0x7f804c009400] 264 - core 161 r3027 4121277 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options: cabac=1 ref=16 deblock=1:-3:-3 analyse=0x3:0x133 me=umh subme=10 psy=1 psy_rd=2.00:0.70 mixed_ref=1 me_range=24 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-4 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=8 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=60 rc=crf mbtree=1 crf=17.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.20
 Output #0, mp4, to 'weight_evolution.mp4':
 Metadata:
 encoder : Lavf58.45.100
 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc
 Metadata:
 encoder : Lavc58.91.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
 frame= 72 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= frame= 126 fps=110 q=22.0 size= 0kB time=00:00:01.68 bitrate= 0.2kbits/frame= 185 fps=112 q=22.0 size= 0kB time=00:00:04.04 bitrate= 0.1kbits/frame= 245 fps=113 q=22.0 size= 0kB time=00:00:06.44 bitrate= 0.1kbits/frame= 257 fps= 97 q=-1.0 Lsize= 209kB time=00:00:10.16 bitrate= 168.7kbits/s speed=3.83x
 video:206kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.448294%
 [libx264 @ 0x7f804c009400] frame I:2 Avg QP: 4.16 size: 92234
 [libx264 @ 0x7f804c009400] frame P:36 Avg QP:24.07 size: 156
 [libx264 @ 0x7f804c009400] frame B:219 Avg QP:26.50 size: 93
 [libx264 @ 0x7f804c009400] consecutive B-frames: 0.8% 0.0% 0.0% 1.6% 9.7% 23.3% 10.9% 18.7% 35.0%
 [libx264 @ 0x7f804c009400] mb I I16..4: 87.5% 4.4% 8.2%
 [libx264 @ 0x7f804c009400] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.8% 0.0% 0.0% 0.0% 0.0% skip:99.1%
 [libx264 @ 0x7f804c009400] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.3% 0.0% 0.0% direct: 0.0% skip:99.7% L0:71.2% L1:28.4% BI: 0.4%
 [libx264 @ 0x7f804c009400] 8x8 transform intra:4.7% inter:22.5%
 [libx264 @ 0x7f804c009400] direct mvs spatial:96.8% temporal:3.2%
 [libx264 @ 0x7f804c009400] coded y,uvDC,uvAC intra: 14.7% 14.6% 14.6% inter: 0.0% 0.0% 0.0%
 [libx264 @ 0x7f804c009400] i16 v,h,dc,p: 89% 2% 9% 0%
 [libx264 @ 0x7f804c009400] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 40% 31% 1% 1% 1% 1% 1% 2%
 [libx264 @ 0x7f804c009400] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 41% 27% 22% 2% 2% 2% 1% 2% 2%
 [libx264 @ 0x7f804c009400] i8c dc,h,v,p: 91% 4% 3% 2%
 [libx264 @ 0x7f804c009400] Weighted P-Frames: Y:0.0% UV:0.0%
 [libx264 @ 0x7f804c009400] ref P L0: 89.1% 0.5% 4.8% 1.1% 1.5% 0.7% 0.2% 0.9% 0.2% 0.1% 0.1% 0.3% 0.1% 0.2% 0.1% 0.1%
 [libx264 @ 0x7f804c009400] ref B L0: 37.4% 17.9% 11.7% 7.0% 5.5% 5.5% 4.4% 2.0% 1.5% 1.6% 1.2% 1.9% 1.5% 0.7% 0.1%
 [libx264 @ 0x7f804c009400] ref B L1: 92.0% 8.0%
 [libx264 @ 0x7f804c009400] kb/s:163.83



-
Recording screencast using ffmpeg produces audio that is out of sync with the video
7 décembre 2014, par AgilEI’m on Fedora 20. I got it pre-compiled from the repo.
I use the follow command to record screencasts :
ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 30 -s 1366x768 -i :0.0 -acodec pcm_s16le -vcodec libx264 -preset ultrafast -crf 0 -threads 0 filename.mkv
The audio is perfectly synced with the video at the beginning. However, as the video progresses, the audio starts lagging behind severely (say a lag of more than 4 seconds). I’ve included a sample output that
ffmpeg
shows while recording a video.ffmpeg version 2.1.3 Copyright (c) 2000-2013 the FFmpeg developers
built on Jan 25 2014 15:11:42 with gcc 4.8.2 (GCC) 20131212 (Red Hat 4.8.2-7)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-frei0r --enable-gnutls --enable-libass --enable-libcdio --enable-libcelt --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopencv --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
libavutil 52. 48.101 / 52. 48.101
libavcodec 55. 39.101 / 55. 39.101
libavformat 55. 19.104 / 55. 19.104
libavdevice 55. 5.100 / 55. 5.100
libavfilter 3. 90.100 / 3. 90.100
libavresample 1. 1. 0 / 1. 1. 0
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, alsa, from 'pulse':
Duration: N/A, start: 1391533629.323015, bitrate: 1536 kb/s
Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
[x11grab @ 0x153ad80] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 1366 height: 768
[x11grab @ 0x153ad80] shared memory extension found
Input #1, x11grab, from ':0.0':
Duration: N/A, start: 1391533629.365274, bitrate: 1007124 kb/s
Stream #1:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1366x768, 1007124 kb/s, 30 tbr, 1000k tbn, 30 tbc
[swscaler @ 0x1520460] deprecated pixel format used, make sure you did set range correctly
No pixel format specified, yuv444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x1551420] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x1551420] profile High 4:4:4 Predictive, level 3.2, 4:4:4 8-bit
[libx264 @ 0x1551420] 264 - core 138 r2363 c628e3b - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=0 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 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=0
Output #0, matroska, to 'testing.mkv':
Metadata:
encoder : Lavf55.19.104
Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv444p, 1366x768, q=-1--1, 1k tbn, 30 tbc
Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
Stream #1:0 -> #0:0 (rawvideo -> libx264)
Stream #0:0 -> #0:1 (pcm_s16le -> pcm_s16le)
Press [q] to stop, [?] for help
[swscaler @ 0x1520460] Warning: data is not aligned! This can lead to a speedloss
frame= 213 fps= 27 q=-1.0 Lsize= 3572kB time=00:00:08.00 bitrate=3653.6kbits/s
video:2025kB audio:1501kB subtitle:0 global headers:0kB muxing overhead 1.291094%
[libx264 @ 0x1551420] frame I:1 Avg QP: 0.00 size:692585
[libx264 @ 0x1551420] frame P:212 Avg QP: 0.00 size: 6509
[libx264 @ 0x1551420] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0x1551420] mb P I16..4: 47.2% 0.0% 0.0% P16..4: 0.1% 0.0% 0.0% 0.0% 0.0% skip:52.8%
[libx264 @ 0x1551420] coded y,u,v intra: 0.7% 0.7% 0.7% inter: 0.1% 0.1% 0.1%
[libx264 @ 0x1551420] i16 v,h,dc,p: 100% 0% 0% 0%
[libx264 @ 0x1551420] kb/s:2335.32Is there something I’m missing ?