Recherche avancée

Médias (1)

Mot : - Tags -/iphone

Autres articles (53)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-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

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

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (8663)

  • Webcam Serverless Live stream

    23 juillet 2021, par curiouscoder

    I'm trying to live stream my webcam in a serverless way in the following flow :

    


    webcam browser >> s3 bucket >> lambda/ffmpeg encoding >> s3 output bucket >> dash player

    


    This is working really good so far but I'm facing the following problem :

    


    ffmpeg will only encode those seconds received (I stream the webcam to s3 each X seconds with some 300kb .webm file). So the .mpd file generated by ffmpeg encoder will have the type 'static' when ffmpeg finishes encoding and not the 'dynamic' type desired. Therefore, the dash player won't request the other files from s3 and the streaming will stop. For example, if I let the webcam streaming running for 15 seconds, the viewer is able to watch the 15 minutes. But if I keep sending the streams each 2 seconds the viewer will be able to watch only the first 2 seconds because browser won't request any other .m4s files.

    


    So, I have the following question :

    


    Is there a way to force the dash player to reload the .mpd file that is stored in s3 even when the type is static instead of dynamic ?

    


    Thanks in advance !

    


  • Mux ts segments to fragmented mp4 in realtime

    10 avril 2021, par bsack

    I have an HLS stream which plays in the browser. What I want to do is have a URL like /stream.mp4 that plays the livestream back as a fragmented mp4 from the current point in time. This way you could download the stream as a single file and it would work without any js dependencies.

    


    The method I thought of is :

    


      

    1. send an mp4 header
    2. 


    3. wait for a new segment
    4. 


    5. convert the segment into an mp4 fragment with ffmpeg
    6. 


    7. send the mp4 fragment
    8. 


    9. go to 2.
    10. 


    


    (I know you can concatenate .ts segments but they don't play in Firefox.)

    


    This answer describes how to create a fragmented mp4 when you have all the segments at hand (tl ;dr use -movflags frag_keyframe+emptymoov). But I want to do this on the fly so each new HLS segment is converted to an mp4 fragment as soon as it's created.

    


    I think this is similar to what DASH does natively, where any chunk chunk-$n.m4s can be appended to init.m4s and it'll be a proper fragmented mp4. But can this be done without using DASH ?

    


    How can I transmux a ts segment into an mp4 fragment ?

    


    Edit : I found a way of doing what I wanted, but not through transmuxing mpegts segments to fmp4. It turns out that later versions of HLS do support fragmented mp4 (like DASH does), and FFmpeg provides the -hls_segment_type fmp4 option for this.

    


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

    


    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.

    


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

    


    // Ensure the output directory exists
if (!fs.existsSync(outputDir)) {
    fs.mkdirSync(outputDir, { recursive: true });
}

ffmpeg(videoPath)
    .outputOptions([
        '-profile:v main',
        '-use_template 1',
        '-use_timeline 1',
        '-b:v 1000k',
        '-b:a 128k',
        '-f dash'
    ])
    .on('end', async () => {
        console.log('DASH file created successfully');
        try {
            const s3Url = await uploadToS3(outputFilePath, bucketName, s3Key);
            res.status(200).json({ message: 'Video uploaded and DASH file created', url:    s3Url });
        } catch (err) {
            console.error('Error uploading to S3: ', err);
            res.status(500).json({ message: 'Error uploading to S3', error: err.message });
        }
    })
    .on('error', (err) => {
        console.error('Error processing video: ', err);
        res.status(500).json({ message: 'Error processing video', error: err.message });
    })
    .save(outputFilePath);`

`const uploadToS3 = (filePath, bucketName, key) => {
return new Promise((resolve, reject) => {
    fs.readFile(filePath, (err, data) => {
        if (err) return reject(err);

        const params = {
            Bucket: bucketName,
            Key: key,
            Body: data,
            ContentType: 'application/dash+xml'
        };

        s3.upload(params, (err, data) => {
            if (err) return reject(err);
            resolve(data.Location);
        });
    });
});


    


     ;`

    


    i have tried this version of code.

    


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