
Recherche avancée
Médias (1)
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
Autres articles (43)
-
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (7176)
-
Show progress bar of a ffmpeg video convertion
13 juin 2022, par stackexchange.com-upvm25mzI'm trying to print a progress bar while executing ffmpeg but I'm having trouble getting the total number of frames and the current frame being processed. The error I get is
AttributeError: 'NoneType' object has no attribute 'groups'
. I've copied the function from this program and for some reason it works there but not here, even though I haven't changed that part.



pattern_duration = re.compile(
 'duration[ \t\r]?:[ \t\r]?(.+?),[ \t\r]?start', re.IGNORECASE)
pattern_progress = re.compile('time=(.+?)[ \t\r]?bitrate', re.IGNORECASE)

def execute_ffmpeg(self, manager, cmd):
 proc = expect.spawn(cmd, encoding='utf-8')
 self.update_progress_bar(proc, manager)
 self.raise_ffmpeg_error(proc)

def update_progress_bar(self, proc, manager):
 total = self.get_total_frames(proc)
 cont = 0
 pbar = self.initialize_progress_bar(manager)
 try:
 proc.expect(pattern_duration)
 while True:
 progress = self.get_current_frame(proc)
 percent = progress / total * 100
 pbar.update(percent - cont)
 cont = percent
 except expect.EOF:
 pass
 finally:
 if pbar is not None:
 pbar.close()

def raise_ffmpeg_error(self, proc):
 proc.expect(expect.EOF)
 res = proc.before
 res += proc.read()
 exitstatus = proc.wait()
 if exitstatus:
 raise ffmpeg.Error('ffmpeg', '', res)

def initialize_progress_bar(self, manager):
 pbar = None
 pbar = manager.counter(
 total=100,
 desc=self.path.rsplit(os.path.sep, 1)[-1],
 unit='%',
 bar_format=BAR_FMT,
 counter_format=COUNTER_FMT,
 leave=False
 )
 return pbar

def get_total_frames(self, proc):
 return sum(map(lambda x: float(
 x[1])*60**x[0], enumerate(reversed(proc.match.groups()[0].strip().split(':')))))

def get_current_frame(self, proc):
 proc.expect(pattern_progress)
 return sum(map(lambda x: float(
 x[1])*60**x[0], enumerate(reversed(proc.match.groups()[0].strip().split(':')))))



-
Show video length in HLS player before all TS files are created
14 novembre 2022, par WilliamTacoI have a spring-boot backend which on request (on demand) uses ffmpeg to create a m3u8 playlist with its ts files from a mp4 file. So basically my react frontend requests the index.m3u8 from the backend and if it doesnt already exist it creates it and then start serving it with its ts files. This causes the frontend HLS player to show the length of the video to the combined length of the generated chunks which gets longer as time goes on until its fully there. It totally makes sense but was wondering what the correct way of showing the full length in the player even though its not fully created yet ?


Im using react-hls-player for playing the stream and spring-boot + a java ffmpeg wrapper to transcode the video.


Might be thinking about this the wrong way so feel free to correct me if im in the wrong path !


-
How to show subtitle on video in ffmpeg
19 février 2023, par AmmaraI am working with ffmpeg. I use below code to show subtitle on video. I create video but subtitle did not show. Please help me
Here is my code. here is my abc.srt file. I store this to my download folder of mobile


1
00:00:00,000 --> 00:00:01,500
This an example subtitle

2
00:00:01,600 --> 00:00:02,500
<i>Italic style</i>

3 
00:00:03,000 --> 00:00:15,000
 Video by Tiger Lily on pexels.com



here is ffmpeg command


String srt=BASE_PATH+'abc.srt';
 String CommandOverlay=' -i ${video1} -i "$srt" -c:v copy -c:a copy -c:s mov_text ${OUTPUT_PATH}';
 await FFmpegKit.execute(CommandOverlay).then((session) async {
 final returnCode = await session.getReturnCode();
 if (ReturnCode.isSuccess(returnCode)) {print("Task Completed");}
 else if (ReturnCode.isCancel(returnCode)) {print("cancel");}
 else {print("error ");}
 });
}else if (await Permission.storage.isPermanentlyDenied) {
 openAppSettings();
}



It generates video without any subtitle