
Recherche avancée
Médias (1)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
Autres articles (17)
-
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 (...) -
Configuration spécifique d’Apache
4 février 2011, parModules spécifiques
Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
Création d’un (...) -
MediaSPIP Player : problèmes potentiels
22 février 2011, parLe lecteur ne fonctionne pas sur Internet Explorer
Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...)
Sur d’autres sites (4032)
-
Merge audio of multiple movies by ffmpeg command
11 février 2019, par S.TI want to merge 3 video files to one. my problem is that i can hear the audio only from 2. one of them is muted.
The command i did will show the 3 movies each one next to each other and should play the audio from the whole 3.
This is my query :
complexCommand = new String[]{"-i", tempPath1, "-i", tempPath2,"-i", tempPath3,"-filter_complex",
"[0:v]pad=width=iw+20:height=ih+20:x=10:y=10:color=green[a];" +
"[1:v]pad=width=iw+20:height=ih+20:x=10:y=10:color=red[b];" +
"[2:v]pad=width=iw+20:height=ih+20:x=10:y=10:color=blue[c];" +
"[b][c]hstack=inputs=2,scale=iw/2:-2[bottom];" +
"[a][bottom]vstack=inputs=2,scale=ih*2:-2[video];" +
"[0:a][1:a]amerge=inputs=2[audio];" + // take audio first movie, take audio second movie and merge with 2 inputs
"[audio][2:a]amerge=inputs=2[audio1]",
"-map", // map of the video
"[video]",
"-map", // map of the audio
"[audio1]",
"-ac",
"2", // number of chanels
outputFilePath};The result of this command is that i can hear only movies a and b.
Thanks a lot :)Edit
I also tried this one :
complexCommand = new String[]{"-i", tempPath1, "-i", tempPath2,"-i", tempPath3,"-filter_complex",
"[0:v]pad=width=iw+20:height=ih+20:x=10:y=10:color=green[a];" +
"[1:v]pad=width=iw+20:height=ih+20:x=10:y=10:color=red[b];" +
"[2:v]pad=width=iw+20:height=ih+20:x=10:y=10:color=blue[c];" +
"[b][c]hstack=inputs=2,scale=iw/2:-2[bottom];" +
"[a][bottom]vstack=inputs=2,scale=ih*2:-2[video];" +
"[0:a][1:a][2:a]amerge=inputs=3[audio]",
"-map", // map of the video
"[video]",
"-map", // map of the audio
"[audio]",
"-ac",
"2", // number of chanels
outputFilePath};Another Edit
After another investigation, i saw that he is not merging the last movie audio. Also if i have 4 movies, it merges 3 and you can’t hear the last one.
log (too long - this is the last half of it) :
10.417 Started command progress : ffmpeg frame= 102 fps=1.2 q=28.0 size= 344kB time=00:00:04.24 bitrate= 662.5kbits/s dup=1 drop=122 speed=0.0495x
16.670 Started command progress : ffmpeg frame= 103 fps=1.1 q=28.0 size= 361kB time=00:00:04.29 bitrate= 689.2kbits/s dup=1 drop=123 speed=0.0466x
17.329 Started command progress : ffmpeg frame= 104 fps=1.1 q=28.0 size= 366kB time=00:00:04.33 bitrate= 691.2kbits/s dup=1 drop=124 speed=0.0467x
18.067 Started command progress : ffmpeg frame= 105 fps=1.1 q=28.0 size= 368kB time=00:00:04.37 bitrate= 688.3kbits/s dup=1 drop=125 speed=0.0468x
18.658 Started command progress : ffmpeg frame= 106 fps=1.1 q=28.0 size= 371kB time=00:00:04.41 bitrate= 687.5kbits/s dup=1 drop=127 speed=0.0469x
19.275 Started command progress : ffmpeg frame= 107 fps=1.1 q=28.0 size= 384kB time=00:00:04.46 bitrate= 705.0kbits/s dup=1 drop=128 speed=0.0471x
20.951 Started command progress : ffmpeg frame= 108 fps=1.1 q=28.0 size= 388kB time=00:00:04.50 bitrate= 706.2kbits/s dup=1 drop=129 speed=0.0467x
21.619 Started command progress : ffmpeg frame= 109 fps=1.1 q=28.0 size= 390kB time=00:00:04.52 bitrate= 706.2kbits/s dup=1 drop=130 speed=0.0466x
22.170 Started command progress : ffmpeg frame= 110 fps=1.1 q=28.0 size= 393kB time=00:00:04.56 bitrate= 704.5kbits/s dup=1 drop=132 speed=0.0468x
25.697 Started command progress : ffmpeg frame= 111 fps=1.1 q=28.0 size= 408kB time=00:00:04.63 bitrate= 720.8kbits/s dup=1 drop=133 speed=0.0458x
30.467 Started command progress : ffmpeg frame= 112 fps=1.1 q=28.0 size= 413kB time=00:00:04.67 bitrate= 723.8kbits/s dup=1 drop=134 speed=0.0441x
31.884 Started command progress : ffmpeg frame= 113 fps=1.1 q=28.0 size= 415kB time=00:00:04.69 bitrate= 723.9kbits/s dup=1 drop=135 speed=0.0437x
32.360 Started command progress : ffmpeg frame= 113 fps=1.0 q=28.0 size= 415kB time=00:00:04.73 bitrate= 717.4kbits/s dup=1 drop=136 speed=0.0439x
37.274 Started command progress : ffmpeg frame= 115 fps=1.0 q=28.0 size= 435kB time=00:00:04.80 bitrate= 741.3kbits/s dup=1 drop=138 speed=0.0426x
38.060 Started command progress : ffmpeg frame= 116 fps=1.0 q=28.0 size= 439kB time=00:00:04.82 bitrate= 746.1kbits/s dup=1 drop=139 speed=0.0425x
38.779 Started command progress : ffmpeg frame= 117 fps=1.0 q=28.0 size= 441kB time=00:00:04.86 bitrate= 743.2kbits/s dup=1 drop=140 speed=0.0426x
39.463 Started command progress : ffmpeg frame= 118 fps=1.0 q=28.0 size= 445kB time=00:00:04.90 bitrate= 742.3kbits/s dup=1 drop=142 speed=0.0427x
40.074 Started command progress : ffmpeg frame= 119 fps=1.0 q=28.0 size= 458kB time=00:00:04.97 bitrate= 753.8kbits/s dup=1 drop=143 speed=0.043x
42.906 Started command progress : ffmpeg frame= 120 fps=1.0 q=28.0 size= 462kB time=00:00:04.99 bitrate= 758.1kbits/s dup=1 drop=144 speed=0.0422x
43.884 Started command progress : ffmpeg frame= 121 fps=1.0 q=28.0 size= 464kB time=00:00:05.03 bitrate= 754.6kbits/s dup=1 drop=145 speed=0.0422x
44.378 Started command progress : ffmpeg frame= 121 fps=1.0 q=28.0 size= 464kB time=00:00:05.07 bitrate= 748.2kbits/s dup=1 drop=146 speed=0.0424x
52.351 Started command progress : ffmpeg frame= 123 fps=1.0 q=28.0 size= 481kB time=00:00:05.12 bitrate= 768.5kbits/s dup=1 drop=148 speed=0.0401x
55.804 Started command progress : ffmpeg frame= 124 fps=0.9 q=28.0 size= 485kB time=00:00:05.16 bitrate= 768.6kbits/s dup=1 drop=149 speed=0.0394x
56.404 Started command progress : ffmpeg frame= 124 fps=0.9 q=28.0 size= 485kB time=00:00:05.18 bitrate= 765.4kbits/s dup=1 drop=149 speed=0.0393x
57.011 Started command progress : ffmpeg frame= 125 fps=0.9 q=28.0 size= 487kB time=00:00:05.20 bitrate= 765.4kbits/s dup=1 drop=150 speed=0.0393x
57.549 Started command progress : ffmpeg frame= 125 fps=0.9 q=28.0 size= 487kB time=00:00:05.25 bitrate= 759.2kbits/s dup=1 drop=151 speed=0.0395x
58.072 Started command progress : ffmpeg frame= 126 fps=0.9 q=28.0 size= 489kB time=00:00:05.27 bitrate= 760.4kbits/s dup=1 drop=152 speed=0.0395x
03.052 Started command progress : ffmpeg frame= 127 fps=0.9 q=28.0 size= 504kB time=00:00:05.29 bitrate= 779.9kbits/s dup=1 drop=153 speed=0.0382x
04.000 Started command progress : ffmpeg frame= 128 fps=0.9 q=28.0 size= 509kB time=00:00:05.33 bitrate= 781.5kbits/s dup=1 drop=154 speed=0.0383x
04.841 Started command progress : ffmpeg frame= 129 fps=0.9 q=28.0 size= 511kB time=00:00:05.35 bitrate= 781.3kbits/s dup=1 drop=155 speed=0.0382x
05.615 Started command progress : ffmpeg frame= 129 fps=0.9 q=28.0 size= 511kB time=00:00:05.39 bitrate= 775.1kbits/s dup=1 drop=156 speed=0.0383x
06.627 Started command progress : ffmpeg frame= 130 fps=0.9 q=28.0 size= 514kB time=00:00:05.42 bitrate= 776.8kbits/s dup=1 drop=157 speed=0.0382x
07.511 Started command progress : ffmpeg frame= 131 fps=0.9 q=28.0 size= 525kB time=00:00:05.46 bitrate= 786.6kbits/s dup=1 drop=158 speed=0.0383x
12.298 Started command progress : ffmpeg frame= 132 fps=0.9 q=28.0 size= 529kB time=00:00:05.48 bitrate= 789.4kbits/s dup=1 drop=159 speed=0.0382x
12.306 Started command progress : ffmpeg frame= 132 fps=0.9 q=28.0 size= 529kB time=00:00:05.48 bitrate= 789.4kbits/s dup=1 drop=159 speed=0.0371x
12.814 Started command progress : ffmpeg frame= 133 fps=0.9 q=28.0 size= 530kB time=00:00:05.48 bitrate= 792.1kbits/s dup=1 drop=160 speed=0.037x
13.584 Started command progress : ffmpeg frame= 134 fps=0.9 q=28.0 size= 533kB time=00:00:05.48 bitrate= 796.2kbits/s dup=1 drop=162 speed=0.0368x
18.744 Started command progress : ffmpeg frame= 135 fps=0.9 q=28.0 size= 547kB time=00:00:05.48 bitrate= 817.1kbits/s dup=1 drop=163 speed=0.0356x
19.776 Started command progress : ffmpeg frame= 136 fps=0.9 q=28.0 size= 551kB time=00:00:05.48 bitrate= 823.3kbits/s dup=1 drop=164 speed=0.0353x
20.554 Started command progress : ffmpeg frame= 137 fps=0.9 q=28.0 size= 553kB time=00:00:05.48 bitrate= 825.9kbits/s dup=1 drop=164 speed=0.0352x
21.113 Started command progress : ffmpeg frame= 138 fps=0.9 q=28.0 size= 556kB time=00:00:05.48 bitrate= 830.1kbits/s dup=1 drop=165 speed=0.035x
23.823 Started command progress : ffmpeg frame= 139 fps=0.9 q=28.0 size= 570kB time=00:00:05.48 bitrate= 850.8kbits/s dup=1 drop=165 speed=0.0344x
24.546 Started command progress : ffmpeg frame= 140 fps=0.9 q=28.0 size= 574kB time=00:00:05.48 bitrate= 857.3kbits/s dup=1 drop=165 speed=0.0343x
25.038 Started command progress : ffmpeg frame= 141 fps=0.9 q=28.0 size= 576kB time=00:00:05.48 bitrate= 860.0kbits/s dup=1 drop=165 speed=0.0342x
29.407 Started command progress : ffmpeg frame= 143 fps=0.9 q=28.0 size= 591kB time=00:00:05.48 bitrate= 882.6kbits/s dup=1 drop=166 speed=0.0333x
32.181 Started command progress : ffmpeg frame= 144 fps=0.9 q=28.0 size= 595kB time=00:00:05.48 bitrate= 888.4kbits/s dup=1 drop=166 speed=0.0327x
32.721 Started command progress : ffmpeg frame= 145 fps=0.9 q=28.0 size= 597kB time=00:00:05.48 bitrate= 891.0kbits/s dup=1 drop=166 speed=0.0326x
37.640 Started command progress : ffmpeg frame= 147 fps=0.8 q=28.0 size= 613kB time=00:00:05.48 bitrate= 915.5kbits/s dup=1 drop=167 speed=0.0317x
38.409 Started command progress : ffmpeg frame= 148 fps=0.9 q=28.0 size= 617kB time=00:00:05.48 bitrate= 922.0kbits/s dup=1 drop=167 speed=0.0315x
38.954 Started command progress : ffmpeg frame= 149 fps=0.9 q=28.0 size= 619kB time=00:00:05.48 bitrate= 924.8kbits/s dup=1 drop=167 speed=0.0314x
43.249 Started command progress : ffmpeg frame= 151 fps=0.8 q=28.0 size= 638kB time=00:00:05.48 bitrate= 952.7kbits/s dup=1 drop=168 speed=0.0307x
44.711 Started command progress : ffmpeg frame= 152 fps=0.8 q=28.0 size= 642kB time=00:00:05.48 bitrate= 959.6kbits/s dup=1 drop=168 speed=0.0304x
45.362 Started command progress : ffmpeg frame= 153 fps=0.8 q=28.0 size= 644kB time=00:00:05.48 bitrate= 962.3kbits/s dup=1 drop=168 speed=0.0303x
47.986 Started command progress : ffmpeg frame= 155 fps=0.8 q=28.0 size= 658kB time=00:00:05.48 bitrate= 983.4kbits/s dup=1 drop=169 speed=0.0299x
51.033 Started command progress : ffmpeg frame= 156 fps=0.8 q=28.0 size= 663kB time=00:00:05.48 bitrate= 989.6kbits/s dup=1 drop=169 speed=0.0294x
51.644 Started command progress : ffmpeg frame= 157 fps=0.8 q=28.0 size= 664kB time=00:00:05.48 bitrate= 992.4kbits/s dup=1 drop=169 speed=0.0293x
52.227 Started command progress : ffmpeg frame= 158 fps=0.8 q=28.0 size= 667kB time=00:00:05.48 bitrate= 996.2kbits/s dup=1 drop=170 speed=0.0292x
55.997 Started command progress : ffmpeg frame= 159 fps=0.8 q=28.0 size= 679kB time=00:00:05.48 bitrate=1014.6kbits/s dup=1 drop=170 speed=0.0286x
57.421 Started command progress : ffmpeg frame= 160 fps=0.8 q=28.0 size= 684kB time=00:00:05.48 bitrate=1022.2kbits/s dup=1 drop=170 speed=0.0284x
57.968 Started command progress : ffmpeg frame= 161 fps=0.8 q=28.0 size= 686kB time=00:00:05.48 bitrate=1025.0kbits/s dup=1 drop=170 speed=0.0284x
02.301 Started command progress : ffmpeg frame= 163 fps=0.8 q=28.0 size= 704kB time=00:00:05.48 bitrate=1051.4kbits/s dup=1 drop=171 speed=0.0277x
02.318 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
03.129 Started command progress : ffmpeg frame= 164 fps=0.8 q=28.0 size= 708kB time=00:00:05.48 bitrate=1058.1kbits/s dup=1 drop=171 speed=0.0276x
03.135 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
03.791 Started command progress : ffmpeg Last message repeated 2 times
03.804 Started command progress : ffmpeg frame= 165 fps=0.8 q=28.0 size= 710kB time=00:00:05.48 bitrate=1060.7kbits/s dup=1 drop=171 speed=0.0275x
03.818 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
10.434 Started command progress : ffmpeg Last message repeated 3 times
10.436 Started command progress : ffmpeg frame= 167 fps=0.8 q=28.0 size= 728kB time=00:00:05.48 bitrate=1087.9kbits/s dup=1 drop=172 speed=0.0266x
11.139 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
11.140 Started command progress : ffmpeg frame= 168 fps=0.8 q=28.0 size= 733kB time=00:00:05.48 bitrate=1094.8kbits/s dup=1 drop=172 speed=0.0265x
11.148 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
11.654 Started command progress : ffmpeg Last message repeated 1 times
11.655 Started command progress : ffmpeg frame= 169 fps=0.8 q=28.0 size= 735kB time=00:00:05.48 bitrate=1097.6kbits/s dup=1 drop=172 speed=0.0265x
11.660 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
13.730 Started command progress : ffmpeg Last message repeated 4 times
13.732 Started command progress : ffmpeg frame= 171 fps=0.8 q=28.0 size= 750kB time=00:00:05.48 bitrate=1119.6kbits/s dup=1 drop=173 speed=0.0262x
14.493 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
14.495 Started command progress : ffmpeg frame= 172 fps=0.8 q=28.0 size= 754kB time=00:00:05.48 bitrate=1125.7kbits/s dup=1 drop=173 speed=0.0261x
14.510 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
15.764 Started command progress : ffmpeg Last message repeated 1 times
15.768 Started command progress : ffmpeg frame= 173 fps=0.8 q=28.0 size= 756kB time=00:00:05.48 bitrate=1128.7kbits/s dup=1 drop=173 speed=0.026x
15.967 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
17.594 Started command progress : ffmpeg Last message repeated 4 times
17.600 Started command progress : ffmpeg frame= 175 fps=0.8 q=28.0 size= 769kB time=00:00:05.48 bitrate=1148.9kbits/s dup=1 drop=174 speed=0.0257x
22.264 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
22.270 Started command progress : ffmpeg frame= 176 fps=0.8 q=28.0 size= 773kB time=00:00:05.48 bitrate=1154.6kbits/s dup=1 drop=174 speed=0.0252x
22.273 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
22.794 Started command progress : ffmpeg Last message repeated 1 times
22.796 Started command progress : ffmpeg frame= 177 fps=0.8 q=28.0 size= 775kB time=00:00:05.48 bitrate=1157.0kbits/s dup=1 drop=174 speed=0.0251x
22.997 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
26.730 Started command progress : ffmpeg Last message repeated 3 times
26.732 Started command progress : ffmpeg frame= 179 fps=0.8 q=28.0 size= 792kB time=00:00:05.48 bitrate=1182.5kbits/s dup=1 drop=175 speed=0.0247x
26.736 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
27.345 Started command progress : ffmpeg Last message repeated 1 times
27.347 Started command progress : ffmpeg frame= 180 fps=0.8 q=28.0 size= 796kB time=00:00:05.48 bitrate=1188.9kbits/s dup=1 drop=175 speed=0.0246x
27.811 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
28.017 Started command progress : ffmpeg Last message repeated 2 times
28.019 Started command progress : ffmpeg frame= 181 fps=0.8 q=28.0 size= 798kB time=00:00:05.48 bitrate=1192.1kbits/s dup=1 drop=175 speed=0.0245x
28.027 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
31.612 Started command progress : ffmpeg Last message repeated 2 times
31.617 Started command progress : ffmpeg frame= 183 fps=0.8 q=28.0 size= 820kB time=00:00:05.48 bitrate=1224.5kbits/s dup=1 drop=176 speed=0.0242x
31.620 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
32.251 Started command progress : ffmpeg Last message repeated 1 times
32.254 Started command progress : ffmpeg frame= 184 fps=0.8 q=28.0 size= 827kB time=00:00:05.48 bitrate=1234.7kbits/s dup=1 drop=176 speed=0.0241x
32.654 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
32.828 Started command progress : ffmpeg Last message repeated 2 times
32.833 Started command progress : ffmpeg frame= 185 fps=0.8 q=28.0 size= 828kB time=00:00:05.48 bitrate=1237.4kbits/s dup=1 drop=176 speed=0.024x
33.093 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
38.362 Started command progress : ffmpeg Last message repeated 2 times
38.363 Started command progress : ffmpeg frame= 187 fps=0.8 q=28.0 size= 833kB time=00:00:05.50 bitrate=1240.0kbits/s dup=1 drop=177 speed=0.0235x
38.370 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
39.216 Started command progress : ffmpeg Last message repeated 1 times
39.217 Started command progress : ffmpeg frame= 188 fps=0.8 q=28.0 size= 833kB time=00:00:05.54 bitrate=1230.7kbits/s dup=1 drop=177 speed=0.0236x
39.744 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
39.747 Started command progress : ffmpeg frame= 189 fps=0.8 q=28.0 size= 833kB time=00:00:05.58 bitrate=1221.5kbits/s dup=1 drop=177 speed=0.0238x
39.748 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
40.354 Started command progress : ffmpeg Last message repeated 4 times
40.355 Started command progress : ffmpeg frame= 191 fps=0.8 q=28.0 size= 833kB time=00:00:05.67 bitrate=1203.6kbits/s dup=1 drop=178 speed=0.0241x
41.031 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
41.037 Started command progress : ffmpeg frame= 192 fps=0.8 q=28.0 size= 833kB time=00:00:05.71 bitrate=1194.8kbits/s dup=1 drop=178 speed=0.0242x
41.046 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
41.557 Started command progress : ffmpeg Last message repeated 1 times
41.561 Started command progress : ffmpeg frame= 193 fps=0.8 q=28.0 size= 833kB time=00:00:05.75 bitrate=1186.1kbits/s dup=1 drop=178 speed=0.0243x
41.744 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
42.421 Started command progress : ffmpeg Last message repeated 4 times
42.423 Started command progress : ffmpeg frame= 195 fps=0.8 q=28.0 size= 833kB time=00:00:05.83 bitrate=1169.2kbits/s dup=1 drop=179 speed=0.0245x
47.015 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
47.017 Started command progress : ffmpeg frame= 196 fps=0.8 q=28.0 size= 833kB time=00:00:05.88 bitrate=1160.9kbits/s dup=1 drop=179 speed=0.0243x
47.019 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
47.517 Started command progress : ffmpeg Last message repeated 2 times
47.524 Started command progress : ffmpeg frame= 197 fps=0.8 q=28.0 size= 833kB time=00:00:05.92 bitrate=1152.7kbits/s dup=1 drop=179 speed=0.0244x
47.524 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
48.946 Started command progress : ffmpeg Last message repeated 2 times
48.959 Started command progress : ffmpeg frame= 199 fps=0.8 q=28.0 size= 833kB time=00:00:06.00 bitrate=1136.7kbits/s dup=1 drop=180 speed=0.0246x
48.961 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
49.797 Started command progress : ffmpeg Last message repeated 1 times
49.798 Started command progress : ffmpeg frame= 200 fps=0.8 q=28.0 size= 833kB time=00:00:06.04 bitrate=1128.9kbits/s dup=1 drop=180 speed=0.0247x
49.803 Started command progress : ffmpeg Error while decoding stream #2:1: Out of memory
50.546 Started command progress : ffmpeg Last message repeated 4 times
50.547 Started command progress : ffmpeg frame= 201 fps=0.8 q=28.0 size= 833kB time=00:00:06.08 bitrate=1121.1kbits/s dup=1 drop=180 speed=0.0248x
53.010 Started command progress : ffmpeg frame= 204 fps=0.8 q=28.0 size= 833kB time=00:00:06.21 bitrate=1098.6kbits/s dup=1 drop=181 speed=0.0251x
53.713 Started command progress : ffmpeg frame= 205 fps=0.8 q=28.0 size= 833kB time=00:00:06.25 bitrate=1091.2kbits/s dup=1 drop=181 speed=0.0252x
53.722 Started command progress : ffmpeg frame= 205 fps=0.8 q=28.0 size= 833kB time=00:00:06.25 bitrate=1091.2kbits/s dup=1 drop=181 speed=0.0251x
50.706 Started command progress : ffmpeg frame= 205 fps=0.7 q=-1.0 Lsize= 965kB time=00:00:08.46 bitrate= 933.2kbits/s dup=1 drop=181 speed=0.0277x
50.720 Started command progress : ffmpeg video:872kB audio:87kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.621844%
50.720 Started command progress : ffmpeg [libx264 @ 0xf35ff400] frame I:1 Avg QP:19.09 size: 40991
50.725 Started command progress : ffmpeg [libx264 @ 0xf35ff400] frame P:51 Avg QP:18.16 size: 10789
50.726 Started command progress : ffmpeg [libx264 @ 0xf35ff400] frame B:153 Avg QP:19.57 size: 1966
50.729 Started command progress : ffmpeg [libx264 @ 0xf35ff400] consecutive B-frames: 0.5% 0.0% 0.0% 99.5%
50.737 Started command progress : ffmpeg [libx264 @ 0xf35ff400] mb I I16..4: 31.5% 61.8% 6.7%
50.742 Started command progress : ffmpeg [libx264 @ 0xf35ff400] mb P I16..4: 2.3% 2.0% 0.1% P16..4: 31.9% 5.7% 2.3% 0.0% 0.0% skip:55.6%
50.750 Started command progress : ffmpeg [libx264 @ 0xf35ff400] mb B I16..4: 0.1% 0.0% 0.0% B16..8: 18.2% 0.3% 0.0% direct: 1.0% skip:80.3% L0:46.2% L1:53.2% BI: 0.6%
50.753 Started command progress : ffmpeg [libx264 @ 0xf35ff400] 8x8 transform intra:49.4% inter:92.4%
50.754 Started command progress : ffmpeg [libx264 @ 0xf35ff400] coded y,uvDC,uvAC intra: 19.1% 26.6% 3.8% inter: 2.5% 7.1% 0.0%
50.756 Started command progress : ffmpeg [libx264 @ 0xf35ff400] i16 v,h,dc,p: 41% 15% 5% 39%
50.764 Started command progress : ffmpeg [libx264 @ 0xf35ff400] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 14% 32% 3% 5% 5% 4% 4% 3%
50.767 Started command progress : ffmpeg [libx264 @ 0xf35ff400] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 35% 20% 25% 2% 6% 4% 4% 2% 1%
50.768 Started command progress : ffmpeg [libx264 @ 0xf35ff400] i8c dc,h,v,p: 56% 20% 20% 4%
50.772 Started command progress : ffmpeg [libx264 @ 0xf35ff400] Weighted P-Frames: Y:0.0% UV:0.0%
50.774 Started command progress : ffmpeg [libx264 @ 0xf35ff400] ref P L0: 54.0% 5.5% 29.8% 10.6%
50.776 Started command progress : ffmpeg [libx264 @ 0xf35ff400] ref B L0: 76.8% 18.5% 4.7%
50.777 Started command progress : ffmpeg [libx264 @ 0xf35ff400] ref B L1: 96.2% 3.8%
50.779 Started command progress : ffmpeg [libx264 @ 0xf35ff400] kb/s:834.67
50.898 Started command progress : ffmpeg [aac @ 0xf35ffc00] Qavg: 1539.341
50.960 SUCCESS with output : ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (GCC)
configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Movies/temp1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.25.100
Duration: 00:00:05.55, start: 0.021333, bitrate: 191 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc), 360x360 [SAR 16:9 DAR 16:9], 113 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 70 kb/s (default)
Metadata:
handler_name : SoundHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Movies/temp2.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.25.100
Duration: 00:00:06.73, start: 0.021333, bitrate: 170 kb/s
Stream #1:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc), 360x360 [SAR 9:16 DAR 9:16], 90 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #1:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 70 kb/s (default)
Metadata:
handler_name : SoundHandler
Input #2, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Movies/temp3.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.25.100
Duration: 00:00:08.50, start: 0.021333, bitrate: 177 kb/s
Stream #2:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc), 360x360 [SAR 9:16 DAR 9:16], 97 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #2:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 70 kb/s (default)
Metadata:
handler_name : SoundHandler
[Parsed_amerge_7 @ 0xf38a7780] No channel layout for input 1
[Parsed_amerge_7 @ 0xf38a7780] Input channel layouts overlap: output layout will be determined by the number of distinct input channels
[swscaler @ 0xf35f1000] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0xf35e6000] deprecated pixel format used, make sure you did set range correctly
No pixel format specified, yuvj420p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0xf35ff400] using SAR=16/9
[libx264 @ 0xf35ff400] using cpu capabilities: none!
[libx264 @ 0xf3
50.966 Finished command : ffmpeg [Ljava.lang.String;@7c54447 -
ffmpeg, v4l, snd_aloop ... sound asyncron (alsa buffer xrun)
28 janvier 2019, par TobiasI’m trying to create a stream that automatically reloads random inputs. I would like to extend this to a database later.
Each time ffmpeg finishes and starts again, so the input changes, the connection to the rtmp is interrupted briefly causing the whole connection breaks down. I then tried to separate audio and video, to send them to virtual devices and read from there again. Split the stream on virtual devices, reassemble them directly and send them to rtmp. If the input is then exchanged, the sending to the devices interrupts what does not bother the second ffmpeg. As soon as I stop sending to the devices the fps go very slowly (10 - 20 sec) from 25 to 0. Only then does the transmitter ffmpeg break the connection to the rtmp. The script which exchanges the inputs needs only one second. A practical test showed that everything works as desired.
I can quite comfortably change the input while the second ffmpeg maintains the stream ...
The joy did not last long. The sound is good 1 sec delayed. But sporadically. Sometimes everything works great. Sometimes the sound is offset.
I wrote several scripts for this.
Background :
- File is selected by random
- Media file is split and written to / dev / video0 (v4l loopback) and alsa default (snd_aloop loopback)
- Put the splits together again and stream them to a rtmp server
Code that selects the input and sends to / dev / video0 and alsa default
#!/bin/bash
cat /dev/null > log
while true;
do
WATERMARK="watermark.png";
dir='/homeXXXXXXXXXX/mix'
file=`/bin/ls -1 "$dir" | sort --random-sort | head -1`
DATEI=`readlink --canonicalize "$dir/$file"` # Converts to full path
if [ -z $DATEI ]
then
echo "Keine Datei gefunden" >> log;
else
START=$(date +%s);
echo "Sende $DATEI" >> log;
ffmpeg -re -y -i "$DATEI" -c:v libx264 -vf "fps=25,scale=640:480,setdar=4:3" -async 1 -pix_fmt yuv420p -preset ultrafast -map 0:0 -f v4l2 -vcodec rawvideo /dev/video0 -f alsa default
fi
DOKILL=`cat kill`;
if [ "$DOKILL" = "1"]
then
break;
fi
doneThe Output
./run.sh
ffmpeg version 3.2.12-1~deb9u1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
configuration: --prefix=/usr --extra-version='1~deb9u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/mix/XXXXXXXXXXXXX.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : XXXXXXXXXXXXXXX
encoder : Lavf57.41.100
Duration: 00:03:53.48, start: 0.000000, bitrate: 2705 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 2573 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
Metadata:
handler_name : SoundHandler
Codec AVOption preset (Configuration preset) specified for output file #0 (/dev/video0) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
[Parsed_setdar_2 @ 0x5571234fe020] num:den syntax is deprecated, please use num/den or named options instead
-async is forwarded to lavfi similarly to -af aresample=async=1:min_hard_comp=0.100000:first_pts=0.
Output #0, v4l2, to '/dev/video0':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : XXXXXXXXXXX
encoder : Lavf57.56.101
Stream #0:0(und): Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc57.64.101 rawvideo
Output #1, alsa, to 'default':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : XXXXXXXXXX
encoder : Lavf57.56.101
Stream #1:0(und): Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s (default)
Metadata:
handler_name : SoundHandler
encoder : Lavc57.64.101 pcm_s16le
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))
Stream #0:1 -> #1:0 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
frame= 736 fps= 24 q=-0.0 Lsize=N/A time=00:00:29.67 bitrate=N/A speed=0.979x
video:331200kB audio:5112kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Exiting normally, received signal 2.The send script
#!/bin/bash
IP="XXXXXXXXX";
ffmpeg -f video4linux2 -i /dev/video0 -f alsa -acodec pcm_s16le -i default -f flv -async 1 -pix_fmt yuv420p -preset ultrafast -vcodec libx264 -r 25 -s 640x260 -acodec aac rtmp://$IP:1935/live/testThe Output
./send_stream.sh
ffmpeg version 3.2.12-1~deb9u1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
configuration: --prefix=/usr --extra-version='1~deb9u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1548393682.674066, bitrate: 110592 kb/s
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, 110592 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, alsa, from 'default':
Duration: N/A, start: 1548393682.677901, bitrate: 1536 kb/s
Stream #1:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
-async is forwarded to lavfi similarly to -af aresample=async=1:min_hard_comp=0.100000:first_pts=0.
[libx264 @ 0x55e22cfa4f00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x55e22cfa4f00] profile Constrained Baseline, level 2.1
[libx264 @ 0x55e22cfa4f00] 264 - core 148 r2748 97eaef2 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 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=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, flv, to 'rtmp://XXXXXXXXXXX:1935/live/test':
Metadata:
encoder : Lavf57.56.101
Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 640x260, q=-1--1, 25 fps, 1k tbn, 25 tbc
Metadata:
encoder : Lavc57.64.101 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 48000 Hz, stereo, fltp, 128 kb/s
Metadata:
encoder : Lavc57.64.101 aac
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Stream #1:0 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
[alsa @ 0x55e22cf87300] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[video4linux2,v4l2 @ 0x55e22cf84fe0] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
Past duration 0.613319 too large 7344kB time=00:01:05.85 bitrate= 913.5kbits/s speed=1.04x
Past duration 0.614372 too large 7644kB time=00:01:08.39 bitrate= 915.6kbits/s speed=1.04x
Past duration 0.609749 too large 7834kB time=00:01:10.91 bitrate= 905.0kbits/s speed=1.04x
Past duration 0.604362 too large 8038kB time=00:01:12.92 bitrate= 903.0kbits/s speed=1.04x
Past duration 0.609489 too large 8070kB time=00:01:13.45 bitrate= 900.1kbits/s speed=1.04x
Past duration 0.615013 too large 8094kB time=00:01:13.94 bitrate= 896.8kbits/s speed=1.04x
Past duration 0.610893 too large 8179kB time=00:01:14.94 bitrate= 894.0kbits/s speed=1.04x
Past duration 0.664711 too large
Past duration 0.639565 too large 8263kB time=00:01:15.47 bitrate= 896.8kbits/s speed=1.04x
Past duration 0.668999 too large 8339kB time=00:01:15.94 bitrate= 899.5kbits/s speed=1.04x
Past duration 0.605766 too large
Past duration 0.633049 too large 8399kB time=00:01:16.48 bitrate= 899.6kbits/s speed=1.04x
Past duration 0.674599 too large
Past duration 0.616035 too large 8451kB time=00:01:16.95 bitrate= 899.7kbits/s speed=1.04x
Past duration 0.656136 too large
Past duration 0.604195 too large
Past duration 0.601387 too large 8512kB time=00:01:17.46 bitrate= 900.2kbits/s speed=1.04x
Past duration 0.621895 too large 8565kB time=00:01:17.95 bitrate= 900.1kbits/s speed=1.04x
Past duration 0.670937 too large 8605kB time=00:01:18.46 bitrate= 898.4kbits/s speed=1.04x
Past duration 0.604500 too large 8642kB time=00:01:18.99 bitrate= 896.2kbits/s speed=1.04x
frame= 1913 fps= 25 q=-1.0 Lsize= 8670kB time=00:01:19.48 bitrate= 893.6kbits/s speed=1.04x
video:7290kB audio:1280kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.160292%
[libx264 @ 0x55e22cfa4f00] frame I:8 Avg QP:18.25 size: 15502
[libx264 @ 0x55e22cfa4f00] frame P:1905 Avg QP:20.95 size: 3853
[libx264 @ 0x55e22cfa4f00] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0x55e22cfa4f00] mb P I16..4: 6.4% 0.0% 0.0% P16..4: 38.1% 0.0% 0.0% 0.0% 0.0% skip:55.5%
[libx264 @ 0x55e22cfa4f00] coded y,uvDC,uvAC intra: 46.0% 30.3% 13.4% inter: 20.1% 9.8% 1.1%
[libx264 @ 0x55e22cfa4f00] i16 v,h,dc,p: 47% 34% 10% 9%
[libx264 @ 0x55e22cfa4f00] i8c dc,h,v,p: 45% 28% 22% 5%
[libx264 @ 0x55e22cfa4f00] kb/s:750.98
[aac @ 0x55e22cfa62a0] Qavg: 579.067
Exiting normally, received signal 2.First everything is fine and then comes
Past duration 0.616035 too large 8451kB time=00:01:16.95 bitrate= 899.7kbits/s speed=1.04x
Past duration 0.656136 too large
Past duration 0.604195 too large
Past duration 0.601387 too large 8512kB time=00:01:17.46 bitrate= 900.2kbits/s speed=1.04xAnd then when that comes, dives in the first window, so in the ffmpeg sends the input :
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))
Stream #0:1 -> #1:0 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
frame= 9 fps=0.0 q=-0.0 size=N/A time=00:00:00.36 bitrate=N/A dup=1 drop=0 spframe= 21 fps= 21 q=-0.0 size=N/A time=00:00:00.84 bitrate=N/A dup=1 drop=0 sp[alsa @ 0x5643b3293160] ALSA buffer xrun.
Last message repeated 1 times
frame= 33 fps= 22 q=-0.0 size=N/A time=00:00:01.32 bitrate=N/A dup=1 drop=0 sp[alsa @ 0x5643b3293160] ALSA buffer xrun.
Last message repeated 1 times
frame= 46 fps= 23 q=-0.0 size=N/A time=00:00:01.84 bitrate=N/A dup=1 drop=0 spframe= 58 fps= 23 q=-0.0 size=N/A time=00:00:02.32 bitrate=N/A dup=1 drop=0 spframe= 71 fps= 24 q=-0.0 size=N/A time=00:00:02.84 bitrate=N/A dup=1 drop=0 spframe= 83 fps= 24 q=-0.0 size=N/A time=00:00:03.32 bitrate=N/A dup=1 drop=0 sp[alsa @ 0x5643b3293160] ALSA buffer xrun.
frame= 96 fps= 24 q=-0.0 size=N/A time=00:00:03.84 bitrate=N/A dup=1 drop=0 sp[alsa @ 0x5643b3293160] ALSA buffer xrun.The sound is then absolutely unsynchronized ...
Does anyone have any advice and can help me ?
-
ffmpeg audio conversion : encoder pcm_u8 working pcm_s8 not
14 novembre 2018, par patsznI need to convert audio inside video to 8 Bit signed PCM. I try it like this :
C:\Users\E\Desktop\ffmpeg-20160731-04da20e-win32-static\bin>ffmpeg -i minions.mp4 -vcodec mjpeg -s 800x480 -acodec pcm_s8 -ac 1 out.avi
output :
ffmpeg version N-81192-g04da20e Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-lib
ebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfree
type --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-lib
openjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-
libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 51.100 / 57. 51.100
libavformat 57. 44.100 / 57. 44.100
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 49.100 / 6. 49.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'minions.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2016-03-17 10:06:57
Duration: 00:03:18.72, start: 0.000000, bitrate: 1869 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1675 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default
)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 192 kb/s (default)
Metadata:
creation_time : 2016-03-17 10:06:58
handler_name : IsoMedia File Produced by Google, 5-11-2011
[swscaler @ 04821880] deprecated pixel format used, make sure you did set range correctly
[avi @ 048c0460] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Last message repeated 1 times
Output #0, avi, to 'out.avi':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
encoder : Lavf57.44.100
Stream #0:0(und): Video: mjpeg (MJPG / 0x47504A4D), yuvj420p(pc), 800x480 [SAR 16:15 DAR 16:9], q=2-31, 200 kb/s, 23.98 fps, 23.98 tbn, 23.98 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc57.51.100 mjpeg
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
Stream #0:1(und): Audio: pcm_s8, 44100 Hz, mono, u8, 352 kb/s (default)
Metadata:
creation_time : 2016-03-17 10:06:58
handler_name : IsoMedia File Produced by Google, 5-11-2011
encoder : Lavc57.51.100 pcm_s8
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
Stream #0:1 -> #0:1 (aac (native) -> pcm_s8 (native))
Could not write header for output file #0 (incorrect codec parameters ?): Operation not permittedffmpeg can not write a header for output file. I want to mention that if audio encoder is selected to pcm_u8 everything works fine.
C:\Users\E\Desktop\ffmpeg-20160731-04da20e-win32-static\bin>ffmpeg -i minions.mp4 -vcodec mjpeg -s 800x480 -acodec pcm_u8 -ac 1 out.avi
output :
ffmpeg version N-81192-g04da20e Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-lib
ebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfree
type --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-lib
openjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-
libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 51.100 / 57. 51.100
libavformat 57. 44.100 / 57. 44.100
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 49.100 / 6. 49.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'minions.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2016-03-17 10:06:57
Duration: 00:03:18.72, start: 0.000000, bitrate: 1869 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1675 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default
)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 192 kb/s (default)
Metadata:
creation_time : 2016-03-17 10:06:58
handler_name : IsoMedia File Produced by Google, 5-11-2011
File 'out.avi' already exists. Overwrite ? [y/N] y
[swscaler @ 030a1880] deprecated pixel format used, make sure you did set range correctly
[avi @ 04a10460] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Last message repeated 1 times
Output #0, avi, to 'out.avi':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
ISFT : Lavf57.44.100
Stream #0:0(und): Video: mjpeg (MJPG / 0x47504A4D), yuvj420p(pc), 800x480 [SAR 16:15 DAR 16:9], q=2-31, 200 kb/s, 23.98 fps, 23.98 tbn, 23.98 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc57.51.100 mjpeg
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
Stream #0:1(und): Audio: pcm_u8 ([1][0][0][0] / 0x0001), 44100 Hz, mono, u8, 352 kb/s (default)
Metadata:
creation_time : 2016-03-17 10:06:58
handler_name : IsoMedia File Produced by Google, 5-11-2011
encoder : Lavc57.51.100 pcm_u8
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
Stream #0:1 -> #0:1 (aac (native) -> pcm_u8 (native))
Press [q] to stop, [?] for help
frame= 4764 fps=250 q=24.8 Lsize= 74247kB time=00:03:18.71 bitrate=3060.8kbits/s speed=10.4x
video:65364kB audio:8558kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.438745%What is the problem ? Why conversion does not work for signed pcm ?
Encoders for both unsigned and signed pcm are avaible :
C:\Users\E\Desktop\ffmpeg-20160731-04da20e-win32-static\bin>ffmpeg -encoders
.
.
A..... pcm_f32be PCM 32-bit floating point big-endian
A..... pcm_f32le PCM 32-bit floating point little-endian
A..... pcm_f64be PCM 64-bit floating point big-endian
A..... pcm_f64le PCM 64-bit floating point little-endian
A..... pcm_mulaw PCM mu-law / G.711 mu-law
A..... pcm_s16be PCM signed 16-bit big-endian
A..... pcm_s16be_planar PCM signed 16-bit big-endian planar
A..... pcm_s16le PCM signed 16-bit little-endian
A..... pcm_s16le_planar PCM signed 16-bit little-endian planar
A..... pcm_s24be PCM signed 24-bit big-endian
A..... pcm_s24daud PCM D-Cinema audio signed 24-bit
A..... pcm_s24le PCM signed 24-bit little-endian
A..... pcm_s24le_planar PCM signed 24-bit little-endian planar
A..... pcm_s32be PCM signed 32-bit big-endian
A..... pcm_s32le PCM signed 32-bit little-endian
A..... pcm_s32le_planar PCM signed 32-bit little-endian planar
A..... pcm_s8 PCM signed 8-bit
A..... pcm_s8_planar PCM signed 8-bit planar
A..... pcm_u16be PCM unsigned 16-bit big-endian
A..... pcm_u16le PCM unsigned 16-bit little-endian
A..... pcm_u24be PCM unsigned 24-bit big-endian
A..... pcm_u24le PCM unsigned 24-bit little-endian
A..... pcm_u32be PCM unsigned 32-bit big-endian
A..... pcm_u32le PCM unsigned 32-bit little-endian
A..... pcm_u8 PCM unsigned 8-bit
.
.