
Recherche avancée
Autres articles (112)
-
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 ;
-
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)
Sur d’autres sites (8279)
-
Google Analytics 4 (GA4) vs Matomo
7 avril 2022, par Erin -
Files dissapearing with ffmpeg recursive conversion
13 août 2014, par CaRoXoI started in askubuntu, asking for a way to convert recursively more than 14K of wma to mp3 extracting the wma files path from a txt file.
There was an answer that could cover my needs, but a bug appears. The first run with some hundreds worked ok. The second, some wma albums got converted, others entirely deleted. There were some modifications. And last time completely, deleted all wma without converting.this was the original script
#!/usr/bin/env bash
readarray -t files < wma-files.txt
for file in "${files[@]}"; do
out=`echo $file | sed "s:wma:mp3:"`
probe=`avprobe -show_streams "$file" 2>/dev/null`
rate=`echo "$probe" | grep "bit_rate" | sed "s:.*=\(.*\)[0-9][0-9][0-9][.].*:\1:"`
avconv -i "$file" -ab "$rate"k "$out"
rm "$file"
doneThen the adaptation with ffmpeg
#!/usr/bin/env bash
readarray -t files < wma-files.txt
for file in "${files[@]}"; do
out=`echo $file | sed "s:wma:mp3:"`
probe=`avprobe -show_streams "$file" 2>/dev/null`
rate=`echo "$probe" | grep "bit_rate" | sed "s:.*=\(.*\)[0-9][0-9][0-9][.].*:\1:"`
ffmpeg -i "$file" -ab "$rate"k "$out" && rm "$file"
doneWith the first one I converted many files. Other just get deleted. The ones deleted were always the same release (so, all tracks from a release). I can listen, and even convert them with Soundkonverter.
Both of them produces "no such file of directory" and when this happens, everything get deleted.
The partition where files are stored is a usb HDD ntfs, but also happens in my ext4 internal HD.
Im under Xubuntu 14.04Here the script running with avconv (wich what i managed to convert some, but other get dissapeared) http://pastebin.com/w5weqEws and with ffmpeg (that didn’t convert any) http://pastebin.com/3QkaPzvW
I can’t find differences between successfully and deleted original wma’s. But for example, while other progs like beets read and write the tags, puddletag and mp3tag (under wine) don’t, until I converted them with soundkonverter.
As the person trying to help me there redirect me here on the original post http://askubuntu.com/questions/508278/how-to-use-ffmpeg-to-convert-wma-to-mp3-recursively-importing-from-txt-file/508304#508304
Im here asking for any help to make run an script like this. Or any to use ffmpeg to convert recursively the audio files. My capacity of understanding is short for being able to make something working just reading the docs.So I ask a help to run this. If I miss any relevant information, just tell me.
NOTE : I want to add that doing the conversion with
for file in "${files[@]}"; do
out=`echo "$file" | sed s:wma:mp3:`
avconv -i "$file" -ab 192k "$out"
rm "$file"
doneIt works in the same files (the ones that are deleted with the other). Only that it makes everything to 192k, so not good if Im converting lower bitrate ones. And get this error "Application provided invalid, non monotonically increasing dts to muxer in stream 0" that seems something typical from avconv in 14.04. With ffmpeg I cant try becouse I don’t find the way how to use it, even out of the script. I really don’t understand the docs seems
.NOTE2 : This is a mediainfo exit from :
1- A typical wma that get dissapeared always with the script
Audio
ID : 1
Format : WMA
Format version : Version 2
Codec ID : 161
Codec ID/Info : Windows Media Audio
Description of the codec : Windows Media Audio 9 - 128 kbps, 44 kHz, stereo 1-pass CBR
Duration : 2mn 25s
Bit rate mode : Constant
Bit rate : 128 Kbps
Channel(s) : 2 channels
Sampling rate : 44.1 KHz
Bit depth : 16 bits
Stream size : 2.21 MiB (99%)
Language : English (US)2- A Wma that got succesfully converted (yes Im using copies now, I cant risk specially some rares audios that I got on the road)
Audio
ID : 1
Format : WMA
Format version : Version 2
Codec ID : 161
Codec ID/Info : Windows Media Audio
Description of the codec : Windows Media Audio 9 - 128 kbps, 44 kHz, stereo 1-pass CBR
Duration : 4mn 35s
Bit rate mode : Constant
Bit rate : 128 Kbps
Channel(s) : 2 channels
Sampling rate : 44.1 KHz
Bit depth : 16 bits
Stream size : 4.21 MiB (99%)
Language : English (US)So, as I don’t see difference, but maybe, I’m losing any data to look into ?
-
Of ctors and dtors
18 février 2011, par Multimedia Mike — Programming, Sega DreamcastI haven’t given up on the Sega Dreamcast programming. I was able to compile a bunch of homebrew code for the DC many years ago and I can’t make it work anymore. Again, I was working with a purpose-built, open source RTOS named KallistiOS (or KOS). I can make the programs compile but not run. I had ELF files left over from years ago which still executed. But when I tried to build new ELF files, no luck— the programs crashed before even reaching my main() function.
I found the problem : ELF files are comprised of a number of sections and 2 of these sections are named ’.ctors’ and ’.dtors’ which stand for constructors and destructors. The KOS RTOS performs a manual traversal of .ctors section during program initialization and this is where things go bad. The traversal code doesn’t seem to account for a .ctors section that only contains a single entry. I commented out the function that does the traversal and programs started to work, at least until it was time to exit the program and return control to the program loader. That’s when the counterpart .dtors section traversal code ran and demonstrated the same problem. I’ll exhibit the problematic code at the end of this post.
So I’m finally tinkering with Sega Dreamcast programming once again and with a slightly better grasp of software engineering than the first time I did this.
Portable and Compatible C ?
If nothing else, this low-level embedded stuff exposes you to some serious toolchain arcana, the likes of which you will likely never see working strictly in the desktop arena.Still, this exercise makes me wonder why C code from a decade ago doesn’t compile reliably now. Part of it is because gcc has gotten stricter about the syntax it will accept. In the case of this specific crashing problem, I suspect it comes down to a difference in the way the linker generates the final ELF file. I’ve written a list of items I have had to modify in the KOS codebase in order to get it to compile on more recent gcc versions. I wonder if it would be worth publishing the specifics, or if anyone would ever find the information useful ? Oh, who am I kidding ? Of course I’ll write it up, perhaps publish a new version of the code, if only because that’s the best chance I have of finding my own work again some years down the road.
Problematic C Code
See if this code makes any sense to you. It somehow traverse a list of 32-bit function pointers (in different directions, depending on constructors or destructors), executing each in turn. However, it appears to fall over if the list of pointers consists of a single entry.
C :-
typedef void (*fptr)(void) ;
-
-
static fptr ctor_list[1] __attribute__((section(".ctors"))) = { (fptr) -1 } ;
-
static fptr dtor_list[1] __attribute__((section(".dtors"))) = { (fptr) -1 } ;
-
-
/* Call this to execute all ctors */
-
void arch_ctors() {
-
fptr *fpp ;
-
-
/* Run up to the end of the list (defined by crtend) */
-
for (fpp=ctor_list + 1 ; *fpp != 0 ; ++fpp)
-
;
-
-
/* Now run the ctors backwards */
-
while (—fpp> ctor_list)
-
(**fpp)() ;
-
}
-
-
/* Call this to execute all dtors */
-
void arch_dtors() {
-
fptr *fpp ;
-
-
/* Do the dtors forwards */
-
for (fpp=dtor_list + 1 ; *fpp != 0 ; ++fpp )
-
(**fpp)() ;
-
}
-