
Recherche avancée
Autres articles (97)
-
Les images
15 mai 2013 -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...)
Sur d’autres sites (5709)
-
ffmpeg image + audio to video, file size is very large ?
10 juin 2019, par HoopesI have a single image and a single audio file, and I’m trying to combine them into a video. The image is
186k
and the audio is242k
, and the resultingmp4
file is928k
. Is this just one of those "Yeah, that’s how that works", or can I do something to make the resulting video file smaller with my ffmpeg command ? I’d like my output to beh264
video, and the audio to have the same quality as the input. The image in the video should ideally be as high quality as the input.My command is :
ffmpeg -loop 1 -i image.jpg -i audio.mp3 -c:v libx264 -tune stillimage -c:a mp3 -b:a 192k -pix_fmt yuv420p -shortest result.mp4
Are there any interesting flags I’m missing, or using any of those flags incorrectly ? If the input file is
m4a
, do I still need to use mp3 for anmp4
file ?Any help is very much appreciated, thanks !
-
ffmpeg to hls not running correctly with error :Uncaught RangeError : Source is too large
4 juillet 2019, par Mohsen RahnamaeiI want to add watermark in each video file which produce from hls server.
inorder to do that I am using fluent ffmpeg js componnent.
and this is my backend code of hls serverself.provider.getSegmentStream(req, function (err, stream) {
res.setHeader('Content-Type', CONTENT_TYPE.SEGMENT)
res.statusCode = 200
var proc = ffmpeg(req.filePath). videoFilters(
{
filter: 'drawtext',
options: {
text: 'VERY LONG TEXT VERY VERY VERY VERY LOL!!!',
fontsize: 36,
fontcolor: 'white',
x: '(main_w/2-text_w/2)',
y: '(text_h/2)+15',
shadowcolor: 'black',
shadowx: 2,
shadowy: 2
}}
)
.videoCodec('libx264')
.audioBitrate('128k')
.audioCodec('aac')
.format('mpegts')
.on('end', function(stdout, stderr) {
console.log('Transcoding succeeded !',req.filePath);
})
.on('error', function(err) {
console.log('an error happened: ' + err.message);
}).pipe(res ,{end:true})and in my client i am using this code :
if(Hls.isSupported())
{
console.log('hls is suported');
var video = document.getElementById('video');
var hls = new Hls();
hls.loadSource('http://serverip:8182/streams/stream.m3u8');
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED,function()
{
video.play();
});
}
else if (video.canPlayType('application/vnd.apple.mpegurl'))
{
console.log('hls isnot suported');
video.src = 'http://serverip/streams/stream.m3u8';
video.addEventListener('canplay',function()
{
video.play();
});
}but i have problem becaus its just play first ts file but after that hls has stoped and in console i get this error :
Uncaught RangeError: Source is too large
at Uint8Array.set (<anonymous>)
at e.remuxAudio (blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1)
at e.remux (blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1)
at e.append (blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1)
at e.pushDecrypted (blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1)
at e.push (blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1)
at blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1
</anonymous>what should i do
-
ffmpeg to hls not running correctly with error :Uncaught RangeError : Source is too large
4 juillet 2019, par Mohsen RahnamaeiI want to add watermark in each video file which produce from hls server.
inorder to do that I am using fluent ffmpeg js componnent.
and this is my backend code of hls server



self.provider.getSegmentStream(req, function (err, stream) {



res.setHeader('Content-Type', CONTENT_TYPE.SEGMENT)
res.statusCode = 200
var proc = ffmpeg(req.filePath). videoFilters(
 {
filter: 'drawtext',
options: {
 text: 'VERY LONG TEXT VERY VERY VERY VERY LOL!!!',
 fontsize: 36,
 fontcolor: 'white',
 x: '(main_w/2-text_w/2)',
 y: '(text_h/2)+15',
 shadowcolor: 'black',
 shadowx: 2,
 shadowy: 2
}}

 ) 

.videoCodec('libx264')

 .audioBitrate('128k')

 .audioCodec('aac')

.format('mpegts')
.on('end', function(stdout, stderr) {
console.log('Transcoding succeeded !',req.filePath);

})

.on('error', function(err) {
 console.log('an error happened: ' + err.message);
 }).pipe(res ,{end:true})




and in my client i am using this code :



if(Hls.isSupported())
{
 console.log('hls is suported');
 var video = document.getElementById('video');
 var hls = new Hls();
 hls.loadSource('http://serverip:8182/streams/stream.m3u8');
 hls.attachMedia(video);
 hls.on(Hls.Events.MANIFEST_PARSED,function()
 {
 video.play();
 });
}
else if (video.canPlayType('application/vnd.apple.mpegurl'))
{
 console.log('hls isnot suported');

 video.src = 'http://serverip/streams/stream.m3u8';
 video.addEventListener('canplay',function()
 {
 video.play();
 });
}




but i have problem becaus its just play first ts file but after that hls has stoped and in console i get this error :



Uncaught RangeError: Source is too large
at Uint8Array.set (<anonymous>)
at e.remuxAudio (blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1)
at e.remux (blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1)
at e.append (blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1)
at e.pushDecrypted (blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1)
at e.push (blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1)
at blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1
</anonymous>



what should i do