Recherche avancée

Médias (0)

Mot : - Tags -/clipboard

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (111)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Utilisation et configuration du script

    19 janvier 2011, par

    Informations spécifiques à la distribution Debian
    Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
    Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
    Récupération du script
    Le script d’installation peut être récupéré de deux manières différentes.
    Via svn en utilisant la commande pour récupérer le code source à jour :
    svn co (...)

Sur d’autres sites (5708)

  • "Undefined reference to `avcodec_alloc_frame" Error when compile and install Opencv on linux

    7 avril 2016, par Kathy Lee

    I am compiling and installing OpenCV using the steps in http://docs.opencv.org/2.4/doc/tutorials/introduction/linux_install/linux_install.html

    But during "making" it, it has error when it reaches 45%. The error message is

    ...
    [ 43%] Built target pch_Generate_opencv_video
    [ 44%] Built target opencv_video
    [ 44%] Built target opencv_perf_video_pch_dephelp
    [ 45%] Built target pch_Generate_opencv_perf_video  
    Linking CXX executable ../../bin/opencv_perf_video
    ../../lib/libopencv_videoio.so.3.1.0: undefined reference to `avcodec_alloc_frame'
    ../../lib/libopencv_videoio.so.3.1.0: undefined reference to `avcodec_encode_video'
    collect2: error: ld returned 1 exit status
    make[2]: *** [bin/opencv_perf_video] Error 1
    make[1]: *** [modules/video/CMakeFiles/opencv_perf_video.dir/all] Error 2
    make: *** [all] Error 2

    I downloaded and installed the latest version of ffmpeg from https://www.ffmpeg.org/.

    Anyone knows how can I fix the errors ?

    Thank you.

  • FFmpeg takes too much time for generating m3u8 files from a mp4 file (166MB)

    3 août 2021, par Angele

    I am using ffmpeg in nodejs to generate 4 different resolutions (360p, 480p, 720p, 1080p).
I use a AWS lambda for each resolution and the last two take too much time.
I convert a mp4 file which has a size of 166MB into .ts files (with all segments associated)
It takes more than 900 seconds, and that's above the limit for a lambda timeout.

    


    Also my goal is to encode mp4 videos of a maximum size of 4go... and it would be to encode within 900 seconds maximum for each resolution.

    


    I used this website to find some parameters : https://docs.peer5.com/guides/production-ready-hls-vod/

    


    These are my parameters given to ffmpeg :

    


    "ffmpegParams": [
    "-vf",
    "scale=-2:1920",
    "-c:a",
    "aac",
    "-ar",
    "48000",
    "-c:v",
    "h264",
    "-profile:v",
    "main",
    "-crf",
    "20",
    "-sc_threshold",
    "0",
    "-g",
    "48",
    "-keyint_min",
    "48",
    "-hls_time",
    "4",
    "-hls_playlist_type",
    "vod",
    "-b:v",
    "5000k",
    "-maxrate",
    "5350k",
    "-bufsize",
    "7500k",
    "-b:a",
    "192k",
    "-hls_segment_filename",
    "/tmp/1080p_%03d.ts",
    "/tmp/1080p.m3u8"
]


    


    Also I tried with these parameters '-vcodec', 'libx264', '-preset', 'ultrafast' and it made it faster but it is not enough...

    


    Maybe there's something wrong with my command. If someone could maybe enlighten me ? :)

    


    Edit : I ended up using an EC Fargate, perfect for this kind of need.

    


  • How do I get duration of an In Memory Video in Python / Django ?

    21 novembre 2019, par Lucas Tonon

    So I was successfully using the following code to get the duration of a saved video in Django.

    def get_video_length(file_path):
    command = [
       'ffprobe',
       '-v',
       'error',
       '-show_entries',
       'format=duration',
       '-of',
       'default=noprint_wrappers=1:nokey=1',
       file_path
     ]

    try:
       output = check_output( command, stderr=STDOUT ).decode()
    except CalledProcessError as e:
       output = e.output.decode()

    return output

    But now I need to get the duration of an uploaded file before saving it.
    I have a serializer with a FileField and on validate method I should check the video duration.
    For instance :

    class VideoSerializer(serializers.Serializer):
    video = serializers.FileField(required=True, validators=[validate_media_extension, validate_video_duration])

    Then on validate_video_duration I needed to call some method like get_video_length, but I need an alternative to get the duration from the video in memory. The object that I have is an instance of InMemoryUploadedFile (https://docs.djangoproject.com/en/2.2/_modules/django/core/files/uploadedfile/)