
Recherche avancée
Médias (2)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (78)
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...) -
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)
Sur d’autres sites (6692)
-
Top 5 Web Analytics Tools for Your Site
11 août 2023, par Erin — Analytics Tips -
DTS Error when nesting `amix` filter in ffmpeg [closed]
25 août 2023, par GBathieI am trying to create an audio file that contains multiple occurrences of other samples (think of music notes), using ffmpeg.


I am using the following command :


ffmpeg -f lavfi -i 'sine=frequency=87.31:sample_rate=44100' -f lavfi -i 'sine=frequency=783.99:sample_rate=44100' -filter_complex '[0]asplit=2[s0][s1];[s0]atrim=duration=0.157[s2];[s1]atrim=duration=1.157[s3];[s2][s3]amix=inputs=2[s4];[1]atrim=duration=0.165[s5];[s4][s5]amix=inputs=2[s6]' -map '[s6]' test.mp3 -y



It generates two sine waves in place of notes, and builds a file containing the first note twice, and the second note once.
I then mix the result using two
amix
filters. I cannot use a singleamix
filter because, in practice, I have more notes that the maximum number of inputs that amix can take (1024).

The graph looks like this :



Running this commands gives me the following output, which complains about "Queue input backwards in time" :



ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
 configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
Input #0, lavfi, from 'sine=frequency=87.31:sample_rate=44100':
 Duration: N/A, start: 0.000000, bitrate: 705 kb/s
 Stream #0:0: Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s
Input #1, lavfi, from 'sine=frequency=783.99:sample_rate=44100':
 Duration: N/A, start: 0.000000, bitrate: 705 kb/s
 Stream #1:0: Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s
Stream mapping:
 Stream #0:0 (pcm_s16le) -> asplit
 Stream #1:0 (pcm_s16le) -> atrim
 amix -> Stream #0:0 (libmp3lame)
Press [q] to stop, [?] for help
Output #0, mp3, to 'test.mp3':
 Metadata:
 TSSE : Lavf58.29.100
 Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, fltp (default)
 Metadata:
 encoder : Lavc58.54.100 libmp3lame
[libmp3lame @ 0x557929fb5400] Queue input is backward in time
 Last message repeated 1 times
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854774620
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775760
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775632
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775504
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775376
[libmp3lame @ 0x557929fb5400] Queue input is backward in time
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775248
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775120
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854774992
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854774864
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775760
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775632
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775504
[libmp3lame @ 0x557929fb5400] Queue input is backward in time
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775376
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775248
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775120
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854774992
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854774864
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775760
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775632
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775504
[libmp3lame @ 0x557929fb5400] Queue input is backward in time
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775376
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775248
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775120
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854774992
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854774864
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775760
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775632
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775504
[libmp3lame @ 0x557929fb5400] Queue input is backward in time
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775376
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775248
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775120
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854774992
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854774864
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775760
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775632
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775504
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775376
[mp3 @ 0x557929fb7280] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6959 >= -9223372036854775248
size= 10kB time=00:00:00.18 bitrate= 428.0kbits/s speed=22.2x 
video:0kB audio:9kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.361386%



Q : What is the issue, and how can I solve it ?


Note that the issue disappears if I use a single
amix
filter, but I cannot do this in practice.

-
Hello, I have some problems with ffmpeg.concat, there are logs
12 mai 2022, par MatveyLog :


[swscaler @ 0x27d3c10] [swscaler @ 0x2886fe0] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x27d3c10] [swscaler @ 0x283be10] deprecated pixel format used, make sure you did set range correctly
Output #0, avi, to '/home/pi/Desktop/VIDEOREG/2022:05:12_09:51:57:856_v1.avi':
 Metadata:
 software : Lavf58.45.100
 ISFT : Lavf59.20.101
 Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p(tv, bt470bg/unknown/unknown, progressive), 1080x720, q=2-31, 200 kb/s, 25 fps, 25>
 Metadata:
 encoder : Lavc59.25.100 mpeg4
 Side data:
 cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
Output #0, avi, to '/home/pi/Desktop/VIDEOREG/2022:05:12_09:51:57:911_v3.avi':
 Metadata:
 software : Lavf58.45.100
 ISFT : Lavf59.20.101
 Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p(tv, bt470bg/unknown/unknown, progressive), 1080x720, q=2-31, 200 kb/s, 25 fps, 25>
 Metadata:
 encoder : Lavc59.25.100 mpeg4
 Side data:
 cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
Output #0, avi, to '/home/pi/Desktop/VIDEOREG/2022:05:12_09:51:57:890_v2.avi':
 Metadata:
 software : Lavf58.45.100
 ISFT : Lavf59.20.101
 Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p(tv, bt470bg/unknown/unknown, progressive), 1080x720, q=2-31, 200 kb/s, 25 fps, 25>
 Metadata:
 encoder : Lavc59.25.100 mpeg4
 Side data:
 cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
[mjpeg @ 0x27aaa10] mjpeg_decode_dc: bad vlc: 0:0 (0x27b7c20)trate=8122.4kbits/s speed=1.33e+04x
[mjpeg @ 0x27aaa10] error dc
[mjpeg @ 0x27aaa10] error y=18 x=37
[mjpeg @ 0x27aaa10] EOI missing, emulating
[mjpeg @ 0x29551c0] error count: 65
[mjpeg @ 0x29551c0] error y=2 x=17
###############################################



My part of code for concatenation audio and video :


def video_with_audio(number, filename, video):
 ms = datetime.today().strftime('%f') + '0000'
 ms = ms[:3]
 name = datetime.today().strftime('%Y:%m:%d_%H:%M:%S:')
 title_video = f'/home/pi/Desktop/VIDEOREG/{name}{ms}{number}.avi'
 print(title_video)
 os.system("ffmpeg -i " + video + " -vf setpts=PTS*2 " + title_video)
 ####################################################
 ms_1 = datetime.today().strftime('%f') + '0000'
 ms_1 = ms_1[:3]
 name_1 = datetime.today().strftime('%Y:%m:%d_%H:%M:%S:')
 title_video = f'/home/pi/Desktop/VIDEOREG/{name}{ms}{number}.avi'
 title_video_1 = f'/home/pi/Desktop/VIDEOREG/{name_1}{ms_1}{number}.avi'
 input_audio = ffmpeg.input(filename)
 input_video = ffmpeg.input(title_video)
 print(title_video_1)
 ffmpeg.concat(input_video, input_audio, v=1, a=1).output(title_video_1).run()



There are slight delays during video recording, because I print information from sensors on video, can this affect the concatenation of video with audio ? (Saved video is accelerated ? that's why at the beginning I used slowing video down.)