Recherche avancée

Médias (1)

Mot : - Tags -/publicité

Autres articles (37)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • L’espace de configuration de MediaSPIP

    29 novembre 2010, par

    L’espace de configuration de MediaSPIP est réservé aux administrateurs. Un lien de menu "administrer" est généralement affiché en haut de la page [1].
    Il permet de configurer finement votre site.
    La navigation de cet espace de configuration est divisé en trois parties : la configuration générale du site qui permet notamment de modifier : les informations principales concernant le site (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

Sur d’autres sites (8018)

  • FFmpeg downscale video while maintaining aspect ratio SAR and DAR

    12 avril 2023, par Solaris

    How can I resize the video (eg 1080x ? to 480x ?) while maintain aspect ratio (SAR and DAR) ?
I want to use the output video to create Dash MPD

    


    I tried multiple filters
-filter:v 'scale=854:480'
-filter:v 'scale=-1:480'
-filter:v 'scale=-2:480'
-filter:v 'scale=854:480:force_original_aspect_ratio=decrease,pad=854:480:(ow-iw)/2:(oh-ih)/2,setsar=sar=1'

    


    But can get exact SAR and DAR , at least ffmpeg -f dash doesn't allow both streams to be in same adaptation set

    


  • avformat/matroskaenc : Don't waste bytes on ChapterAtoms length fields

    14 janvier 2022, par Andreas Rheinhardt
    avformat/matroskaenc : Don't waste bytes on ChapterAtoms length fields
    

    Also check the (user-provided) metadata tags for being too long.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavformat/matroskaenc.c
    • [DH] tests/ref/fate/webm-dash-chapters
  • upload and stream ffmpeg stream chunk and mpd file in s3

    29 juin 2024, par Kamruzzaman Rabeen

    i want to make ann web app where i can upload a video. After uploading video its should be compress by ffmpeg after that i want to keep the data on aws S3.

    &#xA;

    I can compress by ffmpeg. but i have no idea which file i should keep in s3 because after compress its create many chunk file and one mpd xml file.

    &#xA;

    Also i want to stream the video from mpd file after fetching data from s3.&#xA;here is my upload function code.&#xA;const videoPath = req.file.path; const outputDir = path.join(__dirname, &#x27;dash&#x27;); const uniqueId = uuidv4(); const outputFilePath = path.join(outputDir, $uniqueId_stream.mpd); const bucketName = process.env.S3_BUCKET_NAME; const s3Key = dash/$uniqueId_stream.mpd` ;

    &#xA;

    // Ensure the output directory exists&#xA;if (!fs.existsSync(outputDir)) {&#xA;    fs.mkdirSync(outputDir, { recursive: true });&#xA;}&#xA;&#xA;ffmpeg(videoPath)&#xA;    .outputOptions([&#xA;        &#x27;-profile:v main&#x27;,&#xA;        &#x27;-use_template 1&#x27;,&#xA;        &#x27;-use_timeline 1&#x27;,&#xA;        &#x27;-b:v 1000k&#x27;,&#xA;        &#x27;-b:a 128k&#x27;,&#xA;        &#x27;-f dash&#x27;&#xA;    ])&#xA;    .on(&#x27;end&#x27;, async () => {&#xA;        console.log(&#x27;DASH file created successfully&#x27;);&#xA;        try {&#xA;            const s3Url = await uploadToS3(outputFilePath, bucketName, s3Key);&#xA;            res.status(200).json({ message: &#x27;Video uploaded and DASH file created&#x27;, url:    s3Url });&#xA;        } catch (err) {&#xA;            console.error(&#x27;Error uploading to S3: &#x27;, err);&#xA;            res.status(500).json({ message: &#x27;Error uploading to S3&#x27;, error: err.message });&#xA;        }&#xA;    })&#xA;    .on(&#x27;error&#x27;, (err) => {&#xA;        console.error(&#x27;Error processing video: &#x27;, err);&#xA;        res.status(500).json({ message: &#x27;Error processing video&#x27;, error: err.message });&#xA;    })&#xA;    .save(outputFilePath);`&#xA;&#xA;`const uploadToS3 = (filePath, bucketName, key) => {&#xA;return new Promise((resolve, reject) => {&#xA;    fs.readFile(filePath, (err, data) => {&#xA;        if (err) return reject(err);&#xA;&#xA;        const params = {&#xA;            Bucket: bucketName,&#xA;            Key: key,&#xA;            Body: data,&#xA;            ContentType: &#x27;application/dash&#x2B;xml&#x27;&#xA;        };&#xA;&#xA;        s3.upload(params, (err, data) => {&#xA;            if (err) return reject(err);&#xA;            resolve(data.Location);&#xA;        });&#xA;    });&#xA;});&#xA;

    &#xA;

     ;`

    &#xA;

    i have tried this version of code.

    &#xA;

    now i want to know what is the best to way to keep data in s3 for compress video after ffmpeg.

    &#xA;