
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (48)
-
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
Sur d’autres sites (6223)
-
(no accepted answer) How to merge 2 overlapping videos into one video using ffmpeg or opencv ?
3 janvier 2021, par Muhammad UmerMerging two videos is easy, been answered couple of times. What I have is multiple overlapping videos. A video might have overlaps with video before it. Meaning if video 1 covers 1-5 timeline then video 2 may overlap 1, and cover 3 to 8. Merging them as is would result in 1-5|3-8, when i need 1-8 only.



Videos are alphabetically sorted.



My general idea of solution is...



- 

- grab last frame of the video
- if it's first video continue
- if it's not first video, ie. 2nd, search for frame saved in previous steps frame by frame
- if it reaches to last frame of current video then there is no overlap continue
- if it founds a frame then clip 2nd video up to that frame inclusive and then go to next frame
- once all videos have been analyzed, merge them into one video.















I need to translate this to ffmpeg commands. Or opencv if that's a better tool.



If there is better way of doing that, I'm interested in that too.


-
FFmpeg youtube stream get corrupted until restart
19 février 2023, par unpwnI am streaming images from python to youtube using ffmpeg.
It's working fine with just one problem.
Sometimes the stream get somehow corrupted an the stream looks like this :




Or you can see for yourself in the stream itself : https://www.youtube.com/watch?v=PG6NLtr0jjM (Scroll back to the beginning)


Then I have to restart ffmpeg and its working fine. Sometimes an error occurs regarding the network and I have to automatically restart the stream. Then there is the possibility it is corrupted again.


The parameters for ffmpeg are the following :


cmd_out = ['ffmpeg',
 '-re',
 '-f', 'concat',
 '-i', os.path.join(BASE_DIR, 'music', 'music.txt').replace('\\', '/'), 
 '-r', '1',
 '-f', 'image2pipe',
 '-vcodec', 'png',
 '-r', '1',
 '-i', '-',
 '-c:v', 'libx264',
 '-c:a', 'copy',
 '-g', '4',
 '-f', 'flv',
 'rtmp://a.rtmp.youtube.com/live2/{}'.format(stream_key)] 



I never had that problem testing it on windows. It just appears when I use my linux server.


I am using ffmpeg version 3.2.18-0+deb9u1 and the generated images are fine, when I save them to a normal file.


Does someone know how to fix it ? Or where the problem is comming from ?



Solution : An old ffmpeg version was available while using docker. I solved the problem by using a static build from https://www.johnvansickle.com/ffmpeg/


I used this to use it in docker :


WORKDIR /app
ADD ./ffmpeg /app
RUN mv ffmpeg /usr/local/ffmpeg
RUN chmod +x /usr/local/ffmpeg



Until now the error seems to be solved.


-
Node js async/await promise problem with ytdl and ffmpeg
31 août 2020, par WorkoutBuddyI built a simple youtube downloader cli. It looks like this (without any arg parsing for easier reproduction) :


const ytdl = require('ytdl-core');
const config = require('config');
const progressBar = require('./progressBar');
const logger = require('./logger');
const ffmpeg = require('fluent-ffmpeg');

const url = 'https://www.youtube.com/watch?v=Np8ibIagn3M';

const getInfo = async (url) => {
 logger.info(`Getting metadata for ${url}`);
 const response = await ytdl.getBasicInfo(url);
 const info = response.videoDetails.title;
 logger.info(`Title: ${info}`);
 return info;
};

const getStream = async (url) => {
 logger.info(`Downloading from ${url} ...`);

 let allReceived = false;
 return new Promise((resolve, reject) => {
 const stream = ytdl(url, {
 quality: 'highest',
 filter: (format) => format.container === 'mp4',
 })
 .on('progress', (_, totalDownloaded, total) => {
 if (!allReceived) {
 progressBar.start(total, 0, {
 mbTotal: (total / 1024 / 1024).toFixed(2),
 mbValue: 0,
 });
 allReceived = true;
 }
 progressBar.increment();
 progressBar.update(totalDownloaded, {
 mbValue: (totalDownloaded / 1024 / 1024).toFixed(2),
 });
 })
 .on('end', () => {
 progressBar.stop();
 logger.info('Successfully downloaded the stream!');
 });
 return resolve(stream);
 });
};

const convertToMp3 = async (stream, title) => {
 return new Promise((resolve, reject) => {
 ffmpeg({ source: stream })
 .output(`${config.get('audioDir')}/${title}.mp3`)
 .audioBitrate('192k')
 .run();
 return resolve();
 });
};

const main = async (url) => {
 const info = await getInfo(url);
 console.log('here 1');
 const stream = await getStream(url);
 console.log('here 2');
 await convertToMp3(stream, info);
 console.log('done');
};

main(url);



The output looks like :


➜ node youtube.js
info: Getting metadata for https://www.youtube.com/watch?v=Np8ibIagn3M
info: Title: Tu boca - (Bachata Remix Dj Khalid)
here 1
info: Downloading from https://www.youtube.com/watch?v=Np8ibIagn3M ...
here 2
done
[Progress] [████████████████████████████████████████] 100% | Downloaded: 7.15/7.15 MB | Elapsed Time: 5s
info: Successfully downloaded the stream!



However, I would expect this output :


➜ node youtube.js
info: Getting metadata for https://www.youtube.com/watch?v=Np8ibIagn3M
info: Title: Tu boca - (Bachata Remix Dj Khalid)
here 1
info: Downloading from https://www.youtube.com/watch?v=Np8ibIagn3M ...
[Progress] [████████████████████████████████████████] 100% | Downloaded: 7.15/7.15 MB | Elapsed Time: 5s
here 2
info: Successfully downloaded the stream!
done



I think I have troubles to understand async/await. As far as I understood, promisifying a function allows me wait for the result. However, it seems that it does not work. I do not know why and how to properly debug it.


EDITED :


const getStream = async (url) => {
 logger.info(`Downloading from ${url} ...`);

 let allReceived = false;
 return new Promise((resolve, reject) => {
 const stream = ytdl(url, {
 quality: 'highest',
 filter: (format) => format.container === 'mp4',
 })
 .on('progress', (_, totalDownloaded, total) => {
 console.log('totalDownloaded: ' + totalDownloaded);
 if (!allReceived) {
 console.log('total: ' + total);
 progressBar.start(total, 0, {
 mbTotal: (total / 1024 / 1024).toFixed(2),
 mbValue: 0,
 });
 allReceived = true;
 }
 progressBar.increment();
 progressBar.update(totalDownloaded, {
 mbValue: (totalDownloaded / 1024 / 1024).toFixed(2),
 });
 })
 .on('end', () => {
 progressBar.stop();
 logger.info('Successfully downloaded the stream!');
 resolve(stream);
 });
 });
};



But now it is like this :


➜ node youtube.js
info: Getting metadata for https://www.youtube.com/watch?v=Np8ibIagn3M
info: Title: Tu boca - (Bachata Remix Dj Khalid)
here 1
info: Downloading from https://www.youtube.com/watch?v=Np8ibIagn3M ...
[Progress] [██████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 14% | Downloaded: 1.02/7.15 MB | Elapsed Time: 52s



Added console.log :


totalDownloaded: 16384
total: 7493903
[Progress] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% | Downloaded: 0/7.15 MB | Elapsed Time: 0stotalDownloaded: 32768
totalDownloaded: 49152
totalDownloaded: 65536
totalDownloaded: 81920
totalDownloaded: 98304
totalDownloaded: 114688
totalDownloaded: 131072
totalDownloaded: 147456
totalDownloaded: 163840
totalDownloaded: 180224
totalDownloaded: 196608
totalDownloaded: 212992
totalDownloaded: 229376
totalDownloaded: 245760
totalDownloaded: 262144
totalDownloaded: 278528
totalDownloaded: 294912
totalDownloaded: 311296
totalDownloaded: 327680
totalDownloaded: 344064
totalDownloaded: 360448
totalDownloaded: 376832
totalDownloaded: 393216
totalDownloaded: 409600
totalDownloaded: 425984
totalDownloaded: 442368
totalDownloaded: 458752
totalDownloaded: 475136
totalDownloaded: 491520
totalDownloaded: 507904
totalDownloaded: 524288
totalDownloaded: 540672
totalDownloaded: 557056
totalDownloaded: 573440
totalDownloaded: 589824
totalDownloaded: 606208
totalDownloaded: 622592
totalDownloaded: 638976
totalDownloaded: 655360
totalDownloaded: 671744
totalDownloaded: 688128
totalDownloaded: 704512
totalDownloaded: 720896
totalDownloaded: 737280
totalDownloaded: 753664
totalDownloaded: 770048
totalDownloaded: 786432
totalDownloaded: 802816
totalDownloaded: 819200
totalDownloaded: 835584
totalDownloaded: 851968
totalDownloaded: 868352
totalDownloaded: 884736
totalDownloaded: 901120
totalDownloaded: 917504
totalDownloaded: 933888
totalDownloaded: 950272
totalDownloaded: 966656
totalDownloaded: 983040
totalDownloaded: 999424
totalDownloaded: 1015808
totalDownloaded: 1032192
totalDownloaded: 1048576
totalDownloaded: 1064960
[Progress] [██████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 14% | Downloaded: 1.02/7.15 MB | Elapsed Time: 25s