Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (92)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Configuration spécifique pour PHP5

    4 février 2011, par

    PHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
    Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
    Modules spécifiques
    Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

Sur d’autres sites (5880)

  • Running ffmpeg in Docker environment on AWS EC2 [duplicate]

    5 mai 2024, par must

    I want to use FFMPEG inside my Java application.
I want to instal ffmpeg in environment where this app is running.

    


    My current Dockerfile :

    


    # Stage 1: Build the application
FROM maven:3.8.4-openjdk-17 AS build
WORKDIR /app
COPY pom.xml .
COPY src ./src
RUN mvn clean install -Dmaven.test.skip=true

# Stage 2: Run the application
FROM openjdk:17
WORKDIR /app
COPY --from=build /app/target/application.jar ./app.jar
EXPOSE 8080
CMD ["java", "-jar", "-Dspring.profiles.active=pr", "app.jar"]


    


    I simply built a docker image by running docker buildx build --platform linux/amd64 -t repo/app:1.0 .

    


    Then in AWS Console I run docker run and pull built image.

    


    Everyone writes about adding

    


    RUN apt-get -y update && apt-get -y upgrade && apt-get install -y --no-install-recommends ffmpeg


    


    but I cannot do it as I'm building image on MacOS and I do no have apt-get command.

    


    When I was trying to pull some image form DockerHub FFMPEG could not be found.

    


    I tried this one : https://hub.docker.com/r/jrottenberg/ffmpeg

    


    and declared DockerFile as :

    


    # Stage 1: Build the application
FROM maven:3.8.4-openjdk-17 AS build
WORKDIR /app
COPY pom.xml .
COPY src ./src
RUN mvn clean install -Dmaven.test.skip=true

# Stage 2: Install ffmpeg
FROM jrottenberg/ffmpeg:latest AS ffmpeg

# Stage 3: Run the application
FROM openjdk:17
WORKDIR /app
COPY --from=build /app/target/application.jar ./app.jar
COPY --from=ffmpeg /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg

EXPOSE 8080
CMD ["java", "-jar", "-Dspring.profiles.active=pr", "app.jar"]


    


    but still it did not work. I get :

    


    ffmpeg: error while loading shared libraries: libavdevice.so.58: cannot open shared object file: No such file or directory


    


    I'm using Amazon Linux on EC2.

    


    Can someone get me on the right track ?

    


  • Flask send_file not sending file

    30 avril 2021, par jackmerrill

    I'm using Flask with send_file() to have people download a file off the server.

    



    My current code is as follows :

    



    @app.route('/', methods=["GET", "POST"])
def index():
    if request.method == "POST":
        link = request.form.get('Link')
        with youtube_dl.YoutubeDL(ydl_opts) as ydl:
            info_dict = ydl.extract_info(link, download=False)
            video_url = info_dict.get("url", None)
            video_id = info_dict.get("id", None)
            video_title = info_dict.get('title', None)
            ydl.download([link])
        print("sending file...")
        send_file("dl/"+video_title+".f137.mp4", as_attachment=True)
        print("file sent, deleting...")
        os.remove("dl/"+video_title+".f137.mp4")
        print("done.")
        return render_template("index.html", message="Success!")
    else:
        return render_template("index.html", message=message)


    



    The only reason I have .f137.mp4 added is because I am using AWS C9 to be my online IDE and I can't install FFMPEG to combine the audio and video on Amazon Linux. However, that is not the issue. The issue is that it is not sending the download request.

    



    Here is the console output :

    



    127.0.0.1 - - [12/Dec/2018 16:17:41] "POST / HTTP/1.1" 200 -
[youtube] 2AYgi2wsdkE: Downloading webpage
[youtube] 2AYgi2wsdkE: Downloading video info webpage
[youtube] 2AYgi2wsdkE: Downloading webpage
[youtube] 2AYgi2wsdkE: Downloading video info webpage
WARNING: You have requested multiple formats but ffmpeg or avconv are not installed. The formats won't be merged.
[download] Destination: dl/Meme Awards v244.f137.mp4
[download] 100% of 73.82MiB in 00:02
[download] Destination: dl/Meme Awards v244.f140.m4a
[download] 100% of 11.63MiB in 00:00
sending file...
file sent, deleting...
done.
127.0.0.1 - - [12/Dec/2018 16:18:03] "POST / HTTP/1.1" 200 -


    



    Any and all help is appreciated. Thanks !

    


  • ffmpeg h.264 invalid cutting

    1er mai 2012, par E.Ar

    I have an s3 bucket with several hundreds video files.
    Those files were created by cutting parts of larger video files using ffmpeg.
    I wrote a script for this, which downloads the original video file from another bucket, runs ffmpeg to cut the file, and uploads the new file to it's bucket.
    For downloading and uploading from/to s3 i used this php library.
    The ffmpeg syntax I used :

    ffmpeg -y -vsync 2 -async 1 -ss [time-in] -t [duration] -i [large-input-video.mp4] -vcodec copy -acodec copy [short-output-video.mp4]

    Which should just cut the original file between the specified times, without any changes to the a/v codecs.
    All the original video files are encoded in h.264, and this is also the required encoding for the new files (which will be streamed through a CDN to the clients' flash players).

    My problem is that only a small part of the new files are coming out as encoded in h.264, but most of them aren't (h.264 is a must, otherwise the files wont play on the clients' side).
    I can't trace the problem to the original videos, since when i use the same ffmpeg command manually, with the same parameters and on the same files, the output files come out just fine. It seems arbitrary.

    I use ffprobe to get information about the files' codecs.
    For example :
    ffprobe of one of the large (original) video files :

    ...
    Stream #0.0(und) : Video : h264, yuv420p, 640x352, 499 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    ...

    ffprobe of the corresponding new cut file :

    ...
    Stream #0.0(und) : Video : mpeg4, yuv420p, 640x352 [PAR 1:1 DAR 20:11], 227 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
    ...

    As can be seen, the difference is in 'mpeg4' vs. 'h264'.

    Any insights on what can cause the new files to come out in the wrong encoding would be greatly appreciated.

    Thanks !

    Edit : Problem Resolved
    After analyzing all the files, I noticed that about two thirds of them are coming out in the wrong codec.
    Since I used three machines for the cutting process (three separate EC2 servers), it occurred to me that on two of them there is a bad installation of ffmpeg (as @LordNeckbeard suggested in his answer).
    I ran the process again, only on the invalid files, on the third machine alone - which produced the desired result.