
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (102)
-
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)
Sur d’autres sites (4778)
-
Video concatenation puts sound out of sync
9 août 2019, par mmorin(Cross-posted from Video Production, where the question received no answers and may be more technical than usual video production.)
I have several
MOV
files from a DSLR camera. I concatenate them with directions from this thread :ffmpeg -safe 0 -f concat -i files_to_combine -vcodec copy -acodec copy temp.MOV
where
files_to_combine
is :file ./DSC_0013.MOV
...
file ./DSC_0019.MOVThe result has image and sound in sync for the first clip and is out of sync by fractions of a second in the second clip, and out of sync by around a second for the last clip. It is probably related to this error from the log :
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82dd802200] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1000
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82dd802200] st: 0 edit list 1 Cannot find an index entry before timestamp: 1000.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82dd802200] Auto-inserting h264_mp4toannexb bitstream filterHow can I trim the frames to the available sound stream, then concatenate the two videos ?
The full log from the
ffmpeg
command is :ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --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-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82dc00e000] Auto-inserting h264_mp4toannexb bitstream filter
Input #0, concat, from 'files_to_combine':
Duration: N/A, start: -0.592000, bitrate: 36888 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt709/bt470m), 1920x1080, 35352 kb/s, 50 fps, 50 tbr, 50k tbn, 100 tbc
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s
Metadata:
handler_name : SoundHandler
Output #0, mov, to 'temp.MOV':
Metadata:
encoder : Lavf58.20.100
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt709/bt470m), 1920x1080, q=2-31, 35352 kb/s, 50 fps, 50 tbr, 50k tbn, 50k tbc
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82dd802200] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1000
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82dd802200] st: 0 edit list 1 Cannot find an index entry before timestamp: 1000.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82dd802200] Auto-inserting h264_mp4toannexb bitstream filter
frame=41886 fps=547 q=-1.0 Lsize= 3789826kB time=00:13:58.75 bitrate=37014.8kbits/s speed=10.9x
video:3631879kB audio:157123kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.021759%Update (1 July 2019)
I thought that the files had a problem at the beginning or at the end, so I
trimmed one second from each end, but it still had the sound out of sync :FILES=files_to_combine
OUTPUT=show2.MOV
rm $FILES
for i in 3 4 5 6 7 8 9; do
rm ${i}.MOV
duration=$(ffprobe -v 0 -show_entries format=duration -of compact=p=0:nk=1 DSC_001${i}.MOV)
trimmed=$(echo $duration - 1 | bc)
ffmpeg -ss 1 -t $trimmed -i DSC_001${i}.MOV -vcodec copy -acodec copy ${i}.MOV
echo file ./${i}.MOV >> $FILES
done
rm $OUTPUT
ffmpeg -safe 0 -f concat -i $FILES -vcodec copy -acodec copy $OUTPUTWhen I trim a single file near the end, the sound and video do not seem out of sync :
ffmpeg -ss 00:09:20 -t 20 -i DSC_0014.MOV -vcodec copy -acodec copy end.MOV
When I concatenate only 30 seconds from each video, the result seems OK :
FILES=files_to_combine
OUTPUT=show2.MOV
rm $FILES
for i in 3 4 5 6 7 8 9; do
rm ${i}.MOV
duration=$(ffprobe -v 0 -show_entries format=duration -of compact=p=0:nk=1 DSC_001${i}.MOV)
start=$(echo $duration - 30 | bc)
end=$(echo $duration - 1 | bc)
ffmpeg -ss $start -t $end -i DSC_001${i}.MOV -vcodec copy -acodec copy ${i}.MOV
echo file ./${i}.MOV >> $FILES
done
rm $OUTPUT
ffmpeg -safe 0 -f concat -i $FILES -vcodec copy -acodec copy $OUTPUTThis last concatenation gives this error multiple times :
[mov @ 0x7fc3c7837400] Non-monotonous DTS in output stream 0:0; previous: 9080205, current: 9080200; changing to 9080206. This may result in incorrect timestamps in the output file.
So I am guessing that the problem is small differences in timestamps that
accumulate and become more noticeable with longer durations and the
concatenation of multiple files.For reference, the DSLR that shot these clips is a Nikon D3300 and the result
offfprobe
on one of the files is :$ ffprobe DSC_0017.MOV -hide_banner
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fab70003800] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1000
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fab70003800] st: 0 edit list 1 Cannot find an index entry before timestamp: 1000.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'DSC_0017.MOV':
Metadata:
major_brand : qt
minor_version : 537331968
compatible_brands: qt niko
creation_time : 2019-06-12T23:52:37.000000Z
Duration: 00:09:53.58, start: 0.000000, bitrate: 36843 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt709/bt470m), 1920x1080, 35300 kb/s, 50 fps, 50 tbr, 50k tbn, 100 tbc (default)
Metadata:
creation_time : 2019-06-12T23:52:37.000000Z
Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 2 channels, s16, 1536 kb/s (default)
Metadata:
creation_time : 2019-06-12T23:52:37.000000ZUpdate (9 August 2019)
I concatenated the files in iMovie and the sound and image are not as out of sync as with FFMPEG. Maybe iMovie aligns the timestamps at the end of each clip instead of concatenating the audio and image streams separately.
I ran the concatenation again with the latest
ffmpeg 4.1.4_1
on these files and others from the same camera. The audio and image are in sync in one case (the results lasts 46 minutes) out of sync in another (the result lasts 48 minutes). -
Anomalie #4364 : MYSQL 5.7 - Erreurs avec les dates à 0
2 août 2019, par cedric -Mais le problème principal c’est qu’on utilise aussi des dates floues de type 2019-06-00 ou meme 2019-00-00 quand le jour ou le mois ne sont pas connus.
Ce n’est pas accepté non plus par le mode strict de mySQL mais pour le coup c’est bien plus compliqué à gérer pour ne pas perdre la feature
Chez moi j’ai changé le sql mode par défaut dans le my.ini (ou équivalent mariaDB) -
Truncated videos in multi input multi output ffmpeg command
1er août 2019, par Bhupendra FatnaniI am trying to copy videos from a CCTV DVR server (6 channels) using rtsp. How do I optimize my ffmpeg command ?
Below is the configuration :
ffmpeg version : ffmpeg-4.1.4-win64-static
CPU : Intel Core i7-8650U @1.9 GHz 2.11 GHz
RAM : 16 GBWhen I try to download from 3 channels, the videos seem to download fine, but when I use >=4 channels simultaneously, the video from channel 1 truncates almost after about 5 secs, and the output files are much smaller from channel 2 to 4, channel 5 video output has no issues.
For e.g. here are the output file sizes according to channels.
Channel 1 : 1.7 MB (truncated)
Channel 2 : 27.5 MB (approx 5 secs video loss in the beginning)
Channel 3 : 28.5 MB (approx 3-4 secs loss)
channel 4 : 29.5 MB (approx 2 secs loss)
Channel 5 : 30 MB (no issues found)Below is the command I am trying to use to download.
ffmpeg -rtsp_transport tcp -thread_queue_size 1024 -i rtsp://<input url="url" 1="1" /> -thread_queue_size 1024 -i rtsp://<input url="url" 2="2" /> -thread_queue_size 1024 -i rtsp://<input url="url" 3="3" /> -thread_queue_size 1024 -i rtsp://<input url="url" 4="4" /> -thread_queue_size 1024 -i rtsp://<input url="url" 5="5" /> -map 0 -vcodec copy -t 60 -y outputfile1.mp4 -map 1 -vcodec copy -t 60 -y outputfile2.mp4 -map 2 -vcodec copy -t 60 -y outputfile3.mp4 -map 3 -vcodec copy -t 60 -y outputfile4.mp4 -map 4 -vcodec copy -t 60 -y outputfile5.mp4
Below is the actual output :
ffmpeg version 4.1.4 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.1.1 (GCC) 20190716
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Input #0, rtsp, from 'rtsp://<input url="url" title="title" n="n" />A, start: 0.080000, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 25 tbr, 90k tbn, 180k tbc
[udp @ 000001f27c6fffc0] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 000001f27c74f400] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[rtsp @ 000001f27c721f40] max delay reached. need to consume packet
[rtsp @ 000001f27c721f40] RTP: missed 15 packets
[h264 @ 000001f27d627ac0] error while decoding MB 71 49, bytestream -6
[h264 @ 000001f27d627ac0] concealing 2258 DC, 2258 AC, 2258 MV errors in P frame
[h264 @ 000001f27d627ac0] Increasing reorder buffer to 1
Input #1, rtsp, from 'rtsp://<input url="url" title="title" n="n" />A, start: 0.040000, bitrate: N/A
Stream #1:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 25 tbr, 90k tbn, 180k tbc
[udp @ 000001f27c6ffc40] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 000001f27d2dc180] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[rtsp @ 000001f27d2db700] max delay reached. need to consume packet
[rtsp @ 000001f27d2db700] RTP: missed 15 packets
[h264 @ 000001f27d2dbd00] concealing 7337 DC, 7337 AC, 7337 MV errors in P frame
[h264 @ 000001f27d2dbd00] Increasing reorder buffer to 1
Input #2, rtsp, from '<input url="url" title="title" n="n" />A, start: 0.080000, bitrate: N/A
Stream #2:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 25 tbr, 90k tbn, 180k tbc
[udp @ 000001f27c6ffd00] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 000001f27d302bc0] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[rtsp @ 000001f27cfe9200] max delay reached. need to consume packet
[rtsp @ 000001f27cfe9200] RTP: missed 44 packets
[h264 @ 000001f27cfe6c40] error while decoding MB 41 24, bytestream -8
[h264 @ 000001f27cfe6c40] concealing 5288 DC, 5288 AC, 5288 MV errors in P frame
[h264 @ 000001f27cfe6c40] Increasing reorder buffer to 1
Input #3, rtsp, from '<input url="url" title="title" n="n" />A, start: 0.080000, bitrate: N/A
Stream #3:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 25 tbr, 90k tbn, 180k tbc
[udp @ 000001f27cfe0940] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 000001f27dd1bec0] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[rtsp @ 000001f27daaf040] max delay reached. need to consume packet
[rtsp @ 000001f27daaf040] RTP: missed 107 packets
[h264 @ 000001f27dc05040] concealing 1340 DC, 1340 AC, 1340 MV errors in P frame
[rtsp @ 000001f27daaf040] max delay reached. need to consume packet
[rtsp @ 000001f27daaf040] RTP: missed 28 packets
[h264 @ 000001f27dc05040] Increasing reorder buffer to 1
[h264 @ 000001f27dc05040] concealing 6961 DC, 6961 AC, 6961 MV errors in P frame
[rtsp @ 000001f27daaf040] max delay reached. need to consume packet
[rtsp @ 000001f27daaf040] RTP: missed 53 packets
[h264 @ 000001f27dc05040] error while decoding MB 16 40, bytestream -18
[h264 @ 000001f27dc05040] concealing 3393 DC, 3393 AC, 3393 MV errors in I frame
Input #4, rtsp, from 'rtsp://<input url="url" title="title" n="n" />A, start: 0.120000, bitrate: N/A
Stream #4:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 25 tbr, 90k tbn, 180k tbc
Output #0, mp4, to 'outputfile1.mp4':
Metadata:
title : -
encoder : Lavf58.20.100
Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, q=2-31, 25 tbr, 90k tbn, 90k tbc
Output #1, mp4, to 'outputfile2.mp4':
Metadata:
title : -
encoder : Lavf58.20.100
Stream #1:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, q=2-31, 25 tbr, 90k tbn, 90k tbc
Output #2, mp4, to 'outputfile3.mp4':
Metadata:
title : -
encoder : Lavf58.20.100
Stream #2:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, q=2-31, 25 tbr, 90k tbn, 90k tbc
Output #3, mp4, to 'outputfile4.mp4':
Metadata:
title : -
encoder : Lavf58.20.100
Stream #3:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, q=2-31, 25 tbr, 90k tbn, 90k tbc
Output #4, mp4, to 'outputfile5.mp4':
Metadata:
title : -
encoder : Lavf58.20.100
Stream #4:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, q=2-31, 25 tbr, 90k tbn, 90k tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #1:0 -> #1:0 (copy)
Stream #2:0 -> #2:0 (copy)
Stream #3:0 -> #3:0 (copy)
Stream #4:0 -> #4:0 (copy)
Press [q] to stop, [?] for help
[mp4 @ 000001f27dd0d8c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mp4 @ 000001f27dd09040] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mp4 @ 000001f27dd09040] pts has no value
[mp4 @ 000001f27dc054c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mp4 @ 000001f27dc054c0] pts has no value
[mp4 @ 000001f27ddf86c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mp4 @ 000001f27ddf86c0] pts has no value
[mp4 @ 000001f27c743b00] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mp4 @ 000001f27c743b00] pts has no value
[mp4 @ 000001f27dd0d8c0] Non-monotonous DTS in output stream 0:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
[mp4 @ 000001f27dd09040] Non-monotonous DTS in output stream 1:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
[mp4 @ 000001f27dc054c0] Non-monotonous DTS in output stream 2:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
[mp4 @ 000001f27ddf86c0] Non-monotonous DTS in output stream 3:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
[mp4 @ 000001f27c743b00] Non-monotonous DTS in output stream 4:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
[mp4 @ 000001f27dd09040] Non-monotonous DTS in output stream 1:0; previous: 1, current: 0; changing to 2. This may result in incorrect timestamps in the output file.
[mp4 @ 000001f27dc054c0] Non-monotonous DTS in output stream 2:0; previous: 1, current: 0; changing to 2. This may result in incorrect timestamps in the output file.
[mp4 @ 000001f27ddf86c0] Non-monotonous DTS in output stream 3:0; previous: 1, current: 0; changing to 2. This may result in incorrect timestamps in the output file.
[mp4 @ 000001f27c743b00] Non-monotonous DTS in output stream 4:0; previous: 1, current: 0; changing to 2. This may result in incorrect timestamps in the output file.
[rtsp @ 000001f27d2db700] max delay reached. need to consume packet
[rtsp @ 000001f27d2db700] RTP: missed 1644 packets
[rtsp @ 000001f27c721f40] max delay reached. need to consume packet
[rtsp @ 000001f27c721f40] RTP: missed 2461 packets
[rtsp @ 000001f27cfe9200] max delay reached. need to consume packet
[rtsp @ 000001f27cfe9200] RTP: missed 733 packets
frame= 46 fps=0.8 q=-1.0 Lq=-1.0 q=-1.0 q=-1.0 q=-1.0 size= 1790kB time=00:00:59.99 bitrate= 244.4kbits/s speed=1.04x
video:119011kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknownCould somebody please help me optimize the ffmpeg command ?