
Recherche avancée
Médias (9)
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Elephants Dream - Cover of the soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (105)
-
L’agrémenter visuellement
10 avril 2011MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté. -
Publier sur MédiaSpip
13 juin 2013Puis-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 -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.
Sur d’autres sites (7629)
-
Evolution #3784 (Nouveau) : Validation automatique des messages de forum par un admin
31 mai 2016, par phe nixHello,
Un administrateur qui (par exemple) répond à un message de forum, dois par la suite aller le valider si le site est en mode "Modération a priori".
C’est plutôt relou, on peu sans crainte publier directement les messages des administrateurs non ? Puisqu’ils peuvent de toute façon s’auto-modérer.
-
How to split an audio / video file based upon multiple timestamps by using FFMPEG (preferably)
19 février, par badr2001I would like to be able to split my audio (mp3 or equiv.) or video file based upon multiple timestamps. The same way, for those who have used any editing software, you can crop the file based upon selecting a start time and end time.


What I have done so far :


[HttpPost]
public async Task<string> ProcessFullAudio([FromBody] ProcessFullAudioRequest processFullAudioRequest)
{
 if (processFullAudioRequest == null || processFullAudioRequest.StartEndTimes == null || processFullAudioRequest.StartEndTimes.Length == 0)
 {
 throw new ArgumentException("Invalid request: StartEndTimes cannot be null or empty.");
 }

 var timestamp = DateTime.Now.ToString("yyyyMMdd_HHmmss");
 var fileName = $"{Guid.NewGuid()}_{timestamp}.mp3";
 var outputFilePath = Path.Combine(customFolder, fileName);

 int amntOfTimeStamps = processFullAudioRequest.StartEndTimes.Length;
 int step = 0;
 string lineOfCodeForFirstTime = " \"aselect='not(between(t,<start>,<end>)";
 string lineOfCodeForRestOfTimes = "+between(t,<start>,<end>)";
 string argument = "";
 string result = null;
 string filterComplex = GenerateAtrims(processFullAudioRequest.StartEndTimes);

 while (step != amntOfTimeStamps)
 {
 step++;
 if (step == 1)
 {
 result = ReplacePlaceholders(lineOfCodeForFirstTime, HhMmSsToSeconds(processFullAudioRequest.StartEndTimes[step - 1].Start).ToString() , HhMmSsToSeconds(processFullAudioRequest.StartEndTimes[step - 1].End).ToString());
 argument += result;
 }
 else
 {
 result = ReplacePlaceholders(lineOfCodeForRestOfTimes, HhMmSsToSeconds(processFullAudioRequest.StartEndTimes[step - 1].Start).ToString() , HhMmSsToSeconds(processFullAudioRequest.StartEndTimes[step - 1].End).ToString());
 argument += result;
 }

 }
 var FFMPEG_PATH = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "ffmpeg.exe");
 if (!System.IO.File.Exists(FFMPEG_PATH))
 {
 return "ffmpeg.exe IS NULL";
 }
 var arguments = $"-i {processFullAudioRequest.InputFilePath} -af {argument})' ,asetpts=N/SR/TB\" -acodec libmp3lame {outputFilePath}";

 await ProcessAsyncHelper.ExecuteShellCommand(FFMPEG_PATH, arguments, Timeout.Infinite);

 return outputFilePath;
}
</end></start></end></start></string>


The code, I hope, is self explanatory.
The argument variable should like something like this :


-i C:\Users\User\Desktop\AudioEditorBackEnmd\AudioEditorAPI\wwwroot\mp3\TestAudio_123.mp3 -af "aselect='not(between(t,120,240))' ,asetpts=N/SR/TB" -acodec libmp3lame C:\Users\User\Desktop\AudioEditorBackEnmd\AudioEditorAPI\wwwroot\mp3\aa887f21-0a90-4ec5-80ba-2b265cb445b4_20250219_123804.mp3



After returning the output path for the newly processed edited audio, I pass it to my DownloadFile function :


[HttpGet]
 public async Task<iactionresult> DownloadProcessedFile([FromQuery] string fileName)
 {
 if (string.IsNullOrWhiteSpace(fileName))
 {
 return BadRequest("File name is required.");
 }

 var filePath = Path.Combine(customFolder, fileName);

 if (!System.IO.File.Exists(filePath))
 {
 return NotFound(new { fileName });
 }

 try
 {
 var fileBytes = await System.IO.File.ReadAllBytesAsync(filePath);

 return File(fileBytes, "audio/mpeg", fileName);

 }
 catch (Exception ex)
 {
 throw;
 }

 }

</iactionresult>


Everything works, in the sense off, I am able to get an processed file which is shorter than the original audio. However the issue is that the timestamps are off.
For example, in the argument that I provided above, I am cropping the audio from 120 to 240, which is from the 2 min mark till the 4 min mark. The audio which I am passing is 01:06:53 however the processed audio gives me back 1:05:22 which is not excepted as I should be getting 01:04:53.


The annoying thing is that I was getting the desired output at one point. Im not sure what changes caused the timestamps to become off. The only changes which I did was changing the file locations to my wwwroot folder.


I have tried many different variations of commands to get a desired output but can't seem to get anything close - I always get 1:05:22 back. From the commands that I tired was :


var arguments = $"-i {processFullAudioRequest.InputFilePath} -af {argument})' , asetpts=N/SR/TB\" -c:a libmp3lame -q:a 2 {outputFilePath}";



I tried so many more but I simply can't remember. And now I feel like I have reached a hard wall in coming up with a solution for this.


Any help I would much appreciate. I have tried to give as much detail as I can but if anything remains please let me know.


-
ffmpeg - zero file size for specific videos ?
27 mai 2022, par AnnabelleI am trying the below command for the video conversion


ffmpeg -i " + video_file_path + " -max_muxing_queue_size 21512512 -vf scale=iw*2:ih*2 -preset slow -crf 28 " + path_to_store_generated_width


This is error log


error: Command failed: ffmpeg -i ../uploads/feeds/feeds_e8dc4081b13434b45189a720b77b68181653655030206.mp4 -max_muxing_queue_size21512512 -vf scale=iw*2:ih*2 -preset slow -crf 28 ../uploads/feeds/feed_video_e8dc4081b13434b45189a720b77b68181653655038559.mp4
ffmpeg version 3.4.8 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-39)
 configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --extra-ldflags='-Wl,-z,relro ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-indev=jack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl--enable-opengl --enable-libopenjpeg --enable-libopus --disable-encoder=libopus --enable-libpulse --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzvbi --enable-avfilter --enable-avresample --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../uploads/feeds/feeds_e8dc4081b13434b45189a720b77b68181653655030206.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: mp42isom
 Duration: 00:00:20.20, start: 0.000000, bitrate: 807 kb/s
 Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt470bg/bt470bg/smpte170m), 640x1138, 746 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 64 kb/s (default)
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
 Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0xd61bc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0xd61bc0] profile High, level 5.0
[libx264 @ 0xd61bc0] 264 - core 148 r2795 aaa9aa8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=48 lookahead_threads=8 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=crf mbtree=1 crf=28.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '../uploads/feeds/feed_video_e8dc4081b13434b45189a720b77b68181653655038559.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: mp42isom
 encoder : Lavf57.83.100
 Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1280x2276, q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
 Metadata:
 encoder : Lavc57.107.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 encoder : Lavc57.107.100 aac
x264 [error]: malloc of size 9600192 failedime=00:00:02.20 bitrate= 0.0kbits/s dup=2 drop=0 speed=1.71x 1.84x
Video encoding failed
[aac @ 0xcdc7e0] Qavg: 3044.613
[aac @ 0xcdc7e0] 2 frames left in the queue on closing
Conversion failed!



Getting this error for specific videos tried adding crf 0/22 but couldn't work through
I am not familiar with FFmpeg and its usage
Suggestion would be helpful
Thank you !