
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (54)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
L’utiliser, en parler, le critiquer
10 avril 2011La première attitude à adopter est d’en parler, soit directement avec les personnes impliquées dans son développement, soit autour de vous pour convaincre de nouvelles personnes à l’utiliser.
Plus la communauté sera nombreuse et plus les évolutions seront rapides ...
Une liste de discussion est disponible pour tout échange entre utilisateurs. -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)
Sur d’autres sites (9878)
-
Code runs when in a main method but not when in another method
8 août 2018, par Zubair AhmedI created the setArtwork method to set the artwork of an aac file in an .m4a container and it does exactly what I want it to when I run the main method
public static void setArtwork(File art, File m4a) throws Exception{
Mp4TagReader reader = new Mp4TagReader();
Mp4TagWriter writer = new Mp4TagWriter();
RandomAccessFile song = new RandomAccessFile(m4a.toString(),"rw");
Mp4Tag mp4tag = reader.read(song);
Artwork artwork = ArtworkFactory.createArtworkFromFile(art);
mp4tag.addField(artwork);
mp4tag.setField(artwork);
RandomAccessFile temp = new RandomAccessFile(m4a,"rw");
writer.write(mp4tag,song,temp);
}
public static void main(String[] args) throws Exception{
File art = new File("C:\\Users\\Zubair\\Documents\\music\\coverArt.jpeg");
File m4a = new File("C:\\Users\\Zubair\\Documents\\music\\song.m4a");
setArtwork(art,m4a);
}BUT, when I try to use the setArtwork method in a different method in a different class it doesn’t actually save the mp4 tag to the File. I did some debugging to see if the picture was even being added to the artwork tag and it all looks good, but it seems that the tag doesn’t get written to the file.
public static void mp3Tom4a(File mp3File, File m4aFolder, File coverArt) throws Exception {
String input = mp3File.toString();
String name = mp3File.getName();
String output = name.substring(0,name.indexOf(MP3)) + M4A;
output = m4aFolder.toString() + "\\" + output;
//cd ffmpeg\bin && ffmpeg -y -i input.mp3 -an -vcodec copy cover.jpg && ffmpeg -y -i input.mp3 -c:a aac -b:a 192k -vn output.m4a
ProcessBuilder builder = new ProcessBuilder(
"cmd.exe","/c","cd ffmpeg\\bin && ffmpeg -y -i "
+ input +" -an -vcodec copy "+coverArt+
" && ffmpeg -y -i " + input + " -c:a aac -b:a 128k -vn " + output);
builder.redirectErrorStream(true);
builder.start();
JAudioData.setArtwork(coverArt,new File(output));
}
public static void main(String[] args) throws Exception {
mp3Tom4a(new File("C:\\Users\\Zubair\\Documents\\music\\song.mp3"),
new File("C:\\Users\\Zubair\\Documents\\music"),
new File("C:\\Users\\Zubair\\Documents\\music\\coverArt.jpeg"));
}it doesn’t make sense that setArtwork only works when it’s in the main method of its own class, especially because the objects I am using for the parameters are identical to eachother, so there should be no difference in the result. I think it might have something to do with the RandomAccessFile object being updated but the physical storage not getting updated
Edit- If I comment out builder.start() then it can successfully write the mp4tag to the m4a file. But I don’t see why having builder.start() would prevent that from happenning. My best guess is that because builder.start() is what creates song.m4a it is still being "edited" by that and can’t be edited by any other processes.
-
wmavoice : disable bitstream checking.
20 décembre 2016, par Ronald S. Bultjewmavoice : disable bitstream checking.
The checked bitstream reader does that already. To allow parsing of
superframes split over a packet boundary, we always decode the last
superframe in each packet at the start of the next packet, even if
theoretically we could have decoded it. The last superframe in the
last packet is decoded using AV_CODEC_CAP_DELAY. -
FFmpeg amix + volume filters create saturated output ?
1er septembre 2021, par Sonia Seddiki

First of all, this is a question asked more out of curiosity than desperate need of fixing. I seem to have "fixed" it by upgrading from FFmpeg 3.4.6 to FFmpeg 4.3.1. Or so I think, at least the result is much better.




I'm trying to mix 2 audio files (of the same length, so no scale variation here) using FFmpeg
amix
filter :

- 

- A music which starts pretty loud in the beginning and then is almost quiet until the end,
- An audio that starts with silence (basically as long as the music is loud), then continues with a person speaking at an "average" volume






Now, I learnt that the filter will divide each input volume by
1/nb_active_inputs
(by 2 in my case then), so I added a volume filter on the output to multiply its volume by 2. My command basically looks like this :

ffmpeg -i music.mp3 -i voice.mp3 -filter_complex amix=inputs=2:duration=first[mix];[mix]volume=2[out] -map [out] output.mp3



After that complex filter, my final output is completely distorted. The voice sounds overall very loud and saturated.


I'm not an expert with audio nor with FFmpeg so I assume I'm missing something. I'm trying to understand what is going on and why I am having this result since I use the same inputs, filters and filter options in both cases. Only the FFmpeg version differs.


I've tried to read the code of
af_amix.c
for both versions but can't seem to find any explanation for that difference. I've seen that the 4.3.1 has aweights
option for inputs but from what I understood, they default to1.0
if not specified. Any clue would be much appreciated.