
Recherche avancée
Autres articles (29)
-
Utilisation et configuration du script
19 janvier 2011, parInformations spécifiques à la distribution Debian
Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
Récupération du script
Le script d’installation peut être récupéré de deux manières différentes.
Via svn en utilisant la commande pour récupérer le code source à jour :
svn co (...) -
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 -
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) (...)
Sur d’autres sites (3690)
-
fluent-ffmpeg concatenate files ends up with wrong length
24 juillet 2021, par Hugo CoxI have the following input file :


ffconcat version 1.0
file '../tmp/59bd6a7896654d0b0c00705f/vidR/intro.mp4' #0
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out003.mp4' #1
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #2
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #2
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #2
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #2
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #2
file '../intersegment/paddingsegment_h264_0.6s_1920x1080_30fps.mp4' #2
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out007.mp4' #3
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #4
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #4
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #4
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #4
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #4
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #4
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #4
file '../intersegment/paddingsegment_h264_1.6s_1920x1080_30fps.mp4' #4
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out013.mp4' #5
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #6
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #6
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #6
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #6
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #6
file '../intersegment/paddingsegment_h264_1.6s_1920x1080_30fps.mp4' #6
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out017.mp4' #7
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #8
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #8
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #8
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #8
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #8
file '../intersegment/paddingsegment_h264_0.6s_1920x1080_30fps.mp4' #8
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out021.mp4' #9
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #10
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #10
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #10
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #10
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #10
file '../intersegment/paddingsegment_h264_1.6s_1920x1080_30fps.mp4' #10
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out025.mp4' #11
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #12
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #12
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #12
file '../intersegment/paddingsegment_h264_0.6s_1920x1080_30fps.mp4' #12
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out028.mp4' #13
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #14
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #14
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #14
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #14
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #14
file '../intersegment/paddingsegment_h264_1.6s_1920x1080_30fps.mp4' #14
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out032.mp4' #15
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #16
file '../intersegment/paddingsegment_h264_0.6s_1920x1080_30fps.mp4' #16
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out034.mp4' #17
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #18
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #18
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #18
file '../intersegment/paddingsegment_h264_0.6s_1920x1080_30fps.mp4' #18
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out037.mp4' #19
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #20
file '../intersegment/paddingsegment_h264_1.6s_1920x1080_30fps.mp4' #20
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out039.mp4' #21
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #22
file '../intersegment/paddingsegment_h264_0.6s_1920x1080_30fps.mp4' #22
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out041.mp4' #23
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #24
file '../intersegment/paddingsegment_h264_2.6s_1920x1080_30fps.mp4' #24
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out043.mp4' #25
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #26
file '../intersegment/paddingsegment_h264_1.6s_1920x1080_30fps.mp4' #26
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out045.mp4' #27
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #28
file '../intersegment/paddingsegment_h264_1.6s_1920x1080_30fps.mp4' #28
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out047.mp4' #29
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #30
file '../intersegment/paddingsegment_h264_1.6s_1920x1080_30fps.mp4' #30
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out049.mp4' #31
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #32
file '../intersegment/paddingsegment_h264_1.6s_1920x1080_30fps.mp4' #32
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out051.mp4' #33
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #34
file '../intersegment/paddingsegment_h264_0.6s_1920x1080_30fps.mp4' #34
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out053.mp4' #35
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #36
file '../intersegment/paddingsegment_h264_1.6s_1920x1080_30fps.mp4' #36
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out055.mp4' #37
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #38
file '../intersegment/paddingsegment_h264_2.6s_1920x1080_30fps.mp4' #38
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out057.mp4' #39
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #40
file '../intersegment/paddingsegment_h264_0.6s_1920x1080_30fps.mp4' #40
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out059.mp4' #41
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #42
file '../intersegment/paddingsegment_h264_1.6s_1920x1080_30fps.mp4' #42
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out061.mp4' #43
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #44
file '../intersegment/paddingsegment_h264_1.6s_1920x1080_30fps.mp4' #44
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out063.mp4' #45
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #46
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #46
file '../intersegment/paddingsegment_h264_0.6s_1920x1080_30fps.mp4' #46
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out065.mp4' #47
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #48
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #48
file '../intersegment/paddingsegment_h264_1.6s_1920x1080_30fps.mp4' #48
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out067.mp4' #49
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #50
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #50
file '../intersegment/paddingsegment_h264_2.6s_1920x1080_30fps.mp4' #50
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out070.mp4' #51
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #52
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #52
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #52
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #52
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #52
file '../intersegment/paddingsegment_h264_1.6s_1920x1080_30fps.mp4' #52
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out074.mp4' #53
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #54
file '../intersegment/paddingsegment_h264_0.6s_1920x1080_30fps.mp4' #54
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out076.mp4' #55
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #56
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #56
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #56
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #56
file '../intersegment/paddingsegment_h264_1.6s_1920x1080_30fps.mp4' #56
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out080.mp4' #57
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #58
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #58
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #58
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #58
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #58
file '../intersegment/paddingsegment_h264_1.6s_1920x1080_30fps.mp4' #58
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out084.mp4' #59
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #60
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #60
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #60
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #60
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #60
file '../intersegment/paddingsegment_h264_1.6s_1920x1080_30fps.mp4' #60
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out089.mp4' #61
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #62
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #62
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #62
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #62
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #62
file '../intersegment/paddingsegment_h264_1.6s_1920x1080_30fps.mp4' #62
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out093.mp4' #63
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #64
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #64
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #64
file '../intersegment/paddingsegment_h264_1.6s_1920x1080_30fps.mp4' #64
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out096.mp4' #65
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #66
file '../intersegment/paddingsegment_h264_2.6s_1920x1080_30fps.mp4' #66
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out098.mp4' #67
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #68
file '../intersegment/paddingsegment_h264_2.6s_1920x1080_30fps.mp4' #68
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out100.mp4' #69
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #70
file '../intersegment/paddingsegment_h264_0.6s_1920x1080_30fps.mp4' #70
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out102.mp4' #71
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #72
file '../intersegment/paddingsegment_h264_1.6s_1920x1080_30fps.mp4' #72
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out104.mp4' #73
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #74
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #74
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #74
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #74
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #74
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #74
file '../intersegment/paddingsegment_h264_0.6s_1920x1080_30fps.mp4' #74
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out109.mp4' #75
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #76
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #76
file '../intersegment/paddingsegment_h264_2.6s_1920x1080_30fps.mp4' #76
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out112.mp4' #77
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #78
file '../intersegment/paddingsegment_h264_0.6s_1920x1080_30fps.mp4' #78
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out114.mp4' #79
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #80
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #80
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #80
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #80
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #80
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #80
file '../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4' #80
file '../intersegment/paddingsegment_h264_0.6s_1920x1080_30fps.mp4' #80
file '../tmp/59bd6a7896654d0b0c00705f/vidR/out119.mp4' #81
file '../tmp/59bd6a7896654d0b0c00705f/vidR/outro.mp4' #82



However, when I use the following command :


ffmpeg(__dirname + '/log/vidR_concatenate.txt')
 .inputFormat('concat')
 .inputOptions([
 '-safe 0'
 ]).outputOptions([
 '-c copy'
 ]).output(__dirname + '/output/' + ID + '/video/1080p/' + ID + '-R-1080p.mp4')
 .on('start', function (commandLine) {
 console.log('Spawned Ffmpeg with command: ' + commandLine);
 })
 .on('error', function (err, stdout, stderr) {
 console.log('An error occurred: ' + err.message, err, stderr);
 })
 .on('progress', function (progress) {
 console.log('Processing: ' + progress.percent + '% done')
 })
 .on('end', function (err, stdout, stderr) {
 console.log('Finished vidR processing!' /*, err, stdout, stderr*/)
 resolve()
 })
 .run()



I do not end up with a video length that is the sum of all individual videos !


ffprobe -i ../intersegment/intersegment_h264_3s_1920x1080_30fps.mp4 :


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'intersegment/intersegment_h264_3s_1920x1080_30fps.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.29.100
 Duration: 00:00:03.00, start: 0.000000, bitrate: 24 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 19 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
 Metadata:
 handler_name : VideoHandler



ffprobe -i ../intersegment/paddingsegment_h264_0.6s_1920x1080_30fps.mp4 :


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'intersegment/paddingsegment_h264_0.6s_1920x1080_30fps.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.29.100
 Duration: 00:00:00.60, start: 0.000000, bitrate: 45 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 30 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
 Metadata:
 handler_name : VideoHandler



ffprobe -i ../tmp/59bd6a7896654d0b0c00705f/vidR/intro.mp4 :


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'tmp/59bd6a7896654d0b0c00705f/vidR/intro.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.29.100
 Duration: 00:00:14.80, start: 0.000000, bitrate: 21 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 17 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
 Metadata:
 handler_name : VideoHandler



ffprobe -i ../tmp/59bd6a7896654d0b0c00705f/vidR/outro.mp4 :


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'tmp/59bd6a7896654d0b0c00705f/vidR/outro.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.29.100
 Duration: 00:00:05.30, start: 0.000000, bitrate: 22 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 18 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
 Metadata:
 handler_name : VideoHandler



ffprobe -i ../tmp/59bd6a7896654d0b0c00705f/vidR/out003.mp4 :


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'tmp/59bd6a7896654d0b0c00705f/vidR/out003.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 title : Big Buck Bunny, Sunflower version
 artist : Blender Foundation 2008, Janus Bager Kristensen 2013
 composer : Sacha Goedegebure
 encoder : Lavf58.29.100
 comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
 genre : Animation
 Duration: 00:00:08.40, start: 0.000000, bitrate: 3703 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 3699 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
 Metadata:
 handler_name : GPAC ISO Video Handler



I thought all the fps, tbr, tbn and tbc are the same, so what is the problem ??
It is off several seconds from the total sum of each individual file !


-
FFMPEG Inverts colors when converting tiff pictures to png
1er juin 2021, par Mounia JaitiWe need to convert thousands of tiff pictures to png. To accomplish that we are using FFMPEG. We've noticed recently that for very few of the converted files (in png), the colors are inverted : the input tiff file is all black and white (a technical drawing in black with a white background), and the output png file is white and black (the drawing becomes white and the background becomes black). Of course we don't want that, we need the colors to stay the same.


Here is the command we are using :


ffmpeg -y -v warning -i in_file.tif out_file.png



We've tested the 'negate' parameter on those files, and the pictures are correctly converted. But we can't apply this parameter to all of the input tiff files.
Here is the command with the negate parameter :


ffmpeg -y -v verbose -i input.tif -vf negate output.png



The Code Java we're using :


String ffmpegPath="/Users/user11/ffmpeg//ffmpeg";
 List<string> commandArgs = new ArrayList<string>();
 commandArgs.add(ffmpegPath);
 //overwrite output file if it exists
 commandArgs.add("-y"); 
 commandArgs.add("-v");
 commandArgs.add("verbose");
 //set input file 
 commandArgs.add("-i"); 
 commandArgs.add(picture.getAbsolutePath());
 commandArgs.add(dest.getAbsolutePath());
 
 String cmd = "";
 for(String cmdArg : commandArgs) {
 cmd += cmdArg + " ";
 }


</string></string>


Logs for tif having the bug :



31, 2021 2:15:51 PM 
INFO: Executing : /Users/user11/ffmpeg/ffmpeg -y -v verbose -i /Users/user11/ffmpeg/input.tif /Users/user11/ffmpeg/output.png 
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: ffmpeg version 4.4-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: built with Apple clang version 11.0.0 (clang-1100.0.33.17)
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: libavutil 56. 70.100 / 56. 70.100
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: libavcodec 58.134.100 / 58.134.100
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: libavformat 58. 76.100 / 58. 76.100
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: libavdevice 58. 13.100 / 58. 13.100
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: libavfilter 7.110.100 / 7.110.100
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: libswscale 5. 9.100 / 5. 9.100
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: libswresample 3. 9.100 / 3. 9.100
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: libpostproc 55. 9.100 / 55. 9.100
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: [tiff_pipe @ 0x7fa7f6008200] parser not found for codec tiff, packets or times may be invalid.
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Last message repeated 1 times
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Input #0, tiff_pipe, from '/Users/user11/ffmpeg/input.tif':
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Duration: N/A, bitrate: N/A
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Stream #0:0: Video: tiff, 1 reference frame, monob, 2008x2481 [SAR 1:1 DAR 2008:2481], 25 fps, 25 tbr, 25 tbn, 25 tbc
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Stream mapping:
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Stream #0:0 -> #0:0 (tiff (native) -> png (native))
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Press [q] to stop, [?] for help
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: [graph 0 input from stream 0:0 @ 0x7fa7f4c08300] w:2008 h:2481 pixfmt:monob tb:1/25 fr:25/1 sar:1/1
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Output #0, image2, to '/Users/user11/ffmpeg/output.png':
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Metadata:
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: encoder : Lavf58.76.100
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Stream #0:0: Video: png, 1 reference frame, monob(progressive), 2008x2481 (0x0) [SAR 1:1 DAR 2008:2481], q=2-31, 200 kb/s, 25 fps, 25 tbn
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Metadata:
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: encoder : Lavc58.134.100 png
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: frame= 1 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed= 0x 
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: No more output streams to write to, finishing.
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: [AVIOContext @ 0x7fa7f4c14180] Statistics: 0 seeks, 1 writeouts
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: frame= 1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A speed=1.31x 
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: video:37kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Input file #0 (/Users/user11/ffmpeg/input.tif):
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Input stream #0:0 (video): 1 packets read (18100 bytes); 1 frames decoded; 
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Total: 1 packets (18100 bytes) demuxed
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Output file #0 (/Users/user11/ffmpeg/output.png):
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Output stream #0:0 (video): 1 frames encoded; 1 packets muxed (38013 bytes); 
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Total: 1 packets (38013 bytes) muxed
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: [AVIOContext @ 0x7fa7f4f041c0] Statistics: 18100 bytes read, 0 seeks
May 31, 2021 2:15:51 PM 
INFO: BinaryRepositoryHelper.convertPixTo ffmpeg Process returned : java.lang.UNIXProcess@27ddd392, ended with code 0, and returned in 160 ms, out=/Users/user11/ffmpeg/output.png exists=true








So our questions are :


- 

- Is there a way to identify the tiff files that will be converted to png with inverted colors ? So that we can know to which files the 'negate' parameter must be applied.
- Are there any other FFMPEG parameter that we can use.






This issue has been driving us mad for the last couple of days. Any help would be highly appreciated.
Thanks.


Example of Tif picture


https://drive.google.com/file/d/1U1a91gTk1gaJb-XAPavNq6UhmjWXZjbM/view?usp=sharing


-
Screen capture (video screencast) with FFMPEG with very low FPS
20 septembre 2023, par jesusdaI recently changed PCs, I went from having an Intel Core i5 4460 with integrated graphics card to a Xeon E5 2678 v3 with AMD RADEON RX 550 graphics.


On paper, the new PC is on the order of 3 to 7 times more powerful than the old one and I can attest that this is the case in daily use, video and image editing etc. The advantage of having so many cores and threads available is palpable. In terms of games I haven't tried it because I'm not really a gamer and the few games I use are the typical free ones that come with Debian and some emulators that, honestly, already worked fine with the old PC.


However there is one task that brings me head over heels for its terrible performance : video screen capture.


With my old PC I was able to capture at over 60 fps at full screen while doing any task I needed to record.


Even with my lenovo thinkpad x230 I am able to capture screen at over 80fps with total fluency.


The command I have always used is :


ffmpeg -f x11grab -draw_mouse 1 -framerate 60 -video_size 1920x1200 -i :0.0+1680,0 -qscale 0 -pix_fmt yuv420p -c:v libx264 -preset medium -qp 0 -q:v 1 -s 1920x1200 -f matroska -threads 4 video.mkv



notes :


-video_size 1920x1200 -i :0.0+1680,0 y -s 1920x1200
are the dimensions and position of the region to capture (my right monitor).

Notice that I even used
-preset medium
and software encoding, so I got very good quality even with that parameter setting and without ever going below 60 fps.

What happens to me now ?


The equipment is unable to capture more than 20 fps which makes any video invalid, with frame drops and not even reach 30fps, which would be the minimum required.


In addition, it is quite noticeable the decrease in responsiveness of the PC as soon as I launch the command. That is, all that fluidity and smoothness that is appreciated when working normally, disappears and even moving a window from one side to another is rough and stumbling.


I have tried with different parameters of ffmpeg, to capture raw, without encoding.


I have tried saving the resulting video directly to RAM disk in order to avoid the possible bottleneck of writing to disk. It doesn't affect it at all.


So, does anyone have any suggestions as to at least where I can dig further to find a solution to the problem ?


Additional data, in case it helps :


$ → inxi
CPU: 12-Core Intel Xeon E5-2678 v3 (-MT MCP-)
speed/min/max: 1201/1200/3300 MHz Kernel: 5.10.0-0.bpo.4-amd64 x86_64
Up: 1d 6h 55m Mem: 6427.6/32012.4 MiB (20.1%)
Storage: 13.76 TiB (55.9% used) Procs: 433 Shell: bash 5.0.18 inxi: 3.0.32


$ → ffmpeg -v
ffmpeg version 4.1.6 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 8 (Debian 8.3.0-6)
 configuration: --disable-decoder=amrnb --disable-decoder=libopenjpeg --disable-libopencv --disable-outdev=sdl2 --disable-podpages --disable-sndio --disable-stripping --enable-libaom --enable-avfilter --enable-avresample --enable-gcrypt --disable-gnutls --enable-openssl --enable-gpl --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libkvazaar --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx265 --enable-libzimg --enable-libxvid --enable-libzvbi --enable-nonfree --enable-opencl --enable-opengl --enable-postproc --enable-pthreads --enable-shared --enable-version3 --enable-libwebp --incdir=/usr/include/x86_64-linux-gnu --libdir=/usr/lib/x86_64-linux-gnu --prefix=/usr --toolchain=hardened --enable-frei0r --enable-chromaprint --enable-libx264 --enable-libiec61883 --enable-libdc1394 --enable-vaapi --enable-libmfx --enable-libvmaf --disable-altivec --shlibdir=/usr/lib/x86_64-linux-gnu
 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



I have the free amdgpu drivers (not amdgpu-pro), but I activated OpenCL just in case.


I followed this tutorial.


$ → glxinfo | grep OpenGL
OpenGL vendor string: AMD
OpenGL renderer string: Radeon RX550/550 Series (POLARIS12, DRM 3.40.0, 5.10.0-0.bpo.4-amd64, LLVM 11.0.1)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.3.4
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.3.4
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.3.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:





$ → clinfo
Number of platforms 1
 Platform Name Clover
 Platform Vendor Mesa
 Platform Version OpenCL 1.1 Mesa 20.3.4
 Platform Profile FULL_PROFILE
 Platform Extensions cl_khr_icd
 Platform Extensions function suffix MESA

 Platform Name Clover
Number of devices 1
 Device Name Radeon RX550/550 Series (POLARIS12, DRM 3.40.0, 5.10.0-0.bpo.4-amd64, LLVM 11.0.1)
 Device Vendor AMD
 Device Vendor ID 0x1002
 Device Version OpenCL 1.1 Mesa 20.3.4
 Driver Version 20.3.4
 Device OpenCL C Version OpenCL C 1.1
 Device Type GPU
 Device Profile FULL_PROFILE
 Device Available Yes
 Compiler Available Yes
 Max compute units 8
 Max clock frequency 1183MHz
 Max work item dimensions 3
 Max work item sizes 256x256x256
 Max work group size 256
 Preferred work group size multiple 64
 Preferred / native vector sizes
 char 16 / 16
 short 8 / 8
 int 4 / 4
 long 2 / 2
 half 0 / 0 (n/a)
 float 4 / 4
 double 2 / 2 (cl_khr_fp64)
 Half-precision Floating-point support (n/a)
 Single-precision Floating-point support (core)
 Denormals No
 Infinity and NANs Yes
 Round to nearest Yes
 Round to zero No
 Round to infinity No
 IEEE754-2008 fused multiply-add No
 Support is emulated in software No
 Correctly-rounded divide and sqrt operations No
 Double-precision Floating-point support (cl_khr_fp64)
 Denormals Yes
 Infinity and NANs Yes
 Round to nearest Yes
 Round to zero Yes
 Round to infinity Yes
 IEEE754-2008 fused multiply-add Yes
 Support is emulated in software No
 Address bits 64, Little-Endian
 Global memory size 3221225472 (3GiB)
 Error Correction support No
 Max memory allocation 1717986918 (1.6GiB)
 Unified memory for Host and Device No
 Minimum alignment for any data type 128 bytes
 Alignment of base address 32768 bits (4096 bytes)
 Global Memory cache type None
 Image support No
 Local memory type Local
 Local memory size 32768 (32KiB)
 Max number of constant args 16
 Max constant buffer size 67108864 (64MiB)
 Max size of kernel argument 1024
 Queue properties
 Out-of-order execution No
 Profiling Yes
 Profiling timer resolution 0ns
 Execution capabilities
 Run OpenCL kernels Yes
 Run native kernels No
 Device Extensions cl_khr_byte_addressable_store cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp64

NULL platform behavior
 clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) Clover
 clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) Success [MESA]
 clCreateContext(NULL, ...) [default] Success [MESA]
 clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) Success (1)
 Platform Name Clover
 Device Name Radeon RX550/550 Series (POLARIS12, DRM 3.40.0, 5.10.0-0.bpo.4-amd64, LLVM 11.0.1)
 clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform
 clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) Success (1)
 Platform Name Clover
 Device Name Radeon RX550/550 Series (POLARIS12, DRM 3.40.0, 5.10.0-0.bpo.4-amd64, LLVM 11.0.1)
 clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform
 clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found in platform
 clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) Success (1)
 Platform Name Clover
 Device Name Radeon RX550/550 Series (POLARIS12, DRM 3.40.0, 5.10.0-0.bpo.4-amd64, LLVM 11.0.1)

ICD loader properties
 ICD loader Name OpenCL ICD Loader
 ICD loader Vendor OCL Icd free software
 ICD loader Version 2.2.12
 ICD loader Profile OpenCL 2.2



This would not be a tearing problem, as no tearing is visible when playing videos and the TearFree driver policy is enabled.


$ → xrandr --verbose | grep TearFree
 TearFree: on
 TearFree: on
 TearFree: on