
Recherche avancée
Autres articles (86)
-
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 (...) -
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)
Sur d’autres sites (10804)
-
Crop MP3 to first 30 seconds
2 décembre 2016, par CheekysoftOriginal Question
I want to be able to generate a new (fully valid) MP3 file from an existing MP3 file to be used as a preview — try-before-you-buy style. The new file should only contain the first n seconds of the track.
Now, I know I could just "chop the stream" at n seconds (calculating from the bitrate and header size) when delivering the file, but this is a bit dirty and a real PITA on a VBR track. I’d like to be able to generate a proper MP3 file.
Anyone any ideas ?
Answers
Both mp3split and ffmpeg are both good solutions. I chose ffmpeg as it is commonly installed on linux servers and is also easily available for windows. Here’s some more good command line parameters for generating previews with ffmpeg
-t <seconds></seconds>
chop after specified number of seconds-y
force file overwrite-ab <bitrate></bitrate>
set bitrate e.g. -ab 96k-ar <rate hz="hz"></rate>
set sampling rate e.g. -ar 22050 for 22.05kHz-map_meta_data <outfile>:<infile></infile></outfile>
copy track metadata from infile to outfile
instead of setting -ab and -ar, you can copy the original track settings, as Tim Farley suggests, with :
-acodec copy
-
Interact with ffmpeg from a .NET program - Write Input
7 mai 2015, par ShimmyIn reference to this question, as you can see I managed to run and receive data from the program.
However I didn’t manage to submit data to it, for instance, while converting a file, pressing
q
immediately stop conversion and stops the program.
I need my application to support stopping the process as well, and I think this should be done by passing this parameter to the ffmpeg app, since I want it to take care of all uncollected resource or whatever dust it would leave behind if I would just go and useprocess.Kill()
Here is what I’ve tried :
static int lineCount = 0;
static bool flag;
static void process_ErrorDataReceived(object sender, DataReceivedEventArgs e)
{
Console.WriteLine("Error ({1:m:s:fff}: {0})", lineCount++,
DateTime.Now);
if (e.Data != null && string.Equals(e.Data,"Press [q] to stop, [?] for help"))
flag = true;
if (flag)
{
flag = false;
Console.WriteLine("Stopping ({0:m:s:fff})...", DateTime.Now);
process.CancelErrorRead();
process.CancelOutputRead();
process.StandardInput.WriteLine("q");
}
Console.WriteLine(e.Data);
Console.WriteLine();
}But it doesn’t do anything, seems that once the conversion has been requested, I have no control on it any more, I can only receive output from it. Running it as stand alone does allow me interaction of course.
What am I missing here, is it a different trick in submitting the output or the code in previous answer is wrong, or I should have chosen a different approach ?
For your attention,
RedirectStandardInput
is on.NOTE : as you can see in the answer of my previous question, ffmpeg interacts differently, I think the one who knows the answer will be (maybe I’m wrong) someone with experience in ffmpeg.
-
ffmpeg based app and VLC IPC ?
1er avril 2012, par ronagI have an application that uses the ffmpeg libraries (not ffmpeg.exe) to encode video and would like to forward the encoded data directly to a VLC process.
Right now I use udp ://localhost (i.e.
avio_open("udp://localhost:5290")
andvlc udp://@localhost:5290
) for interprocess communication, however it seems a bit unreliable.ffmpeg (avio_open) doesn't seem to support named pipes, i.e.
\\.\pipe\test
is not accepted, and I cannot use standard output/input piping since the applications run in different processes.Soo my question is, how can I achieve reliable (and somewhat efficient) interprocess communication between VLC and an application using the ffmpeg libraries ?