Recherche avancée

Médias (3)

Mot : - Tags -/Valkaama

Autres articles (77)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (4699)

  • Wav file conversion/resampling options in C#

    7 juin 2021, par oceansmoving

    Background :

    


    Trying to convert various wav files to a format that is accepted by the game CS:GO.
So as you can see below in the source code for a VB application that is successfully doing this (https://github.com/SilentSys/SLAM/blob/master/SLAM/Form1.vb), it's supposed to be :

    


      

    • Mono
    • 


    • 16 Bit
    • 


    • 22050hz
    • 


    


        Private Sub FFMPEG_ConvertAndTrim(inpath As String, outpath As String, samplerate As Integer, channels As Integer, starttrim As Double, length As Double, volume As Double)
        Dim convert As New FFMpegConverter()
        convert.ExtractFFmpeg()

        Dim trimstring As String
        If length > 0 Then
            trimstring = String.Format("-ss {0} -t {1} ", starttrim.ToString("F5", Globalization.CultureInfo.InvariantCulture), length.ToString("F5", Globalization.CultureInfo.InvariantCulture))
        End If

        Dim command As String = String.Format("-i ""{0}"" -n -f wav -flags bitexact -map_metadata -1 -vn -acodec pcm_s16le -ar {1} -ac {2} {3}-af ""volume={4}"" ""{5}""", Path.GetFullPath(inpath), samplerate, channels, trimstring, volume.ToString("F5", Globalization.CultureInfo.InvariantCulture), Path.GetFullPath(outpath))
        convert.Invoke(command)
    End Sub


    


    Now, the thing is I have very little experience with VB, and as it is C# I am trying to learn I don't want this to be a showstopper.

    


    I have been able, in various ways to convert files that seem to be the correct format and can be played by normal media players, but is not accepted by the game, like the files converted with VB.

    


    The different methods I've been trying without success :

    


                int outRate = 22050;


    


                using (var reader = new MediaFoundationReader(inFile))
            {
                var outFormat = new WaveFormat(outRate, 1);
                using (var resampler = new WaveFormatConversionStream(outFormat, reader))
                {
                    WaveFileWriter.CreateWaveFile(outFile, resampler);
                }
            }


    


    Next one gives me an error that everyone is referring to the LT version of the package to solve, that in turn requires license...

    


                var ffMpeg = new FFMpegConverter();

            String args = $"-i '{@inFile}' -n -f wav -flags bitexact -map_metadata -1 -vn -acodec pcm_s16le -ar {outRate} -ac 1 '{@outFile}'";
            ffMpeg.Invoke(args);


    


    Another

    


            using (WaveFileReader reader = new WaveFileReader(inFile))
            {
                var outFormat = new WaveFormat(outRate, 1);
                using (var resampler = new MediaFoundationResampler(reader, outFormat))
                {
                    WaveFileWriter.CreateWaveFile(outFile, resampler);
                }
            }


    


    Another

    


                        FileStream fileStream = new FileStream(inFile, FileMode.Open);
                    WaveFormat waveFormat = new WaveFormat(22050, 16, 1);
                    var reader = new RawSourceWaveStream(fileStream, waveFormat);
                    using (WaveStream convertedStream = WaveFormatConversionStream.CreatePcmStream(reader))
                    {
                        WaveFileWriter.CreateWaveFile(outFile, convertedStream);
                    }
                    fileStream.Close();


    


  • FFMPEG - force webm clusters duration [closed]

    1er avril 2021, par Vlad Sineok

    in short, i'm modifying a game that uses a VP8 video format.
the original videos are at 25 fps and have all clusters of nice and perfect duration 0.96 seconds and contain 25 blocks each (except for that last cluster, which usually varies). also every cluster starts with a keyframe. (all that information i gathered using webm_info from google's libwebm repo)

    


    unless all of the requirements are met, the game struggles to play the webm file smoothly, so my own webm files stutter most of the time, because ffmpeg fails to create the correct clusters and mkclean doesn't help either.
so my question is : how would i force ffmpeg to make all clusters have that perfect duration ?
here's what my command currently looks like

    


    for %%f in (*.webm) do (
ffmpeg -y -i %%f -vcodec libvpx -cpu-used 1 -pass 1 -reserve_index_space 16384 -fflags +genpts -crf 15 -slices 8 -g 25 -keyint_min 25 -vprofile 1 -auto-alt-ref 1 -arnr-maxframes 5 -arnr-strength 3 -deadline good -vf scale=512:384,setsar=1:1 -vb 4000k -an -r 25 -movflags use_metadata_tags -f webm NUL && ^
ffmpeg -y -i %%f -vcodec libvpx -cpu-used 1 -pass 2 -reserve_index_space 16384 -fflags +genpts -crf 15 -slices 8 -g 25 -keyint_min 25 -vprofile 1 -auto-alt-ref 1 -arnr-maxframes 5 -arnr-strength 3 -deadline good -vf scale=512:384,setsar=1:1 -vb 4000k -an -r 25 -movflags use_metadata_tags -f webm %%~nf.webm
)


    


  • FFmpeg : Frame sizes of the generated video are extremely larger than the expected [closed]

    8 février 2021, par bbasaran

    I am recording frames (screen buffer) as NumPy arrays during the game which runs on the resolution of "400x225". Each frame array is a size of 270.1 kB.

    


    After saving those frames, I create an mp4 file with the following bash command (The game runs in 35 FPS (frames/second)) :

    


    ffmpeg -r 35 -f image2 -i frame%05d.png -vcodec libx264 -crf 1 video.mp4


    


    Then I have used a tool to generate a CSV file of frame data from the video created with the command above. The output is here below. The weird this is that, if we sum those first 35 frames (video was recorded with "-r 35" parameter because game runs in 35 FPS), we get approximately 18k kbit.

    


    18k kbit/sec bitrate is super high for a 400x225 video. What am I doing wrong while generating the video ? I appreciate any help, thanks !

    


    enter image description here