
Recherche avancée
Médias (2)
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
Autres articles (96)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (5726)
-
Live stream doesn't seem to be passed to AWS correctly
12 août 2024, par NoobAmII'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> {
 const injestServer = '***.global-contribute.live-video.net';
 const streamKey = 'sk_us-east-1_*****';
 
 const ffmpeg = spawn('ffmpeg', [
 '-re', // Read input at native frame rate
 '-i', '-', // Input from stdin (live stream data)
 '-r', '30', // Frame rate
 '-c:v', 'libx264', // Video codec - H.264
 '-pix_fmt', 'yuv420p', // Pixel format
 '-profile:v', 'main', // H.264 profile
 '-preset', 'veryfast', // Encoder quality setting
 '-x264opts', 'nal-hrd=cbr:no-scenecut', // Additional x264 options
 '-minrate', '3000', // Minimum bitrate
 '-maxrate', '3000', // Maximum bitrate
 '-g', '60', // GOP size
 '-c:a', 'aac', // Audio codec
 '-b:a', '160k', // Audio bitrate
 '-ac', '2', // Audio channels
 '-ar', '44100', // Audio sample rate
 '-f', 'flv', // Output format
 `rtmps://${injestServer}:443/app/${streamKey}` // Output destination
 ]);
 
 ffmpeg.stdin.write(payload, (err) => {
 console.log(payload)
 if (err) console.error('Error writing payload to FFmpeg stdin:', err);
 });
 
 ffmpeg.on('close', (code) => {
 console.log(`FFmpeg process exited with code ${code}`);
 });
 
 ffmpeg.stdin.on('error', (err) => {
 console.error('Error writing to FFmpeg stdin:', err);
 });
 
 ffmpeg.stderr.on('data', (data) => {
 console.error(`FFmpeg error: ${data}`);
 });
 } `
</void>


-
Running ffmpeg in Docker environment on AWS EC2 [duplicate]
5 mai 2024, par mustI 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 ?


-
Why does fluent-ffmpeg only work when it throws the error Output stream closed
29 mars 2024, par volume oneI 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


- pipe option