
Recherche avancée
Autres articles (111)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (8888)
-
ffmpeg - when scaling, how to keep shapes of people's heads
19 janvier 2017, par DaveOk, I’m quite familiar with FFMPEG utility in general, and have used it for
years to cut short snippets from videos, etc. But it’s only in the last
month that and I decided to learn to use it to transcode with video-filters
etc. (Before that, I was using other tools such as ’Handbrake’ and ’FreeMake’
and VLC, etc.)For my ffmpeg transcodes, my target output resolution will always be constant, from one transcode run to the next. But the resolution and display aspect-ratio of the input file, from one transcode run to the next, will vary...could be almost any values.
The input files will never already have black-bars when displayed.So, the relevant portion [ i.e. the video-filter(s) part) of my cmd line ] presently is as follows :
ffmpeg ... -vf "scale=720:406,setsar=1,pad=720:506:0:40:Black" ...
Also note : I do NOT use the "-aspect" option in the cmd-line. (Maybe I’ll
need to (???) to solve my issue, but I’m unsure about how that interacts
with scaling.)( EDIT : Oh, I happen to have chosen that resolution value of 720x406, for
the image-area (i.e. inside the top/bottom black bars) because it
has an aspect ratio of 16:9 (Of course, 16:9 ratio is common these days. )My cmd always executes cleanly and produces an output file (a WebM, tho I doubt
that container types and/or vcodec choices matter at all to scaling algorithm issues).So the issue/problem that I’m trying to solve is how to prevent any stretching
in either direction. In other words, a round soccer ball in the input file
must yield a round ball in the output file ! (NOT oval-shaped in either axis).( Edit #2 : Oh, I forgot to mention that I’m not have the same amount of stretching from one ffmpeg output file to the next. Sometimes there is
no stretch in my output file, and with some other input file, the
people are too tall in the output, and some other output file will have
people are too wide. I’m assuming
there is some single cmd that will always work for each randomly sized
input file, WITHOUT having to resort to examining meta-data of each
input and then having to adjust portions of the needed ffmpeg cmd.
I assume this because I have used a tool called "FreeMake" that needs
no such adjustment. When you do a ’scale’ with that program, it asks
you to choose one of four adjustment-algorithms labeled "original"
"stretched", "zoom..." and "auto". If I recall correctly, it was the
"auto" choice that prevented any stretching.)The goal of that last filter (i.e. the "pad=720:506:0:40:Black" phrase) is to
add a black bar of 40 pixels to the top and 60 pixels to the bottom.
(That filter IS producing the black-bands, as desired. I mention it,
because I’m unsure whether it could be having any effect on the altered
shape of the ’round soccer ball’). If the "pad" filter IS part of the
issue, then maybe I’ll need to make multiple ffmpeg cmds to achieve
my overall goal (!?!?). [I’d LIKE to be able to do everything in just
one ffmpeg cmd, as shown.]OK ?
So are there any image-processing and ffmpeg gurus out there that
know how to fix my problem ?TIA...
Dave
-
FFmpeg errors when adding a new song to queue in Discord bot
5 novembre 2023, par FerasI am facing issues with my Discord bot, which is designed to play music from YouTube and Spotify. The bot uses
pytube
andyoutube-dl
to download the audio and then plays it using Discord'sFFmpegPCMAudio
. The bot is able to play a song correctly, but errors occur as soon as I try to add a new song to the queue. Here are some of the error messages I'm receiving :

[aac @ 0000017d8fe84ac0] channel element 0.10 is not allocated
Error while decoding stream #0:0: Invalid data found when processing input
[aac @ 0000017d8fe84ac0] channel element 3.12 is not allocated
Error while decoding stream #0:0: Invalid data found when processing input
[aac @ 0000017d8fe84ac0] channel element 2.12 is not allocated
...
[aac @ 0000017d8fe84ac0] Prediction is not allowed in AAC-LC.
Error while decoding stream #0:0: Invalid data found when processing input
[aac @ 0000017d8fe84ac0] Number of scalefactor bands in group (56) exceeds limit (47).
Error while decoding stream #0:0: Invalid data found when processing input



Here's how I'm using FFmpeg in my code :


ctx.voice_client.play(discord.FFmpegPCMAudio(executable="ffmpeg", source=new_song['file_path'], options="-err_detect ignore_err -strict -2 -loglevel warning"), after=lambda e: play_next(ctx))



The first song plays without any issues, but as soon as I add a new song to the queue, these errors appear.


How can I resolve these errors ?


I have tried adjusting FFmpeg options and ensuring the downloaded files are intact, but the errors persist.


-
Extracting MP3 Data from Generic Movie Files using FFMPEG
21 février 2017, par MoonKnightI am using FFMPEG via MediaToolkit to extract MP3 data (to .mp3 file) from different movie files (merely .mp4 and .mov for now).
MediaToolkit is just a C# wrapper for FFMPEG which calls FFMPEG via
Process.Start
, so to do this I am using the methodpublic static string GenerateMp3FromVideoFile(string filePath)
{
string mp3Path = String.Empty;
using (var engine = new Engine())
{
mp3Path = Path.GetFileNameWithoutExtension(filePath);
mp3Path = Path.Combine(Utils.GetBuildRoamingAppDataDirectory(), mp3Path);
mp3Path = Path.ChangeExtension(mp3Path, ".mp3");
string paramString = String.Format(
//"-i \"{0}\" -q:a 0 -map a \"{1}\"",
//"-i \"{0}\" -ar 320K \"{1}\"",
//"-i \"{0}\" -acodec libmp3lame -ar 44100 -b:a 192k -id3v2_version 3 -write_id3v1 1 \"{1}\"",
//"-i \"{0}\" -vn -ar 44100 -ac 2 -ab 192k -f mp3 \"{1}\"",
"-i \"{0}\" -acodec libmp3lame \"{1}\"",
filePath,
mp3Path);
engine.CustomCommand(paramString);
}
return mp3Path;
}All of the options I have tried above for the command line arguments passed to FFMPEG have worked for .mp4 video files and create the desired .mp3 output. However, for the .mov file I have I am getting the following
System.Exception
69 : video:0kB audio:1059kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead : 0.030074%Conversion failed !
I have tried a number of different methods to perform this extraction with varing control via the arguments passed to FFMPEG, but with no luck for the .mov file.
Looking at https://linuxconfig.org/ffmpeg-audio-format-conversions it seems as though there is not conversion to MP3 from .mov files, so I have looked at first converting the .mov to .mp4 via
ffmpeg -i mymovie.mov -vcodec copy -acodec copy out.mp4
and then extracting the audio, but this is expensive for large files. Is there a way of extracting the MP3 data directly from the .mov file ?
Thanks for your time.
When the above command is run from FFMPEG.exe, the output is :
[aac @ 00000000021b00a0] Inconsistent channel configuration.
[aac @ 00000000021b00a0] get_buffer() failed
Error while decoding stream #0:1 : Invalid argument
[aac @ 00000000021b00a0] Reserved bit set.
[aac @ 00000000021b00a0] Number of bands (6) exceeds limit (5).
Error while decoding stream #0:1 : Invalid data found when processing input
[aac @ 00000000021b00a0] Number of bands (16) exceeds limit (13).
Error while decoding stream #0:1 : Invalid data found when processing input
[aac @ 00000000021b00a0] channel element 3.7 is not allocated
Error while decoding stream #0:1 : Invalid data found when processing input
[aac @ 00000000021b00a0] channel element 3.8 is not allocated
Error while decoding stream #0:1 : Invalid data found when processing input
[aac @ 00000000021b00a0] Reserved bit set.
[aac @ 00000000021b00a0] TNS filter order 28 is greater than maximum 12.
Error while decoding stream #0:1 : Invalid data found when processing input
[aac @ 00000000021b00a0] Number of bands (26) exceeds limit (18).
Error while decoding stream #0:1 : Invalid data found when processing input
[aac @ 00000000021b00a0] Sample rate index in program config element does not match the sample rate index configured by
the container.
[aac @ 00000000021b00a0] Too large remapped id is not implemented. Update your FFmpeg version to the newest one from Git
. If the problem still occurs, it means that your file has a feature which has not been implemented.
[aac @ 00000000021b00a0] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and cont
act the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
Error while decoding stream #0:1 : Not yet implemented in FFmpeg, patches welcome
[aac @ 00000000021b00a0] Reserved bit set.
[aac @ 00000000021b00a0] Prediction is not allowed in AAC-LC.
Error while decoding stream #0:1 : Invalid data found when processing input
[aac @ 00000000021b00a0] Reserved bit set.
[aac @ 00000000021b00a0] ms_present = 3 is reserved.
Error while decoding stream #0:1 : Invalid data found when processing input
[aac @ 00000000021b00a0] Number of bands (3) exceeds limit (2).
Error while decoding stream #0:1 : Invalid data found when processing input
[aac @ 00000000021b00a0] SBR was found before the first channel element.
[aac @ 00000000021b00a0] channel element 3.14 is not allocated
Error while decoding stream #0:1 : Invalid data found when processing input
[aac @ 00000000021b00a0] Sample rate index in program config element does not match the sample rate index configured by
the container.