
Recherche avancée
Autres articles (90)
-
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 ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)
Sur d’autres sites (5245)
-
Streaming a programatically created video to youtube using node and ffmpeg
23 septembre 2020, par CaltropI've been trying to Livestream a programmatically created image to youtube using node. I've had very limited success using FFmpeg. While I have managed to create and save an image thanks to this insightful thread, I have yet to make the code work for streaming to an RTMP server.


const cp = require('child_process'),
 destination = 'rtmp://a.rtmp.youtube.com/live2/[redacted]', //stream token redacted
 proc = cp.spawn('./ffmpeg/bin/ffmpeg.exe', [
 '-f', 'rawvideo',
 '-pix_fmt', 'rgb24',
 '-s', '426x240',
 '-i', '-', //allow us to insert a buffer through stdin
 '-f', 'flv',
 destination
 ]);

proc.stderr.pipe(process.stdout);

(function loop() {
 setTimeout(loop, 1000 / 30); //run loop at 30 fps
 const data = Array.from({length: 426 * 240 * 4}, () => ~~(Math.random() * 0xff)); //create array with random data
 proc.stdin.write(Buffer.from(data)); //convert array to buffer and send it to ffmpeg
})();



When running this code no errors appear and everything appears to be working, however, YouTube reports that no data is being received. Does anybody know what is going wrong here ?


Update : This is really counter-intuitive but adding a slash to the destination like this
'rtmp://a.rtmp.youtube.com/live2/[redacted]/'
causes ffmpeg to throw a genericI/O error
. This is really weird to me. Apologies if the answer to this is obvious, I'm really inexperienced with ffmpeg.

-
Embedding Audio File to Video
19 septembre 2022, par Hamza NaeemI had a special .wav file with some encodings in it and i want to insert this into video file. I tried this with moviepy using the following method but it doesn't helped me as the audio get distorted.


import moviepy
from moviepy.editor import VideoFileClip, AudioFileClip, CompositeAudioClip, concatenate_audioclips


if __name__ == "__main__":
audio_file = f'audios/a1.wav'
 video_file = f'videos/v1.mp4'
 audio_clip = AudioFileClip(audio_file)
 video_clip = VideoFileClip(video_file)

 final_audio = CompositeAudioClip([video_clip.audio, audio_clip])
 video_clip.write_videofile(f'results/out.mp4')
 video_clip.close()
 audio_clip.close()



nothing with ffmpeg as :


import ffmpeg

if __name__ == "__main__":
 video = ffmpeg.input(f'videos/v1.mp4').video # get only video channel
 audio = ffmpeg.input(f'audios/a1.wav').audio # get only audio channel
 output = ffmpeg.output(video, audio, f'results/output.mp4', vcodec='copy', acodec='aac', strict='experimental')
 ffmpeg.run(output)



although I can extract the perfect mp3 file using pydub, but again inserting this into video distort the audio. it may due to miss match of fps or something else. The pydub stuff is as follows :


import pydub
from pydub import AudioSegment

audio_file = f'audios/a1.wav'
sound = pydub.AudioSegment.from_mp3(audio_file)
sound.export("results/apple.mp3", format="wav")



can anyone here to guide me with the correct method.


Thanks in advance.


-
Revision 6723e34224 : Merge "fix permissions on cpplint.py (0644->0755)" into experimental
4 mai 2013, par James ZernMerge "fix permissions on cpplint.py (0644->0755)" into experimental