
Recherche avancée
Médias (91)
-
Spoon - Revenge !
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
My Morning Jacket - One Big Holiday
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Zap Mama - Wadidyusay ?
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
David Byrne - My Fair Lady
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Beastie Boys - Now Get Busy
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (97)
-
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 ) (...) -
Formulaire personnalisable
21 juin 2013, parCette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire. (...) -
Qu’est ce qu’un masque de formulaire
13 juin 2013, parUn masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
Chaque formulaire de publication d’objet peut donc être personnalisé.
Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)
Sur d’autres sites (7109)
-
mp4 generated by moviepy no sound with tweepy
2 décembre 2020, par Will RoweI'm using MoviePy to edit a mp4 file and then Tweepy to tweet out the video.


Here's what I have currently :


clip = VideoFileClip("c:/users/.../UNIQUENAME2.mp4").subclip(8) #cut off the first 8 seconds of the clip
clip.write_videofile("c:/users/.../UNIQUENAME2-finished.mp4")
clip.close()
highlightz = TweetMachine()
highlightz.makeAVidTweet('c:/users/.../UNIQUENAME2-finished.mp4','audio test')



Here's my TweetMachine :


def makeAVidTweet(self,fileLoc,text):
 upload_result = self.api.media_upload(fileLoc)
 time.sleep(120) #wait just in case things are still processing
 media_ids = [upload_result.media_id_string]
 self.api.update_status(status=text, media_ids=media_ids)



Currently, the video is cut fine and UNIQUENAME2-finished.mp4 is constructed correctly such that if I open the file on my computer, the video is cut correctly and the sound works. However, the video posted on Twitter has no sound.


I'm assuming it's some sort of issue with how MoviePy makes the mp4 file and Twitter not liking something with the sound settings, but I'm pretty unfamiliar with mp4 stuff and I couldn't find anything about it on the MoviePy or Tweepy docs.


Any tips or thoughts would be greatly appreciated !


Stream info from VLC :
Codec : MPEG Audio layer 1/2 (mpga),
Type : Audio,
Channels : Stereo,
Sample Rate : 44100 Hz,
Bits per sample : 32,
Bitrate : 128 kb/s


-
ffmpeg : md5 of m3u8 playlists generated from same input video with different segment durations (after applying video filter) don't match
15 juillet 2020, par Saurabh P BhandariHere are a few commands I am using to convert and transize a video in mp4 format to a m3u8 playlist.


For a given input video (mp4 format), generate multiple video only segments with segment duration 30s


ffmpeg -loglevel error -i input.mp4 -dn -sn -an -c:v copy -bsf:v h264_mp4toannexb -copyts -start_at_zero -f segment -segment_time 30 30%03d.mp4 -dn -sn -vn -c:a copy audio.aac



Apply video filter (in this case scaling) on each segment and convert it to a m3u8 format


ls 30*.mp4 | parallel 'ffmpeg -loglevel error -i {} -vf scale=-2:144 -hls_list_size 0 {}.m3u8'



Store the list of m3u8 files generated in
list.txt
in this formatfile 'segment-name.m3u8'


for f in 30*.m3u8; do echo "file '$f'" >> list.txt; done



Using concat demuxer, combine all segment files (which are in m3u8 format) and the audio to get one final m3u8 playlist pointing to segments with duration of 10s.


ffmpeg -loglevel error -f concat -i list.txt -i audio.aac -c copy -hls_list_size 0 -hls_time 10 output_30.m3u8




I can change the segment duration in the first step from 30s to 60s, and compare the md5 of the final m3u8 playlist generated in both the cases using this command


ffmpeg -loglevel error -i <input m3u8="m3u8" playlist="playlist" /> -f md5 - 



The md5 of the output files differ i.e video streams of
output_30.m3u8
andoutput_60.m3u8
are not the same.

Can anyone elaborate on this ?


(I expected the md5 to be the same)


-
FFProbe generated data don't seem to agree with calculated data using ffmpeg libraries
18 janvier 2020, par ark1974Using ffmpeg library avformat I am trying to check if the ffprobe generated data agrees with the data generated by the library. The code objective is to try to seek to the nearest key frame. When trying to seek at 100 frame or less, the codes returns 0 all the time.
When trying to seek at 200 frame, the codes returns 4 all the time. But the result ie 4th frame don’t seem to be right. Where am I wrong ? Is my time_base conversion to actual frame faulty ?The test result using ffprobe
Filename = test.mp4
Duration = 00:00:10.56
Fps = 25
Total frames = 256
The key frames pkt_pts_time are at 2.120000 and 0.000000 (using -skip_frame nokey )
Corresponding pkt_duration_time: 0.040000 and 0.040000 ( same, why?)Abstract of the code :
// Objective: seek to the nearest key frame
frameIndex = 200;
int64_t timeBase = (int64_t(pCodecCtx->time_base.num) * AV_TIME_BASE) / int64_t(pCodecCtx->time_base.den);
int64_t seekTarget = int64_t(frameIndex) * timeBase;
if (av_seek_frame(pFormatCtx, -1, seekTarget, AVSEEK_FLAG_FRAME | AVSEEK_FLAG_BACKWARD) < 0) return -1;
//convert the time_base to actual frame
auto time2frame = [&](int64_t tb) {
return tb * int64_t(pCodecCtx->time_base.den) / (int64_t(pCodecCtx->time_base.num) * AV_TIME_BASE);
};
AVPacket avPacket;
int result = av_read_frame(pFormatCtx, &avPacket);
if (result == 0) {
auto dts = avPacket.dts;
auto pts = avPacket.pts;
auto idx = avPacket.stream_index;
auto f = time2frame(pts); // expecting the actual frame here
std::cout << dts << pts << idx << f;
}