
Recherche avancée
Autres articles (55)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa 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 (...)
Sur d’autres sites (7132)
-
how to download portion of video which was uploaded into AWS s3 bucket, though Nodejs SDKs
22 février 2024, par rama rangeswara reddyI have uploaded a 1GB .mp4 file to an AWS S3 bucket. Using the AWS-SDK provided by the npm package, I am able to download the entire video. However, I have a specific requirement to generate a thumbnail at the 6-second mark of the video. Currently, I download the entire 1GB video to my local machine and then generate the thumbnail at the desired duration.


To optimize server resources and reduce disk load, I plan to download only the first 10 seconds of the video, which should be approximately 10MB or less in size. By doing so, I can significantly reduce download time and server load while still fulfilling my requirement of generating the thumbnail at the 6-second mark. Therefore, instead of downloading the entire 1GB video, I aim to download only the 10MB segment corresponding to the first 10 seconds of the video.


I am using nodejs, expressJS, as backed Technologies.


`


`async function downloadS3FileToLocalDirAndReturnPath(videoKey) {
 return new Promise(async (resolve, reject) => {
 try {
 AWS.config.update({
 accessKeyId: config.AWS.KEYS.accessKeyId,
 secretAccessKey: config.AWS.KEYS.secretAccessKey,
 region: config.AWS.KEYS.region,
 httpOptions: config.AWS.KEYS.httpOptions
 });
 const s3 = new AWS.S3();

 // Specify the local file path where you want to save the downloaded video
 const localFilePath = `${os.tmpdir()}/${Date.now()}_sre.mp4`;

 // Configure the parameters for the S3 getObject operation
 const params = {
 Bucket: config.AWS.S3_BUCKET,
 Key: videoKey
 };

 const result = await s3.getObject(params).promise();
 const fileContent = result.Body;
 fs.writeFileSync(localFilePath, fileContent);
 resolve(localFilePath);
 } catch (error) {
 reject(error);
 }
 });
}`



this code was working fine to download the whole video , but i need to download only first 10 seconds duration


S3 : How to do a partial read / seek without downloading the complete file ?


I tried this ,before posting this question with above post, video was downloading , it was not playing , by throwing this error , the file contains no playable streams


async function generateThumbnails(videoKey) {

const s3 = new AWS.S3();

const params = {
 Bucket: KEYS.bucket,
 Key: videoKey, // Specify the key of the video file in S3
 Range: `bytes=0-${1024 * 800}`, // Specify the range of bytes you want to retrieve
};

const file = fs.createWriteStream(`/tmp/${Date.now()}_rama.mp4`);

const s3Stream = s3.getObject(params).createReadStream();

s3Stream.pipe(file);

s3Stream.on("error", (error) => {
 console.log("Error Occured while File downloading!! ");
});

s3Stream.on("finish", () => {
 console.log("File downloaded Successfully ");
});



}


-
How to change resolution without compromising video quality using ffmpeg ?
20 mars 2024, par blake bankerI'm trying to develop a simple video transcoding system.
When you upload a video,
After extracting the video and audio separately,
I want to encode them at 360, 720, and 1080p resolutions respectively and then merge them to create three final mp4 files.
At this time, I have two questions.


- 

-
Is there a big difference between encoding the video and audio separately in the original video file and encoding the original video file as is ? In a related book, it is said that a system is created by separating video and audio, and I am curious as to why.


-
I want to change the resolution without compromising the original image quality. At this time, the resolution of the uploaded file can be known at the time of upload. As a test, I created files according to each resolution, and found that the image quality was damaged. If I want to change only the resolution while keeping the original image quality, I would like to know how to adjust each ffmpeg option. We plan to change it to 360, 720, and 1080p.








-
-
How to improve Video Trimming & Merging Performance for Mobile App [closed]
5 mai 2024, par Harpreet Singh.8052I am in the process of developing an app that will allow users to trim and merge recorded videos similar to Snapchat and Instagram stories. Currently, I am using FFmpeg for video processing, but it is taking too long to complete. I have come up with an idea to use ExoPlayer to minimize processing time. My plan is to store the trimmed duration of multiple videos and only play the trimmed part when the video is played. ExoPlayer allows playing multiple videos seamlessly, so it will appear as if the videos have been trimmed and merged. However, I am uncertain about how to handle video playback on the server-side when a user uploads all the videos and metadata about the video, such as the trimmed part from where to where they want to play. If I follow this approach, I will need to first get all the videos to the user's device before playback, but the videos can be long, ranging from 10 to 30 minutes, making this approach impractical. I would like to play them in a video stream manner.


I am also curious about how other video editing apps such as CapCut or Kinemaster handle video processing tasks like trimming, merging, and slow-mo. What video processing tools do they use ? When I tried merging ten one-minute videos, it took around 10 minutes on my Android phone, but these editing apps take less time.


I would appreciate any approach or idea to improve the processing time for video trimming and merging