
Recherche avancée
Autres articles (17)
-
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...) -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar 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 ;
-
Diogene : création de masques spécifiques de formulaires d’édition de contenus
26 octobre 2010, parDiogene est un des plugins ? SPIP activé par défaut (extension) lors de l’initialisation de MediaSPIP.
A quoi sert ce plugin
Création de masques de formulaires
Le plugin Diogène permet de créer des masques de formulaires spécifiques par secteur sur les trois objets spécifiques SPIP que sont : les articles ; les rubriques ; les sites
Il permet ainsi de définir en fonction d’un secteur particulier, un masque de formulaire par objet, ajoutant ou enlevant ainsi des champs afin de rendre le formulaire (...)
Sur d’autres sites (3859)
-
Remove black frames and sync audio with ffmpeg
24 janvier 2020, par rahim123I’m trying to figure out a way to automatically process .mp4 or .mkv videos that have been manually edited to remove a bunch of segments, leaving many blank spaces (black frames with no audio). I want to remove all but one black frame (although I would settle for removing all of them if it’s much simpler) and then also sync the audio after the video timings change.
I found this question and tried the three main suggestions :
ffmpeg -i in.mkv -vf mpdecimate,setpts=N/FRAME_RATE/TB out.mkv
ffmpeg -i in.mkv -vf [mpdecimate][] out.mkv
ffmpeg -i in.mkv -vf [decimate][]=cycle=6,[setpts][]=N/25/TB out.mkv
The first one does eliminate the black segments, but it doesn’t sync the audio. The other two commands don’t work :
> ffmpeg -i in.mp4 -vf [decimate][]=cycle=6,[setpts][]=N/25/TB out.mp4
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9 (SUSE Linux)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g' --optflags='-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g' --disable-htmlpages --enable-pic --disable-stripping --enable-shared --disable-static --enable-gpl --disable-openssl --enable-avresample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcelt --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libdc1394 --enable-libdrm --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libssh --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lto --enable-lv2 --enable-libmfx --enable-vaapi --enable-vdpau --enable-libfdk-aac-dlopen --enable-nonfree --enable-libvo-amrwbenc --enable-version3 --enable-libx264 --enable-libx265 --enable-librtmp --enable-libxvid
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, mov,mp4,m4a,3gp,3g2,mj2, from 'in.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.20.100
Duration: 00:34:23.62, start: 0.000000, bitrate: 506 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m/unknown/smpte170m), 640x480 [SAR 1:1 DAR 4:3], 412 kb/s, 29.97 fps, 29.97 tbr, 1867500000.00 tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 86 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[AVFilterGraph @ 0x55ece8def080] Bad (empty?) label found in the following: "[]=cycle=6,[setpts][]=N/25/TB".
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
[aac @ 0x55ece8c5be80] Qavg: 222.643
[aac @ 0x55ece8c5be80] 2 frames left in the queue on closing
Conversion failed!> ffmpeg -i in.mp4 -vf [decimate][]=cycle=6,[setpts][]=N/25/TB out.mp4
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9 (SUSE Linux)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g' --optflags='-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g' --disable-htmlpages --enable-pic --disable-stripping --enable-shared --disable-static --enable-gpl --disable-openssl --enable-avresample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcelt --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libdc1394 --enable-libdrm --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libssh --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lto --enable-lv2 --enable-libmfx --enable-vaapi --enable-vdpau --enable-libfdk-aac-dlopen --enable-nonfree --enable-libvo-amrwbenc --enable-version3 --enable-libx264 --enable-libx265 --enable-librtmp --enable-libxvid
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, mov,mp4,m4a,3gp,3g2,mj2, from 'in.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.20.100
Duration: 00:34:23.62, start: 0.000000, bitrate: 506 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m/unknown/smpte170m), 640x480 [SAR 1:1 DAR 4:3], 412 kb/s, 29.97 fps, 29.97 tbr, 1867500000.00 tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 86 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[AVFilterGraph @ 0x558b0d48af80] Bad (empty?) label found in the following: "[]=cycle=6,[setpts][]=N/25/TB".
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
[aac @ 0x558b0d2f7e80] Qavg: 222.643
[aac @ 0x558b0d2f7e80] 2 frames left in the queue on closing
Conversion failed!I also tried this script, but it also fails to sync the audio. I tried with both .mp4 and .mkv source files. Thanks for the help.
-
`ffmpeg record audio output device
11 juillet 2020, par Royi am trying to capture my pulse output device :


alsa_output.pci-0000_00_1b.0.analog-stereo.monitor


with this command :


/usr/bin/ffmpeg -f pulse -i alsa_output.pci-0000_00_1b.0.analog-stereo.monitor -c:a aac -b:a 128k /roee_files/test.wav



i get this output with those warnings, and there is an audio delay :


ffmpeg version 3.4.7 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-39)
 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 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --extra-ldflags='-Wl,-z,relro ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-indev=jack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --disable-encoder=libopus --enable-libpulse --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzvbi --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
 libavutil 55. 78.100 / 55. 78.100
 libavcodec 57.107.100 / 57.107.100
 libavformat 57. 83.100 / 57. 83.100
 libavdevice 57. 10.100 / 57. 10.100
 libavfilter 6.107.100 / 6.107.100
 libavresample 3. 7. 0 / 3. 7. 0
 libswscale 4. 8.100 / 4. 8.100
 libswresample 2. 9.100 / 2. 9.100
 libpostproc 54. 7.100 / 54. 7.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, pulse, from 'alsa_output.pci-0000_00_1b.0.analog-stereo.monitor':
 Duration: N/A, start: 1594460535.507972, bitrate: 1536 kb/s
 Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
File '/roee_files/test.wav' already exists. Overwrite ? [y/N] y
Stream mapping:
 Stream #0:0 -> #0:0 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, wav, to '/roee_files/test.wav':
 Metadata:
 ISFT : Lavf57.83.100
 Stream #0:0: Audio: aac (LC) ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, fltp, 128 kb/s
 Metadata:
 encoder : Lavc57.107.100 aac
[aac @ 0x1aec1a0] Queue input is backward in time
[wav @ 0x1aeabc0] Non-monotonous DTS in output stream 0:0; previous: 120076, current: 116419; changing to 120076. This may result in incorrect timestamps in the output file.
[wav @ 0x1aeabc0] Non-monotonous DTS in output stream 0:0; previous: 120076, current: 117443; changing to 120076. This may result in incorrect timestamps in the output file.
[wav @ 0x1aeabc0] Non-monotonous DTS in output stream 0:0; previous: 120076, current: 118467; changing to 120076. This may result in incorrect timestamps in the output file.
[wav @ 0x1aeabc0] Non-monotonous DTS in output stream 0:0; previous: 120076, current: 119491; changing to 120076. This may result in incorrect timestamps in the output file.
[aac @ 0x1aec1a0] Queue input is backward in time
[wav @ 0x1aeabc0] Non-monotonous DTS in output stream 0:0; previous: 123587, current: 118096; changing to 123587. This may result in incorrect timestamps in the output file.
[wav @ 0x1aeabc0] Non-monotonous DTS in output stream 0:0; previous: 123587, current: 119120; changing to 123587. This may result in incorrect timestamps in the output file.



but,
when i am trying to capture my pulse input device with the same command :


/usr/bin/ffmpeg -f pulse -i alsa_input.pci-0000_00_1b.0.analog-stereo -c:a aac -b:a 128k /roee_files/test.wav



everything works fine without any warning or delay as you can see in this output :


ffmpeg version 3.4.7 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-39)
 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 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --extra-ldflags='-Wl,-z,relro ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-indev=jack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --disable-encoder=libopus --enable-libpulse --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzvbi --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
 libavutil 55. 78.100 / 55. 78.100
 libavcodec 57.107.100 / 57.107.100
 libavformat 57. 83.100 / 57. 83.100
 libavdevice 57. 10.100 / 57. 10.100
 libavfilter 6.107.100 / 6.107.100
 libavresample 3. 7. 0 / 3. 7. 0
 libswscale 4. 8.100 / 4. 8.100
 libswresample 2. 9.100 / 2. 9.100
 libpostproc 54. 7.100 / 54. 7.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, pulse, from 'alsa_input.pci-0000_00_1b.0.analog-stereo':
 Duration: N/A, start: 1594460998.540483, bitrate: 1536 kb/s
 Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
File '/roee_files/test.wav' already exists. Overwrite ? [y/N] y
Stream mapping:
 Stream #0:0 -> #0:0 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, wav, to '/roee_files/test.wav':
 Metadata:
 ISFT : Lavf57.83.100
 Stream #0:0: Audio: aac (LC) ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, fltp, 128 kb/s
 Metadata:
 encoder : Lavc57.107.100 aac
size= 822kB time=00:00:52.45 bitrate= 128.4kbits/s speed=1.07x



i tried what someone suggest here- to uncomment and change the line, default-sample-rate = 44100 , to default-sample-rate = 48000. (in /etc/pulse/daemon.conf file, and restart PA/computer) withot success.


this is my whole section in this file after changing :


; default-sample-format = s16le
 default-sample-rate = 48000
; alternate-sample-rate = 48000
; default-sample-channels = 2
; default-channel-map = front-left,front-right

; default-fragments = 4
; default-fragment-size-msec = 25

; enable-deferred-volume = yes
; deferred-volume-safety-margin-usec = 8000
; deferred-volume-extra-delay-usec = 0



Does someone can help me solve this issue PLEASE...


does it relate to sample rate, or maybe other problem ?


thank you all...!


-
Non-monotonous DTS after 26:30:02.81 recording time
24 mars, par michaI record an hls stream and after 26:30:02.81 there come the message :



[http @ 0x558330f5ba80] Opening 'http://de-origin-live-be-01.3qsdn.com:8081/3279/996191_PwxkbnqRThCDGXVr/l_94_95438333_16449.ts?nimblesessionid=2106' for reading
frame=2289669 fps= 24 q=-1.0 size=25056768kB time=26:30:02.81 bitrate=2151.6kbits/s speed= 1x 
[mpegts @ 0x558330f07280] Invalid timestamps stream=0, pts=10378, dts=8589926250, size=11200
[mpegts @ 0x558330f07280] Invalid timestamps stream=0, pts=2908, dts=8589929940, size=3407
[mp4 @ 0x558330f20bc0] Non-monotonous DTS in output stream 0:0; previous: 8586744840, current: -3185972; changing to 8586744841. This may result in incorrect timestamps in the output file.
[mp4 @ 0x558330f20bc0] Non-monotonous DTS in output stream 0:1; previous: 4579598864, current: -1698561; changing to 4579598865. This may result in incorrect timestamps in the output file.
[mp4 @ 0x558330f20bc0] Non-monotonous DTS in output stream 0:1; previous: 4579598865, current: -1697537; changing to 4579598866. This may result in incorrect timestamps in the output file.
[mp4 @ 0x558330f20bc0] Non-monotonous DTS in output stream 0:1; previous: 4579598866, current: -1696513; changing to 4579598867. This may result in incorrect timestamps in the output file.
[mp4 @ 0x558330f20bc0] Non-monotonous DTS in output stream 0:0; previous: 8586744841, current: -3182282; changing to 8586744842. This may result in incorrect timestamps in the output file.
[mp4 @ 0x558330f20bc0] Non-monotonous DTS in output stream 0:1; previous: 4579598867, current: -1695489; changing to 4579598868. This may result in incorrect timestamps in the output file.
[mp4 @ 0x558330f20bc0] Non-monotonous DTS in output stream 0:1; previous: 4579598868, current: -1694465; changing to 4579598869. This may result in incorrect timestamps in the output file.
[mp4 @ 0x558330f20bc0] Non-monotonous DTS in output stream 0:1; previous: 4579598869, current: -1693441; changing to 4579598870. This may result in incorrect timestamps in the output file.
[mp4 @ 0x558330f20bc0] Non-monotonous DTS in output stream 0:0; previous: 8586744842, current: -3178502; changing to 8586744843. This may result in incorrect timestamps in the output file.
[mp4 @ 0x558330f20bc0] Non-monotonous DTS in output stream 0:0; previous: 8586744843, current: -3174722; changing to 8586744844. This may result in incorrect timestamps in the output file.




There is no more video written to the file at this time but ffmpeg is not stopping. If i stop it manual after 30 hours the file is only 26 hours 30 minutes long.



How to reproduce :



ffmpeg -progress recorder.progress -reconnect 1 -user_agent 'sdn/1.0' -i http://source/playlist.m3u8 -codec copy -bsf:a aac_adtstoasc record.mp4

ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
 configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-postproc --enable-small --enable-version3 --enable-libbluray --enable-demuxer=dash --enable-decoder=hevc --enable-libxml2 --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib --extra-libs=-ldl --prefix=/opt/ffmpeg
 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