Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (71)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

Sur d’autres sites (7736)

  • FileNotFoundError on aws Lambda when concatenating videos with ffmpeg

    2 juillet 2021, par Shibu Menon

    Goal :

    



      

    • Concat 2 videos (both are in an s3 bucket) via aws Lambda using ffmpeg
    • 


    • Upload the resultant output.mp4 to another S3 bucket
    • 


    • Python 3+
    • 


    



    I've already created a layer containing a static ffmpeg

    



    The Error :

    



    {
  "errorMessage": "[Errno 2] No such file or directory: '/tmp/output.mp4'",
  "errorType": "FileNotFoundError",
  "stackTrace": [
    [
      "/var/task/lambda_function.py",
      19,
      "lambda_handler",
      "s3.Object(bucketLowRes, mp4OutputFileName).put(Body=open(new_file_key, 'rb'))"
    ]
  ]
}


    



    My Lambda function :

    



    import json
import os
import subprocess
import boto3

s3 = boto3.resource('s3')
bucketLowRes = s3.Bucket("bucket-conc-lowres")

def lambda_handler(event, context):
    # TODO implement

    mp4OutputFileName = 'output.mp4'

    new_file_key = os.path.abspath(os.path.join(os.sep, 'tmp', mp4OutputFileName))
    subprocess.call( ['/opt/ffmpeg', '-i', 'concat:s3://bucket-word-clips/00th76kqwfs915hbixycb77y9v3riwsj30.mp4|s3://bucket-word-clips/00uoakp6jyafbu13ycvl6w2i9tj42eux30.mp4', new_file_key ] )

    s3.Object(bucketLowRes, mp4OutputFileName).put(Body=open(new_file_key, 'rb'))

    return {
        'statusCode': 200,
        'body': json.dumps('Hello from Lambda!')
    }


    



    Question :

    



      

    • FileNotFoundError : Where is the output mp4 file of my ffmpeg concat being saved ??
    • 


    • And if it is being saved to /tmp/output.mp4 , then why the FileNotFoundError ??
    • 


    



    thanks

    


  • How to Bulk Speed UP and Crop Videos FFMPEG

    6 septembre 2023, par Usemo Shank

    I have videos in (input) folder that is located on the root of the script, I also have output folder on the root, The input folder has several videos that i want to speed up in bulk by 1.1 percent, I also want to cropt the videos by 90 percent (Meaning 90 Percent of original video is visible).

    


    I have a code that does not function well. Here is the code I have

    


     import os
import subprocess

# Define input and output directories
input_folder = "input"
output_folder = "output"

# Create the output directory if it doesn't exist
if not os.path.exists(output_folder):
    os.makedirs(output_folder)

# List all video files in the input directory
input_files = [f for f in os.listdir(input_folder) if f.endswith(('.mp4', '.avi', '.mkv'))]

# Speed up and crop each video
for input_file in input_files:
    input_path = os.path.join(input_folder, input_file)
    output_file = os.path.splitext(input_file)[0] + "_speed_crop.mp4"
    output_path = os.path.join(output_folder, output_file)

    # FFmpeg command to speed up video by 1.1x and crop to 90%
    ffmpeg_command = [
        "ffmpeg",
        "-i", input_path,
        "-vf", "setpts=1.1*PTS,crop=in_w*0.9:in_h*0.9",
        "-c:v", "libx264",
        "-crf", "20",
        "-c:a", "aac",
        "-strict", "experimental",
        output_path
    ]

    # Run FFmpeg command
    subprocess.run(ffmpeg_command)

print("Conversion complete.")


    


  • getting black screen while trying to record dockerized lxde using ffmpeg

    16 mars 2023, par Itzik.B

    I have created a docker image that has LXDE and TightVNCServer.

    


    # Pull base image.
FROM ubuntu

# Install LXDE and VNC server.
RUN apt-get update
RUN apt-get install -y xvfb
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y lxde-core lxterminal tightvncserver
RUN rm -rf /var/lib/apt/lists/*
RUN touch /root/.Xresources
RUN touch /root/.Xauthority
COPY xstartup /root/.vnc/xstartup
RUN chmod +x /root/.vnc/xstartup
#Install Node.js & npm

# Define working directory.
WORKDIR /data

COPY * /data

RUN apt-get install -y ffmpeg


    


    I am running this container using this command :

    


    docker run -it --rm -v /data:/data -p 5901:5901 -e USER=root ubuntudsktp  bash -c "vncserver :1 -geometry 1280x800 -depth 24 && tail -F /root/.vnc/*.log"

    


    I am logging into this container using VNC and running this command to record the whole screen :

    


    ffmpeg -f x11grab -i :1.0 output.webm

    


    After the recording was over, I opened the video and I could see that the video is completely blank(black screen).

    


    I know there is a "screen" that I need to tell ffmpeg to record but its works only on -i :1.0.

    


    I have also tried to run it using :

    


    DISPLAY=:1 ffmpeg -f x11grab -i :1.0 output.webm
And the results are the same.

    


    What I am missing here ?