
Recherche avancée
Médias (1)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
Autres articles (45)
-
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 -
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...) -
MediaSPIP Player : les contrôles
26 mai 2010, parLes contrôles à la souris du lecteur
En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...)
Sur d’autres sites (9221)
-
FFMPEG with python : Only audio is playing when trying to replace the audio in video
5 mai 2021, par DannyHey guys I am a noob with ffmpeg and trying to replace the audio with a new audio, I have gone through some SO questions and still having trouble solving the problem. As of now, I am getting only the audio with the specified duration and only able to play it in vlc player. The video is not showing.


Can someone tell me how to properly do it ?


This is the command.


process = subprocess.call([settings.VIDEO_ENCODING_FFMPEG_PATH, 
 "-probesize", "10M", "-i", input_file_path, "-i", input_audio_path, "-crf", "28",
 "-ss", 0, "-t", 50, "-vcodec", "libx264", "-b:v", "4M", "-preset", "medium",
 "-map", '0:v', "-map", "1:a", "-b:a", "64k", output_file_path])



Thanks in advance.


-
Audio playing back at the wrong speed using FFmpeg on Android
11 avril 2019, par Kyborg2011General problem in the following :
I decode the audio as follows :ReSampleContext* rsc = av_audio_resample_init(
1, aCodecCtx->channels,
aCodecCtx->sample_rate, aCodecCtx->sample_rate,
av_get_sample_fmt("u8"), aCodecCtx->sample_fmt,
16, 10, 0, 1);
while (av_read_frame(pFormatCtx, &packet)>= 0) {
if (aCodecCtx->codec_type == AVMEDIA_TYPE_AUDIO) {
int data_size = AVCODEC_MAX_AUDIO_FRAME_SIZE * 2;
int size=packet.size;
int decoded = 0;
while(size > 0) {
int len = avcodec_decode_audio3(aCodecCtx, pAudioBuffer,
&data_size, &packet);
//Сonvert audio to sample 8bit
out_size = audio_resample(rsc, outBuffer, pAudioBuffer, len);
jbyte *bytes = (*env)->GetByteArrayElements(env, array, NULL);
memcpy(bytes, outBuffer, out_size);
(*env)->ReleaseByteArrayElements(env, array, bytes, 0);
(*env)->CallStaticVoidMethod(env, cls, mid, array, out_size, number);
size -= len;
number++;
}
}
}Next release it AudioTrack. After that, I hear that song that was necessary, but with noise and speed of 2 times larger. In what may be the problem ?
UPDATE :
This is Java code :public static AudioTrack track;
public static byte[] bytes;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
int bufSize = 2048;
track = new AudioTrack(AudioManager.STREAM_MUSIC, 44100, AudioFormat.CHANNEL_OUT_MONO,
AudioFormat.ENCODING_PCM_8BIT, bufSize, AudioTrack.MODE_STREAM);
bytes = new byte[bufSize];
Thread mAudioThread = new Thread(new Runnable() {
public void run() {
int res = main(2, "/sdcard/muzika_iz_reklami_bmw_5_series_-_bmw_5_series.mp3", bytes);
System.out.println(res);
}
});
mAudioThread.setPriority(Thread.MAX_PRIORITY);
mAudioThread.start();
}
private static void play(byte[] play, int length, int p) {
if (p==0){
track.play();
}
track.write(play, 0, length);
} -
How to prevent ffmpeg lib from printing in a command line when playing audio with a discord bot ?
26 janvier 2021, par ICookieII have a question about ffmpeg. I wrote a discord bot with discord.py lib, which plays audio when somebody joins a channel. I wanted the program to run on my computer in the background, so no console log will appear. Therefore I start the python script using a .bat and a .vbs file, so the process runs in the background. This works fine so far. The problem is that the ffmpeg lib (I assume it's the ffmpeg lib...) prints out a line ("[mp3 @ 0000020168869040] Estimating duration from bitrate, this may be inaccurate") in the command prompt when it plays audio, so everytime somebody joins a channel a command prompt appear on my desktop for 1 sec only to show this line, afterwards it closes, but it's really annoying that it shows up everytime. I was wondering if there is a way to prevent the ffmpeg lib to print out this line, but i couldnt find out how so far.
Can someone help me with that ?
Thanks Cookie


my Code :


def getAudioSource(source):

 audio_source = discord.FFmpegPCMAudio(executable="E:/PythonPrograms/DiscordBotHallo/Dateien/ffmpeg-win64-v4.2.2.exe", source=source)
 return audio_source


def getRandomGreeting():

 list = os.listdir("E:/PythonPrograms/DiscordBotHallo/Begrüßungen")
 Greeting = list[random.randrange(len(list))]
 Greeting = "Begrüßungen/" + Greeting
 return Greeting


@client.event
async def on_voice_state_update(member, before, after):

 if before.channel == None and member.id != 801800464756768768:
 greetingPath = getRandomGreeting()
 audio_source = getAudioSource(greetingPath)
 vc = await after.channel.connect()
 vc.play(audio_source)
 while vc.is_playing():
 await asyncio.sleep(1)
 vc.stop()
 await vc.disconnect()