
Recherche avancée
Médias (29)
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (103)
-
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 -
Monitoring de fermes de MediaSPIP (et de SPIP tant qu’à faire)
31 mai 2013, parLorsque l’on gère plusieurs (voir plusieurs dizaines) de MediaSPIP sur la même installation, il peut être très pratique d’obtenir d’un coup d’oeil certaines informations.
Cet article a pour but de documenter les scripts de monitoring Munin développés avec l’aide d’Infini.
Ces scripts sont installés automatiquement par le script d’installation automatique si une installation de munin est détectée.
Description des scripts
Trois scripts Munin ont été développés :
1. mediaspip_medias
Un script de (...) -
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...)
Sur d’autres sites (10148)
-
Spaces in FFMPEG Input Thwart Execution
2 septembre 2021, par WoolwitWhat's so baffling, is why spaces in the audio input seem to work fine, but spaces in the video input break things.
This fetches random images from a directory, pairs them with random audio clips and joins them into an mp4 video.


def makeAudioImgMovs():
 randImgs = getImgs()
 compAudClips = makeAudioClips()
 audioJpgs = dict(zip(randImgs,compAudClips)) #Heres where we join the completed audio clips and the jpgs into a dict
 for jpg, aud in audioJpgs.items():
 print(f'The img is {jpg}, the type of the img is {type(jpg)} the aud is {aud} the type of the aud is {type(aud)}')
 subprocess.call('ffmpeg -hide_banner -loglevel error -loop 1 -i "{0}" -i "{1}"\
 -filter:v \
 "fade=in:st=0:d=1, fade=out:st=10:d=1,scale=720:480:force_original_aspect_ratio=decrease,pad=720:480:(ow-iw)/2:(oh-ih)/2,setsar=1" \
 -filter:a "afade=in:st=0:d=1, afade=out:st=10:d=1" \
 -c:v libx264 -t 11 -pix_fmt yuv420p -preset faster -shortest -c:a aac {2}.mp4'.format(jpg,aud,timePath/(pathlib.Path(jpg).stem)),shell=True)
makeAudioImgMovs()



The print statement is writing what is in the dict of audioJpgs list. For example...


The img is 2021-09-02-1-40/ponty_me.jpg, the type of the img is
the aud is 2021-09-02-1-40/Jms Brn like it is like it was.aiff the type of the aud is 

The img is 2021-09-02-1-40/1966taxiToMassFromMomBack 2.tiff, the type of the img is
the aud is 2021-09-02-1-40/Lola_Fay.mp3 the type of the aud is 

[NULL @ 0x7fe503021400] Unable to find a suitable output format for '2021-09-02-1-40/1966taxiToMassFromMomBack'
2021-09-02-1-40/1966taxiToMassFromMomBack : Invalid argument


The img is 2021-09-02-1-40/1966taxiToMassFromMomBack 5.tiff, the type of the img is
the aud is 2021-09-02-1-40/M Miller Lonnie's Lament.aiff the type of the aud is 

[NULL @ 0x7fd32a854c00] Unable to find a suitable output format for '2021-09-02-1-40/1966taxiToMassFromMomBack'
2021-09-02-1-40/1966taxiToMassFromMomBack : Invalid argument


The img is 2021-09-02-1-40/10_021390_danny ? 1_jpg.jpg, the type of the img is
the aud is 2021-09-02-1-40/i_got_to_rock.mp3 the type of the aud is 

[NULL @ 0x7f8449835800] Unable to find a suitable output format for '2021-09-02-1-40/10_021390_danny ?'
2021-09-02-1-40/10_021390_danny ? : Invalid argument


The img is 2021-09-02-1-40/11_021390_danny_2_jpg.jpg, the type of the img is
the aud is 2021-09-02-1-40/M Miller Power.aiff the type of the aud is 

The last pair of img/aud complete fine and write an mp4. Notice there, that the audio file has spaces in it !
Notice that the errors 'Invalid argument' get thrown where there is a space in the jpg file name.


Help greatly appreciated.


-
Continuous RTSP stream recording with ffmpeg. Can I optimize it to not damage the SD card ?
10 juillet 2019, par MonaI have got an IP camera with RTSP stream. I decided to record the stream using ffmpeg (version 3.2.14-1 deb9u1) on the Odroid-N2 device with Armbian. I have created a .sh script which is launched by Croon every minute. It checks if the ffmpeg recording is active for selected camera and also deletes files older than 7 days :
#!/bin/bash
RecordPathAndFind='/home/mona/CameraRecordings/Camera1/'
SegmentTime=900
MinutesAfterDeleteOldFiles=10080
DaysSecurityLimit=31
tempoutput=$(ps aux | grep ffmpeg | grep $RecordPathAndFind)
if [ ${#tempoutput} -ge 5 ];
then
echo "FFMPEG with record command is already running. Skipping.\n"
else
echo "FFMPEG with record command is not running. Starting now...\n"
FFMPEGSTART=$(su - mona -c "cd /home/mona; /usr/bin/screen -dmS ffmpegcamera1 ffmpeg -rtsp_transport udp -i 'rtsp://admin:password@192.168.1.xxx:554/onvif1' -vcodec copy -c:a aac -map 0 -f segment -segment_time $(echo $SegmentTime) -segment_format mp4 -strftime 1 $(echo $RecordPathAndFind)%Y-%m-%d_%H-%M-%S.mp4")
fi
currenthourminutes=$(date +%M)
if [ "$currenthourminutes" == "00" ]; then
echo "Current Minute is 00. Checking for old files to delete.\n"
FILESDELETECOMMAND=$(find $(echo $RecordPathAndFind) -maxdepth 1 -type f -mmin +$(echo $MinutesAfterDeleteOldFiles) -mtime -$(echo $DaysSecurityLimit) -name '*.mp4' -ls -exec rm {} \;)
else
echo "Current Minute is NOT 00. Skipping.\n"
fiThe script works fine, but I’m afraid of the life of the SD card in this device. I detected that ffmpeg is continuously writing the mp4 file (file size grows all the time). I think it would be better if ffmpeg waited for 1MiB before flushing it to disk.
I tried different ffmpeg settings (adding "blocksize", "flush_packets", "reorder_queue_size" and few others I can’t recall now), unfortunately it didn’t change anything. The mp4 file size was increasing all the time (even by few KBs).
The first question is : Should I be worried about the microSD card life when ffmpeg is all the time writing the file (current environment) ?
The second question is : Are there any other ffmpeg optimization settings which I missed ?
If my fears regarding the SD card life are correct, can you please recommend some other things which I could add to my script (or change in system) in order to increase the life of micro SD cards (or USB sticks) used for recording purposes ? I was thinking about using the ramdisk, and then manually move the files, however this could cause files loss in case of system reboot, hang, or power outage.
-
FFMPEG Video from images to mp4 in nvidia GPU
16 août 2019, par M.yI am trying to encode a h264 .mp4 video created from .jpg images using a 1070ti nvidia cuda power, having a a crossfade transition between each image.
I am able to render the video in GPU using the flags -c:v h264_nvenc, I see a short peak in the GPU encoding, but with a long period of computer CPU hight load, I guess preparing the transitioning images. But the image preparation it happens on cpu/ram due the -filter_complex and is quite slow.
This works :ffmpeg.exe, -y,
-loop, 1, -t, 2.5, -i, 1565957420594_labeled.jpg,
-loop, 1, -t, 2.5, -i, 1565957453659_labeled.jpg,
-loop, 1, -t, 2.5, -i, 1565957487743_labeled.jpg,
-loop, 1, -t, 2.5, -i, 1565957525280_labeled.jpg,
-loop, 1, -t, 2.5, -i, 1565957587308_labeled.jpg,
-loop, 1, -t, 2.5, -i, 1565957644898_labeled.jpg,
-loop, 1, -t, 2.5, -i, 1565957859119_labeled.jpg,
-loop, 1, -t, 2.5, -i,1565959133561_labeled.jpg,
-loop, 1, -t, 2.5, -i, 1565959412948_labeled.jpg,
-loop, 1, -t, 2.5, -i, 1565959501884_labeled.jpg,
-loop, 1, -t, 2.5, -i, 1565959755432_labeled.jpg,
-loop, 1, -t, 2.5, -i, 1565959882380_labeled.jpg,
-loop, 1, -t, 2.5, -i, 1565960023185_labeled.jpg,
-loop, 1, -t, 2.5, -i, 1565960157174_labeled.jpg,
-loop, 1, -t, 2.5, -i, 1565960683303_labeled.jpg,
-loop, 1, -t, 2.5, -i, 1565961151548_labeled.jpg,
-loop, 1, -t, 2.5, -i, 1565961230278_labeled.jpg,
-loop, 1, -t, 2.5, -i, 1565961671766_labeled.jpg,
-loop, 1, -t, 2.5, -i, final.jpg,
-loop, 1, -t, 2.5, -i, final.jpg,
-c:v, h264_nvenc, -preset, fast,
-filter_complex, [1]fade=d=0.5:t=in:alpha=1,setpts=PTS-STARTPTS+0.5/TB[f0];
[2]fade=d=0.5:t=in:alpha=1,setpts=PTS-STARTPTS+1.0/TB[f1];
[3]fade=d=0.5:t=in:alpha=1,setpts=PTS-STARTPTS+1.5/TB[f2];
[4]fade=d=0.5:t=in:alpha=1,setpts=PTS-STARTPTS+2.0/TB[f3];
[5]fade=d=0.5:t=in:alpha=1,setpts=PTS-STARTPTS+2.5/TB[f4];
[6]fade=d=0.5:t=in:alpha=1,setpts=PTS-STARTPTS+3.0/TB[f5];
[7]fade=d=0.5:t=in:alpha=1,setpts=PTS-STARTPTS+3.5/TB[f6];
[8]fade=d=0.5:t=in:alpha=1,setpts=PTS-STARTPTS+4.0/TB[f7];
[9]fade=d=0.5:t=in:alpha=1,setpts=PTS-STARTPTS+4.5/TB[f8];
[10]fade=d=0.5:t=in:alpha=1,setpts=PTS-STARTPTS+5.0/TB[f9];
[11]fade=d=0.5:t=in:alpha=1,setpts=PTS-STARTPTS+5.5/TB[f10];
[12]fade=d=0.5:t=in:alpha=1,setpts=PTS-STARTPTS+6.0/TB[f11];
[13]fade=d=0.5:t=in:alpha=1,setpts=PTS-STARTPTS+6.5/TB[f12];
[14]fade=d=0.5:t=in:alpha=1,setpts=PTS-STARTPTS+7.0/TB[f13];
[15]fade=d=0.5:t=in:alpha=1,setpts=PTS-STARTPTS+7.5/TB[f14];
[16]fade=d=0.5:t=in:alpha=1,setpts=PTS-STARTPTS+8.0/TB[f15];
[17]fade=d=0.5:t=in:alpha=1,setpts=PTS-STARTPTS+8.5/TB[f16];
[18]fade=d=0.5:t=in:alpha=1,setpts=PTS-STARTPTS+9.0/TB[f17];
[19]fade=d=0.5:t=in:alpha=1,setpts=PTS-STARTPTS+9.5/TB[f18];
[0][f0]overlay[bg1];
[bg1][f1]overlay[bg2];
[bg2][f2]overlay[bg3];
[bg3][f3]overlay[bg4];
[bg4][f4]overlay[bg5];
[bg5][f5]overlay[bg6];
[bg6][f6]overlay[bg7];
[bg7][f7]overlay[bg8];
[bg8][f8]overlay[bg9];
[bg9][f9]overlay[bg10];
[bg10][f10]overlay[bg11];
[bg11][f11]overlay[bg12];
[bg12][f12]overlay[bg13];
[bg13][f13]overlay[bg14];
[bg14][f14]overlay[bg15];
[bg15][f15]overlay[bg16];
[bg16][f16]overlay[bg17];
[bg17][f17]overlay[bg18];
[bg18][f18]overlay[v],
-map, [v], -movflags, +faststart, output.mp4I am trying to do all work in the GPU, theoretically I can encode all images in GPU memory using in each -i the flags "-hwaccel cuvid -c:v mjpeg_cuvid" I receive the following error :
[mjpeg_cuvid @ 00000000024ef980] ignoring invalid SAR: 0/0
Impossible to convert between the formats supported by the filter 'graph 0 input from stream 1:0' and the filter 'auto_scaler_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0Is there a way to load images in the GPU with the "fade" flag applied ?
Thanks in advance !