Recherche avancée

Médias (1)

Mot : - Tags -/belgique

Autres articles (25)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (3983)

  • Why does fluent-ffmpeg only work when it throws the error Output stream closed

    29 mars 2024, par volume one

    I am using fluent-ffmpeg to process a video file (and then upload that to Amazon S3). The code is very straightforward but it only works if :

    


      

    • pipe option {end: true} is set in .output()
    • 


    • which has a side-effect that causes the following console log output
    • 


    


    


    Processing : 19.261847354642416% done Processing :
32.365144874807335% done Processing : 48.80978326261429% done Processing : 78.35771917058617%
Processing : 91.49377493455148% done Processing :
99.91264359125745% done An error occurred : Output stream closed

    


    


    Despite that error, it seems the file is generated correctly and it gets uploaded to Amazon S3 fine.

    


    This is the fluent-ffmpeg code :

    


    import {PassThrough} from 'node:stream';
import FFMpeg from 'fluent-ffmpeg';

let PassThroughStream = new PassThrough();

             FFMpeg('/testvideo.mp4')
                    .videoCodec('libx264')
                    .audioCodec('libmp3lame')
                    .size(`640x480`)
                    // Stream output requires manually specifying output formats
                    .format('mp4')
                    .outputOptions('-movflags dash')
                    .on('progress', function (progress) {
                        console.log('Processing: ' + progress.percent + '% done');
                    })
                    .on('error', function (err) {
                        console.log('An error occurred: ' + err.message);
                    })
                    .on('end', function () {
                        console.log('FFMpeg Processing finished!');
                    })
                    .output(PassThroughStream, {end: true})
                    .run();

   // Now upload to S3
    try {
          await s3Upload({
              AWSS3Client: 'mys3client',
              Bucket: 'publicbucket,
              ACL: "public-read",
              ContentType: 'video/mp4',
              Key: 'whoever/whatever.mp4',
              Body: PassThroughStream
           });
    } catch (error) {
                    console.log(`s3Upload error`, error)
                }


    


    If I set the pipe output() option to {end: false} then there is no error from fluent-ffmpeg and I get "Processing: 100% done FFMpeg Processing finished!" as the final console log.

    


    BUT the problem is that the s3Upload() does not do anything. There are no errors. Just no activity.

    


    I feel very uncomfortable letting fluent-ffmpeg end in an error even if the code itself does the job intended. It will also cause testing to fail. What could be the issue ?

    


    The command line code is : ffmpeg -i https:/xxxbucket.s3.amazonaws.com/14555/file-example.mp4 -acodec libmp3lame -vcodec libx264 -filter:v scale=w=trunc(oh*a/2)*2:h=480 -f mp4 -movflags dash pipe:1

    


  • 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 ?

    


  • Live stream doesn't seem to be passed to AWS correctly

    12 août 2024, par NoobAmI

    I'm trying to stream my live video into Amazon IVS and I don't see it on the live channels.

    


    Is it possible I have a mistake in my FFMPEG configuration ?
I'm expecting to see this in my playback url or on the console screen for playback but I see nothing at the moment.

    


    As I understand it, shouldn't I see some kind of playback in the live channels if a stream is being sent that channel ?

    


    `  async sendDataToIvs(channelArn: string, payload: any): Promise<void> {&#xA;    const injestServer = &#x27;***.global-contribute.live-video.net&#x27;;&#xA;    const streamKey = &#x27;sk_us-east-1_*****&#x27;;&#xA;  &#xA;    const ffmpeg = spawn(&#x27;ffmpeg&#x27;, [&#xA;      &#x27;-re&#x27;, // Read input at native frame rate&#xA;      &#x27;-i&#x27;, &#x27;-&#x27;, // Input from stdin (live stream data)&#xA;      &#x27;-r&#x27;, &#x27;30&#x27;, // Frame rate&#xA;      &#x27;-c:v&#x27;, &#x27;libx264&#x27;, // Video codec - H.264&#xA;      &#x27;-pix_fmt&#x27;, &#x27;yuv420p&#x27;, // Pixel format&#xA;      &#x27;-profile:v&#x27;, &#x27;main&#x27;, // H.264 profile&#xA;      &#x27;-preset&#x27;, &#x27;veryfast&#x27;, // Encoder quality setting&#xA;      &#x27;-x264opts&#x27;, &#x27;nal-hrd=cbr:no-scenecut&#x27;, // Additional x264 options&#xA;      &#x27;-minrate&#x27;, &#x27;3000&#x27;, // Minimum bitrate&#xA;      &#x27;-maxrate&#x27;, &#x27;3000&#x27;, // Maximum bitrate&#xA;      &#x27;-g&#x27;, &#x27;60&#x27;, // GOP size&#xA;      &#x27;-c:a&#x27;, &#x27;aac&#x27;, // Audio codec&#xA;      &#x27;-b:a&#x27;, &#x27;160k&#x27;, // Audio bitrate&#xA;      &#x27;-ac&#x27;, &#x27;2&#x27;, // Audio channels&#xA;      &#x27;-ar&#x27;, &#x27;44100&#x27;, // Audio sample rate&#xA;      &#x27;-f&#x27;, &#x27;flv&#x27;, // Output format&#xA;      `rtmps://${injestServer}:443/app/${streamKey}` // Output destination&#xA;    ]);&#xA;  &#xA;    ffmpeg.stdin.write(payload, (err) => {&#xA;      console.log(payload)&#xA;      if (err) console.error(&#x27;Error writing payload to FFmpeg stdin:&#x27;, err);&#xA;    });&#xA;  &#xA;    ffmpeg.on(&#x27;close&#x27;, (code) => {&#xA;      console.log(`FFmpeg process exited with code ${code}`);&#xA;    });&#xA;  &#xA;    ffmpeg.stdin.on(&#x27;error&#x27;, (err) => {&#xA;      console.error(&#x27;Error writing to FFmpeg stdin:&#x27;, err);&#xA;    });&#xA;  &#xA;    ffmpeg.stderr.on(&#x27;data&#x27;, (data) => {&#xA;      console.error(`FFmpeg error: ${data}`);&#xA;    });&#xA;  } `&#xA;</void>

    &#xA;