
Recherche avancée
Autres articles (94)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains 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 ;
Sur d’autres sites (7973)
-
Wav file conversion/resampling options in C#
7 juin 2021, par oceansmovingBackground :


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 Sineokin 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 bbasaranI 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 !