Recherche avancée

Médias (17)

Mot : - Tags -/wired

Autres articles (38)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • 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

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

Sur d’autres sites (7809)

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