
Recherche avancée
Autres articles (60)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)
Sur d’autres sites (6045)
-
How can I transcode a file with FFMPEG and stream the output file in the response of a Java servlet ?
6 octobre 2012, par user1700589Basically, this is what I'm trying to do :
1. User passes a URL as a GET parameter to my servlet.
2. Servlet uses a ProcessBuilder to convert the media contained in that URL to a valid media format (ie : MP3).
3. The servlet streams the output file being transcoded by FFMPEG back to the browser.1 and 2 work fine, but it is 3 I am having a problem with. The best I can do is create a FileInputStream to the output file being transcoded and send that as the response but it is not working. My guess is that it is because the file is being written as I'm trying to stream it.
Is there anyway to intercept the output file argument in FFMPEG and read it into an InputStream ? In my mind it does not seem that it should be difficult to take input file A, transcode it to output file B, and then stream output file B back to the client, on the fly.
ProcessBuilder pb = new ProcessBuilder("ffmpeg.exe", "-i", url, "file.mp3");
Process p = pb.start();
final InputStream inStream = p.getErrorStream();
new Thread(new Runnable() {
public void run() {
InputStreamReader reader = new InputStreamReader(inStream);
Scanner scan = new Scanner(reader);
while (scan.hasNextLine()) {
System.out.println(scan.nextLine());
}
}
}).start();
ServletOutputStream stream = null;
BufferedInputStream buf = null;
try {
stream = response.getOutputStream();
File mp3 = new File(file.mp3");
//set response headers
response.setContentType("audio/mpeg");
response.addHeader("Content-Disposition", "attachment; filename=file.mp3");
response.setContentLength(-1);
//response.setContentLength((int) mp3.length());
FileInputStream input = new FileInputStream(mp3);
buf = new BufferedInputStream(input);
int readBytes = 0;
//read from the file; write to the ServletOutputStream
while ((readBytes = buf.read()) != -1) {
stream.write(readBytes);
}
} catch (IOException ioe) {
throw new ServletException(ioe.getMessage());
} finally {
if (stream != null) {
stream.close();
}
if (buf != null) {
buf.close();
}
} -
Convert m3u8 file to mp4 file in React Native Expo
19 mai 2024, par DRxHow can I convert m3u8 file to mp4 file in React Native Expo ?
I have tried to convert m3u8 file to mp4 using FFmpegKit but I have this errors :


'Cannot read property 'getLogLevel' of null' and 'Cannot read property 'ffmpegSession' of null'


Also building with this package failing (Could not determine the dependencies of task ':ffmpeg-kit-react-native:compileDebugAidl'.).


Is there a simple and easy way to convert m3u8 file in React Native Expo ?


Code I have used :


import { FFmpegKit } from 'ffmpeg-kit-react-native';
export async function converterToMp4() {
 try {
 await FFmpegKit.executeAsync(`-i ${m3u8FileUri} ${mp4FileUri}`)

 } catch(err) {
 console.log(err)
 }
}



-
My srt file includes positioning formatting, but I lose this when embeding into mp4 file with ffmpeg
15 mars 2023, par DzsetiI am trying to embed an srt subtitle file with subtitle positioning into an mp4 file using ffmpeg.


Is this possible ? Every time I try I lose the positioning formatting.