
Recherche avancée
Autres articles (55)
-
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 (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)
Sur d’autres sites (5413)
-
How can combine two separate scripts being piped together to make one script instead of two ?
27 mars 2016, par user556068For the past couple hours I’ve been banging my head against the wall trying to figure out something I thought would be simple. Maybe it is but it’s beyond me at the moment. So I have now two scripts. Originallly they were part of the same but I could never make it work how it should. So the first part uses
curl
to download a file from a site. Then usinggrep
andsed
to filter out the text I need which is then put into a plain text file as a long list of website urls ; one per line. The last part of the 1st script calls onyoutube -dl
to read the batch file in order to obtain the web addresses where the actual content is located. I hope that makes sense.youtube-dl
reads the batch file and outputs a new list urls into the terminal. This second list is not saved to file because it doesn’t need to be. These urls change from day to day or hour to hour. Using theread
command, these urls are then passed to ffmpeg using a predetermined set of arguments for the input and output. Ffmpeg is executed on every url it receives and runs quietly in the background.The first paragraph describes
script1.sh
and paragraph 2 obviously describesscript2.sh
. When I pipe them together likescript1.sh | script2.sh
it works better than I ever thought possible. Maybe i’m nitpicking at this point but the idea is to have 1 unified script. For the moment I have simplified it by adding an alias to my.bash_profile
.Here are the last two commands of script1.
sed 's/\"\,/\//g' > "$HOME/file2.txt";
cat $HOME/file2.txt | youtube-dl --ignore-config -iga -The trailing
-
allows youtube-dl to read from stdin.The second part of the script ; what I’m calling script2 at this point begins with
while read -r input
do
ffmpeg [arg] [input] [arg2] [output]What am i not seeing that is causing the script to hang when the two halves are combined yet work perfectly if one is piped into the other ?
-
ffmpeg, stretch audio to x seconds
9 mai 2016, par Max DoumitI am trying to make an audio file be exactly x second.
So far i tried using the
atempo
filter by doing the following calculationAudio length / desired length = atempo.
But this is not accurate, and I am having to tweak the tempo manually to get it to an exact fit.
Are there any other solutions to get this work ? Or am I doing this incorrectly ?
My original file is a wav file, and my output in an mp3
Here is a sample command
ffmpeg -i input.wav -codec:a libmp3lame -filter:a "atempo=0.9992323" -b:a 320K output.mp3
UPDATE.
I was able to correctly calculate the tempo by changing the way I am receiving the audio length.
I am now calculating the current audio length using the actual file size and the sample rate.
Audio Length = file size / (sample rate * 2)
Sample rate is something like 16000 Hz. You can get that by using ffprob or ffmpeg.
EDIT - Solved
Figured it out.
I was calculating the tempo incorrectly.Audio length / desired length = atempo
Should be
desired length / Audio length = atempo
I had to do a bit more reading on what the tempo actually does. Hope this helps someone.
-
Moving files into sub folders based by average filesize
5 février 2016, par darkshaedI need the help of you programming savants in creating a batch script or powershell script that will move and divide a group of files from one directory into 4 subdirectories based on an average total filesize. After the sort, the sub-directories should be roughly equal in terms of folder size.
Why do I need this ?
I have 4 computers that I would like to utilize for encoding via FFMPEG and it would be helpful for a script to divide a folder into 4 parts (sub-directories) based on a total average size.
So lets say there are an assortment of movie files with varying different file sizes totaling to 100 GB, the script would divy the movie files and move them into 4 sub folders ; each folder having around 25 GB. Doing this will allow the 4 machines to encode the sum of the data equally and efficiently.
After all that encoding I’ll have 2 files, XYZ.(original Extension) and XYZ.264, A script that could compare the 2 files and delete the larger file would be extremely helpful and cut down on manual inspection.
Thank you, I hope this is possible.