Recherche avancée

Médias (91)

Autres articles (66)

  • À propos des documents

    21 juin 2013, par

    Que faire quand un document ne passe pas en traitement, dont le rendu ne correspond pas aux attentes ?
    Document bloqué en file d’attente ?
    Voici une liste d’actions ordonnée et empirique possible pour tenter de débloquer la situation : Relancer le traitement du document qui ne passe pas Retenter l’insertion du document sur le site MédiaSPIP Dans le cas d’un média de type video ou audio, retravailler le média produit à l’aide d’un éditeur ou un transcodeur. Convertir le document dans un format (...)

  • Modifier la date de publication

    21 juin 2013, par

    Comment changer la date de publication d’un média ?
    Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
    Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
    Dans la rubrique "Champs à ajouter, cocher "Date de publication "
    Cliquer en bas de la page sur Enregistrer

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (11546)

  • avfilter/avf_showspectrum : add option to control dynamic range for colors

    5 août 2021, par Paul B Mahol
    avfilter/avf_showspectrum : add option to control dynamic range for colors
    
    • [DH] doc/filters.texi
    • [DH] libavfilter/avf_showspectrum.c
  • ffmpeg keyframe control on single image + audio

    21 juin 2022, par user3190036

    I have scoured every related StackOverflow question I can find and none of them solved the issue, apologies in advance if I missed the one that would have worked.

    


    The application I am working on converts a video or audio file to an mp4, and later on the server to an hls playlist. I just implemented audio and I wanted a background image. After reading through various options on StackOverflow I settled on the following args :

    


    -y -i "C:\path\ExternalAudioBackground.png" -i "C:\path\Audio.mp3" -vf scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:-1:-1:color=black -c:a copy -vcodec libx264 -pix_fmt yuv420p "C:\path\external_media_file.mp4"


    


    This set of args was chosen because it is instantaneous due to -c:a copy as well as constraints to ensure all videos have the same aspect ratio and encoding.

    


    The issue is when converting this to an hls stream the stream fails to play (in video.js player, and also vlc) with the message :

    


    VIDEOJS : WARN : Segment with index 0 from playlist 0-https://domain/video.m3u8 has a duration of 464.96 when the reported duration is 0.04 and the target duration is 0.04. For HLS content, a duration over the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details : https://datatracker.ietf.org/doc/html/draft-pantos-http-live-streaming-23#section-4.3.3.1 https://datatracker.ietf.org/doc/html/draft-pantos-http-live-streaming-23#section-4.3.3.1

    


    Adding -loop 1 to the start increases the processing time from milliseconds to minutes, but produces a working file

    


    Adding -r 1 and -loop 1 takes longer to process than without -r (!?)

    


    Adding -stream_loop 116 (116 is the length of the audio in seconds divided by 4, the desired hls segment size) before the image input loops the first 4 seconds of the audio over and over

    


    adding -g 96 (96 is the fps * 4)

    


    In case relevant, the hls encoding arguments look like this :

    


    -safe 0 -f concat -i listOfFiles.txt -c:a aac -ar 48000 -b:a 128k -vcodec copy -crf 20 -g 48 -keyint_min 48 -sc_threshold 0 -b:v 2500k -maxrate 2675k -bufsize 3750k -hls_time 4 -hls_playlist_type vod  -hls_segment_filename segment-%03d.ts result.m3u8


    


    listOfFiles.txt always contains only one file in the case being discussed.

    


    How can I achieve this with the minimum processing time but still have the file convertable to HLS ?

    


  • How can I control and reduce memory used by FFmpeg in AWS Lambda ?

    7 mai 2021, par Martyna

    I set up AWS Lambda (Python 3.8) with FFmpeg as a layer to repackage .mov files to HLS.
Here's the command which I use to repackage clips :

    


    /opt/ffmpeg -i file_name.mov -codec: copy -start_number 1 -hls_time 10 -hls_playlist_type vod -hls_list_size 0 -f hls -master_pl_name master_name.m3u8 master.m3u8

    


    Command is then being run by using :

    


    subprocess.run(ffmpeg_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, preexec_fn=setlimits)

    


    Everything is working fine for smaller files (e.g. 5GB) but I also need it to work for files of size up to 15GB.
That's when Lambda is time outing as it runs out of the memory which I set to maximum 10GB and FFmpeg is using all of it to repackage large clip.

    


    I was trying to limit FFmpeg memory usage by using Python Resource module (as you can see by preexec_fn)
Here's the function :

    


    def setlimits():
    resource.setrlimit(resource.RLIMIT_AS, (1048576, 1048576))


    


    But it didn't help and resulted in FFmpeg not being run at all...
Is there a way to control FFmpeg memory usage ? Or maybe I can upgrade my FFmpeg command to be less memory consuming ?
The main point of repackaging those .mov files is not to change their quality.