Recherche avancée

Médias (9)

Mot : - Tags -/soundtrack

Autres articles (105)

  • L’agrémenter visuellement

    10 avril 2011

    MediaSPIP 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 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

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La 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 nix

    Hello,

    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 badr2001

    I 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]&#xA;public async Task<string> ProcessFullAudio([FromBody] ProcessFullAudioRequest processFullAudioRequest)&#xA;{&#xA;    if (processFullAudioRequest == null || processFullAudioRequest.StartEndTimes == null || processFullAudioRequest.StartEndTimes.Length == 0)&#xA;    {&#xA;        throw new ArgumentException("Invalid request: StartEndTimes cannot be null or empty.");&#xA;    }&#xA;&#xA;    var timestamp = DateTime.Now.ToString("yyyyMMdd_HHmmss");&#xA;    var fileName = $"{Guid.NewGuid()}_{timestamp}.mp3";&#xA;    var outputFilePath = Path.Combine(customFolder, fileName);&#xA;&#xA;    int amntOfTimeStamps = processFullAudioRequest.StartEndTimes.Length;&#xA;    int step = 0;&#xA;    string lineOfCodeForFirstTime = " \"aselect=&#x27;not(between(t,<start>,<end>)";&#xA;    string lineOfCodeForRestOfTimes = "&#x2B;between(t,<start>,<end>)";&#xA;    string argument = "";&#xA;    string result = null;&#xA;    string filterComplex = GenerateAtrims(processFullAudioRequest.StartEndTimes);&#xA;&#xA;    while (step != amntOfTimeStamps)&#xA;    {&#xA;        step&#x2B;&#x2B;;&#xA;        if (step == 1)&#xA;        {&#xA;            result = ReplacePlaceholders(lineOfCodeForFirstTime, HhMmSsToSeconds(processFullAudioRequest.StartEndTimes[step - 1].Start).ToString() , HhMmSsToSeconds(processFullAudioRequest.StartEndTimes[step - 1].End).ToString());&#xA;            argument &#x2B;= result;&#xA;        }&#xA;        else&#xA;        {&#xA;            result = ReplacePlaceholders(lineOfCodeForRestOfTimes, HhMmSsToSeconds(processFullAudioRequest.StartEndTimes[step - 1].Start).ToString() , HhMmSsToSeconds(processFullAudioRequest.StartEndTimes[step - 1].End).ToString());&#xA;            argument &#x2B;= result;&#xA;        }&#xA;&#xA;    }&#xA;    var FFMPEG_PATH = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "ffmpeg.exe");&#xA;    if (!System.IO.File.Exists(FFMPEG_PATH))&#xA;    {&#xA;        return "ffmpeg.exe IS NULL";&#xA;    }&#xA;    var arguments = $"-i {processFullAudioRequest.InputFilePath} -af {argument})&#x27; ,asetpts=N/SR/TB\" -acodec libmp3lame {outputFilePath}";&#xA;&#xA;    await ProcessAsyncHelper.ExecuteShellCommand(FFMPEG_PATH, arguments, Timeout.Infinite);&#xA;&#xA;    return outputFilePath;&#xA;}&#xA;</end></start></end></start></string>

    &#xA;

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

    &#xA;

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

    &#xA;

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

    &#xA;

            [HttpGet]&#xA;        public async Task<iactionresult> DownloadProcessedFile([FromQuery] string fileName)&#xA;        {&#xA;            if (string.IsNullOrWhiteSpace(fileName))&#xA;            {&#xA;                return BadRequest("File name is required.");&#xA;            }&#xA;&#xA;            var filePath = Path.Combine(customFolder, fileName);&#xA;&#xA;            if (!System.IO.File.Exists(filePath))&#xA;            {&#xA;                return NotFound(new { fileName });&#xA;            }&#xA;&#xA;            try&#xA;            {&#xA;                var fileBytes = await System.IO.File.ReadAllBytesAsync(filePath);&#xA;&#xA;                return File(fileBytes, "audio/mpeg", fileName);&#xA;&#xA;            }&#xA;            catch (Exception ex)&#xA;            {&#xA;                throw;&#xA;            }&#xA;&#xA;        }&#xA;&#xA;</iactionresult>

    &#xA;

    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.&#xA;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.

    &#xA;

    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.

    &#xA;

    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 :

    &#xA;

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

    &#xA;

    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.

    &#xA;

    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.

    &#xA;

  • ffmpeg - zero file size for specific videos ?

    27 mai 2022, par Annabelle

    I am trying the below command for the video conversion

    &#xA;

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

    &#xA;

    This is error log

    &#xA;

    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&#xA;ffmpeg version 3.4.8 Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-39)&#xA;  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=&#x27;-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic&#x27; --extra-ldflags=&#x27;-Wl,-z,relro &#x27; --extra-cflags=&#x27; &#x27; --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&#xA;&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;../uploads/feeds/feeds_e8dc4081b13434b45189a720b77b68181653655030206.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : mp42&#xA;    minor_version   : 0&#xA;    compatible_brands: mp42isom&#xA;  Duration: 00:00:20.20, start: 0.000000, bitrate: 807 kb/s&#xA;    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)&#xA;    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 64 kb/s (default)&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))&#xA;  Stream #0:1 -> #0:1 (aac (native) -> aac (native))&#xA;Press [q] to stop, [?] for help&#xA;[libx264 @ 0xd61bc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2&#xA;[libx264 @ 0xd61bc0] profile High, level 5.0&#xA;[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&#xA;Output #0, mp4, to &#x27;../uploads/feeds/feed_video_e8dc4081b13434b45189a720b77b68181653655038559.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : mp42&#xA;    minor_version   : 0&#xA;    compatible_brands: mp42isom&#xA;    encoder         : Lavf57.83.100&#xA;    Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1280x2276, q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)&#xA;    Metadata:&#xA;      encoder         : Lavc57.107.100 libx264&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1&#xA;    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)&#xA;    Metadata:&#xA;      encoder         : Lavc57.107.100 aac&#xA;x264 [error]: malloc of size 9600192 failedime=00:00:02.20 bitrate=   0.0kbits/s dup=2 drop=0 speed=1.71x    1.84x&#xA;Video encoding failed&#xA;[aac @ 0xcdc7e0] Qavg: 3044.613&#xA;[aac @ 0xcdc7e0] 2 frames left in the queue on closing&#xA;Conversion failed!&#xA;

    &#xA;

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

    &#xA;