Recherche avancée

Médias (91)

Autres articles (74)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains 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, par

    Pré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 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

Sur d’autres sites (7652)

  • FFMPEG : Convert WebM VP8/VP9 multi-resolution video to MP4 (H.264)

    3 août 2020, par thedeadalive

    I have been trying to convert a multi-resolution WebM video ( VP9/VP8/H.264 ) (1280 x 1080 till the half, thereafter 1080 x 1280) to MP4 container with H.264 encoding for video.

    


    When transcoded with FFMPEG is locking into the frame size it's encountering at the start of the video (1280 x 1080 in this case) when transcoded with libvpx (for VP8 and VP9) and libx264 (for H264).

    


    The only instance i could get it right was when the Input WebM was having H.264 video and opus Audio, and ffmpeg was instructed to just copy the video stream and trans-code the Audio to aac only.

    


    Is there way in make ffmpeg support multi-resolution video transcoding ?

    


    How to generate a sample video : On a Chrome or Firefox (on a device that supports auto rotation and has different resolution on portrait and landscape) that supports mediaRecorder API goto this link : https://webrtc.github.io/samples/src/content/getusermedia/record/ , start recording a video , while recording the video, change orientation, stop recording and download the video. file)

    


    Discussion Reference : https://groups.google.com/a/webmproject.org/forum/# !topic/webm-discuss/IgumDyMAHY0

    


  • Change video resolution in loop

    24 juillet 2020, par WoJo

    I am trying to decrease the resolution of a video to under 500x500. I don't want to change it to exactly 500x500 because that would mess up video quality. So what I am trying to do is to decrease the resolution by 75% in a loop, and that loop would only stop when the video is under 500x500. In theory that would not be hard, but I can't seem to figure it out.

    


    var vidwidth = 501; //Create variable and put it to 501
var vidheight = 501; //so that it won't go through the If Statement
fs.copyFile(filepath2, './media/media.mp4', (err: any) => { //Copy given file to directory
    console.log('filepath2 was copied to media.mp4'); //Log confirmation (Not appearing for some reason, but file is copied)
})
while (true) {
    getDimensions('./media/media.mp4').then(function (dimensions: any) { //Get dimensions of copied video
        var vidwidth = parseInt(dimensions.width)   //Parse to Int
        var vidheight = parseInt(dimensions.height) //and put in variables
    })
    ffmpeg('./media/media.mp4')                 //Call ffmpeg function with copied video path
        .output('./media/media.mp4')            //Set output to the same file so we can loop it
        .size('75%')                            //Reduce resolution by 75%
        .on('end', function() {                 //Log confirmation on end
            console.log('Finished processing'); //(Not appearing)
        })                                      //
        .run();                                 //Run function
    if (vidwidth < 500 && vidheight < 500) {    //Check if both the width and height is under 500px
        break;                                  //If true, break the loop and continue
    }
}


    


    This is the current code I am using with comments. Basically what happens is it gets stuck in the while loop because the dimensions of the video won't change. Tested with console.log() line. I think that if I can fix the ffmpeg problem somehow it will all be fixed.
I'd appreciate any help :)

    


    PS : This is all made in typescript, then build into js using npx tsc

    


  • How to not allow upload of HD content ?More than 1920 x 1080 || 1080 x 1920 resolution files are not allowed since hardware reasons

    23 juillet 2020, par azaono

    Struggling with making limitation to uploade HD file/content. Intent is to have possibility to rotate content. Limits are required due to hardware reasons.

    


            val ffmpeg = FFmpeg("ffmpeg")
        val ffprobe = FFprobe("ffprobe")
        val probeResult = ffprobe.probe("$targetLocation")
        val stream: FFmpegStream = probeResult.getStreams()[0]
        val aspectRatio = stream.width.toDouble() / stream.height
        
        if (stream.width > 1920) {
            Files.delete(targetLocation)
            throw IncorrectResolutionFileException()
        } else if (stream.height > 1080) {
            Files.delete(targetLocation)
            throw IncorrectResolutionFileException()
        }

        if (type == "image") {
            part.transferTo(thumbnailLocation)
        }

        val builder: FFmpegBuilder = FFmpegBuilder()
            .setInput("$targetLocation")
            .addOutput("$thumbnailLocation")
            .setFrames(1)
            .setVideoFilter("select='gte(n\\,10)',scale=200:-1")
            .done()
        val executor = FFmpegExecutor(ffmpeg)
        executor.createJob(builder).run()

        return aspectRatio
    } catch (ex: Exception) {
        throw FileStorageException("Could not store file $cleanPath. Please try again!", ex)
    }
}