Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (39)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

Sur d’autres sites (4330)

  • ffmpeg transcoding one input video stream and multiple output video streams in the same file

    28 janvier 2020, par user2165262

    I am trying to transcode a single video file with 1 video stream and several audio streams to the file having same video stream in different bitrates/sizes with correct padding at the same time.

    the command I use is :

        ffmpeg -y -ss 600 -t 600 -i "INPUT.mkv" -map_chapters -1 -map 0:0 -c:v libx264 -keyint_min 48 -g 96 -bufsize 350k -b:v 350k -minrate 300k -maxrate 400k -profile:v baseline -level 3.0 -preset slow -vf "scale=iw*min(480/iw\,272/ih):ih*min(480/iw\,272/ih),pad=480:272 :(480-iw)/2 :(272-ih)/2" -map 0:0 -c:v libx264 -keyint_min 48 -g 96 -bufsize 650k -b:v 650k -minrate 500k -maxrate 800k -profile:v baseline -level 3.1 -preset slow -vf "scale=iw*min(640/iw\,360/ih):ih*min(640/iw\,360/ih),pad=640:360 :(640-iw)/2 :(360-ih)/2" -map 0:1 -c:a libfaac -b:a 32k -ar 44100 -f mpegts OUTPUT.m2ts
    

    ffmpeg creates two video streams, however the bitrate and resolution for all of them are taken from the last video arguments - i.e. both streams are 640x360 :

        Output #0, mpegts, to ’OUTPUT.m2ts’ :
        Stream #0:0(eng) : Video : h264, yuv420p, 640x360 [SAR 559:560 DAR 559:315], q=-1—1, 650 kb/s,     Stream #0:1(eng) : Video : h264, yuv420p, 640x360 [SAR 559:560 DAR 559:315], q=-1—1, 650 kb/s, 90k tbn, 23.98 tbc (default)
        Stream #0:2(rus) : Audio : aac, 44100 Hz, 5.1, s16, 32 kb/s (default)
        Stream mapping :
        Stream #0:0 -> #0:0 (h264 -> libx264)
        Stream #0:0 -> #0:1 (h264 -> libx264)
        Stream #0:1 -> #0:2 (aac -> libfaac)
        Press [q] to stop, [?] for help
    

    Is it practically possible to make transcoding to several bitrates to the same file ?

  • How to use Hardware codec during video compression in Android

    2 septembre 2024, par Filnik

    I was wondering how to use hardware acceleration in the best way to compress a video on Android. I've tried Transformer by ExoPlayer and is quite slow.

    


    With ffmpegKit unfortunately libopenh264 is quite slow (and doesn't use hardware codec) and I'm not able to make h264_mediacodec work. Any idea on how to make the mediacodec work ?

    


    This is the code I'm using right now for the tests but it fails with mediacodec (generic error). I've compiled manually FFMpegKit to add mediacodec already.

    


    companion object {
    private const val VIDEO_WIDTH = 1080
    private const val VIDEO_HEIGHT = 1920
    private const val BITRATE_MBS = 7 * 1000000
    private const val COMPRESSION_FILE_NAME = "compression"
    private const val VIDEO_EXTENSION = ".mp4"
}

suspend fun compressVideo(videoUri: Uri): String? = withContext(defaultDispatcher) {
    val tempInputFile = copyUriToFile(context, videoUri)
    val outputFile = File.createTempFile(COMPRESSION_FILE_NAME, VIDEO_EXTENSION, context.cacheDir)
    val outputPath = outputFile.absolutePath

    val cmd = mutableListOf(
        "-y",
        "-i", tempInputFile.absolutePath,
        "-vf", "scale=w=$VIDEO_WIDTH:h=$VIDEO_HEIGHT:force_original_aspect_ratio=decrease",
        "-c:v", "h264_mediacodec",
        "-b:v", "$BITRATE_MBS",
        outputPath
    )

    val session: FFmpegSession = FFmpegKit.execute(cmd.joinToString(" "))

    tempInputFile.delete()

    return@withContext if (ReturnCode.isSuccess(session.returnCode)) {
        outputPath
    } else {
        FirebaseCrashlytics.getInstance().recordException(Exception("FFmpeg compression failed: ${session.allLogsAsString}"))
        null
    }
}


    


  • Why ffmpeg/mplayer2 play sloppy something that vlc plays well ?

    8 octobre 2015, par exebook

    While trying to play with mplayer2 or stream with ffmpeg, the video has a slight delay about every 12 seconds. Sometimes leading to distorted picture. But the same input plays back perfectly with vlc. What could be the reason for this ?

    mplayer2 shows it’s infamous "YOUR SYSTEM IS TOO SLOW TO PLAY THIS", but neither of its suggestions make difference.