Recherche avancée

Médias (0)

Mot : - Tags -/alertes

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (63)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains 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 ;

  • 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

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (7879)

  • FFMPEG in an AWS Lambda will only output 5 seconds of converted video [duplicate]

    5 juin 2021, par beerandsmiles

    I've been looking for a solution for this issue, but I can't seem to find what's going wrong.

    


    In short, I'm using an AWS Lambda to convert video captured from an raspberry pi in a raw .h264 format to .mp4. The problem is that the output file is always, only 5 seconds long.

    


    So I input a video of say 500mb, that is 10 minutes long, and the output is an mp4 that is exactly the first 5 seconds of the source video.

    


    The lambda has been setup following the tutorial from Amazon that is shown here :
https://aws.amazon.com/blogs/media/processing-user-generated-content-using-aws-lambda-and-ffmpeg/

    


    It is triggered by an upload from one s3 buckets, transcodes, and puts it in a different bucket. The purpose is to store a high quality copy of the video that is smaller to save costs. (this is a personal project, so I'm paying personally)

    


    I've put the full code of the lambda down below.
I had trouble using their recommended stdout method as that resulted in a file being created with a size of 0 bytes.

    


    You'll see a few commented lines where I tried different things to solve it. I thought it best to leave that in while asking the questions so you can see what I've done. Firstly the method of using stdout piped directly into the output S3 did not work, so I stored the output file in lambda's /tmp directory.

    


    However, when I first did this using the signed link as the input it gave me 5 seconds of the input video.

    


    Thinking this had to do with an issue in the stream that FFMPEG was getting, I tried instead to download the file from the first S3 bucket into the temp folder, then convert it, and then upload it.

    


    The actual FFMPEG command is quite simple

    


    f"/opt/bin/ffmpeg -framerate 25 -i {s3_source_key} output.mp4"

    


    But this outputs a 5 second video.

    


    I have also tried using different versions of FFMPEG for the layer with lambda and no help. Also, I have set and execution timeout of 2 minutes with 2gb or ram for this lambda.

    


    The last thing, is that running this command on a linux machine, such as a raspberry pi directly, results in an mp4 of the correct length, only in the lambda am I having this problem.

    


    I'm completely lost, and I can't seem to find any documentation on this happening to anyone else.

    


    import os
import subprocess
import shlex
import boto3
from time import sleep

S3_DESTINATION_BUCKET = "dashcam-duncan"
SIGNED_URL_TIMEOUT = 600

def lambda_handler(event, context):
    print(event)
    os.chdir('/tmp')
    s3_source_bucket = event['Records'][0]['s3']['bucket']['name']
    s3_source_key = event['Records'][0]['s3']['object']['key']

    s3_source_basename = os.path.splitext(os.path.basename(s3_source_key))[0]
    s3_destination_filename = s3_source_basename + ".mp4"

    s3_client = boto3.client('s3')
    s3_source_signed_url = s3_client.generate_presigned_url('get_object',
        Params={'Bucket': s3_source_bucket, 'Key': s3_source_key},
        ExpiresIn=SIGNED_URL_TIMEOUT)
    print(s3_source_signed_url)
    s3_client.download_file(s3_source_bucket,s3_source_key,s3_source_key)
    # ffmpeg_cmd = "/opt/bin/ffmpeg -framerate 25 -i \"" + s3_source_signed_url + "\" output.mp4 "
    ffmpeg_cmd = f"/opt/bin/ffmpeg -framerate 25 -i {s3_source_key} output.mp4 "
    # command1 = shlex.split(ffmpeg_cmd)
    # print(command1)
    os.system(ffmpeg_cmd)
    # os.system('ls')
    # p1 = subprocess.run(command1, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    file = 'output.mp4'
    resp = s3_client.put_object(Body=open(file,"rb"), Bucket=S3_DESTINATION_BUCKET, Key=s3_destination_filename)
    # resp = s3_client.put_object(Body=p1.stdout, Bucket=S3_DESTINATION_BUCKET, Key=s3_destination_filename)
    s3 = boto3.resource('s3')
    s3.Object(s3_source_bucket,s3_source_key).delete()
    return {
        'statusCode': 200,
        'body': json.dumps('Processing complete successfully')
    }


    


    The cloudwatch logs on the last execution of this :

    


    built with gcc 8 (Debian 8.3.0-6)&#xA;configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg&#xA;libavutil      56. 70.100 / 56. 70.100&#xA;libavcodec     58.134.100 / 58.134.100&#xA;libavformat    58. 76.100 / 58. 76.100&#xA;libavdevice    58. 13.100 / 58. 13.100&#xA;libavfilter     7.110.100 /  7.110.100&#xA;libswscale      5.  9.100 /  5.  9.100&#xA;libswresample   3.  9.100 /  3.  9.100&#xA;libpostproc    55.  9.100 / 55.  9.100&#xA;Input #0, h264, from &#x27;video00087.h264&#x27;:&#xA;Duration: N/A, bitrate: N/A&#xA;Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720, 25 fps, 25 tbr, 1200k tbn, 50 tbc&#xA;Stream mapping:&#xA;Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))&#xA;Press [q] to stop, [?] for help&#xA;[libx264 @ 0x6aaf500] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2&#xA;[libx264 @ 0x6aaf500] profile High, level 3.1, 4:2:0, 8-bit&#xA;[libx264 @ 0x6aaf500] 264 - core 161 r3048 b86ae3c - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 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=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00&#xA;Output #0, mp4, to &#x27;output.mp4&#x27;:&#xA;Metadata:&#xA;encoder         : Lavf58.76.100&#xA;Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(progressive), 1280x720, q=2-31, 25 fps, 12800 tbn&#xA;Metadata:&#xA;encoder         : Lavc58.134.100 libx264&#xA;Side data:&#xA;cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A&#xA;frame=    1 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   0x    &#xA;frame=   47 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   0x    &#xA;frame=   56 fps= 44 q=28.0 size=       0kB time=00:00:00.24 bitrate=   1.6kbits/s speed=0.187x    &#xA;frame=   65 fps= 35 q=28.0 size=       0kB time=00:00:00.60 bitrate=   0.6kbits/s speed=0.325x    &#xA;frame=   74 fps= 31 q=28.0 size=       0kB time=00:00:00.96 bitrate=   0.4kbits/s speed=0.399x    &#xA;Enter command: <target>|all <time>|-1 <command>[ <argument>]&#xA;Parse error, at least 3 arguments were expected, only 1 given in string &#x27;V����Ҿ�#I���bv��oF��LxE��{��y5Jx�X�-f?2k�E~ہ��L��Y?�w���9?S�?�(q?��y��V8�=)�9&#x27;�?�-j?��?�3���Ŧ$��r���\��r}?zb?E��?��B}b4��2��[z�&amp;�逋�Qk�ar�=y���&#x27;&#xA;frame=   82 fps= 28 q=28.0 size=     256kB time=00:00:01.28 bitrate=1638.6kbits/s speed=0.434x    &#xA;frame=   90 fps= 25 q=28.0 size=     256kB time=00:00:01.60 bitrate=1310.9kbits/s speed=0.442x    &#xA;frame=   98 fps= 23 q=28.0 size=     256kB time=00:00:01.92 bitrate=1092.4kbits/s speed=0.458x    &#xA;frame=  107 fps= 23 q=28.0 size=     256kB time=00:00:02.28 bitrate= 919.9kbits/s speed=0.48x    &#xA;frame=  115 fps= 22 q=28.0 size=     512kB time=00:00:02.60 bitrate=1613.3kbits/s speed=0.495x    &#xA;frame=  122 fps= 21 q=28.0 size=     512kB time=00:00:02.88 bitrate=1456.4kbits/s speed=0.499x    &#xA;[h264 @ 0x6b68c80] left block unavailable for requested intra mode&#xA;[h264 @ 0x6b68c80] error while decoding MB 0 19, bytestream 37403&#xA;[h264 @ 0x6b68c80] concealing 2129 DC, 2129 AC, 2129 MV errors in P frame&#xA;video00087.h264: corrupt decoded frame in stream 0&#xA;[h264 @ 0x6ab4080] left block unavailable for requested intra4x4 mode -1&#xA;[h264 @ 0x6ab4080] error while decoding MB 0 37, bytestream 13222&#xA;[h264 @ 0x6ab4080] concealing 689 DC, 689 AC, 689 MV errors in P frame&#xA;video00087.h264: corrupt decoded frame in stream 0&#xA;[h264 @ 0x6b68c80] concealing 1347 DC, 1347 AC, 1347 MV errors in P frame&#xA;frame=  130 fps= 21 q=28.0 size=     512kB time=00:00:03.20 bitrate=1310.8kbits/s speed=0.509x    &#xA;video00087.h264: corrupt decoded frame in stream 0&#xA;frame=  131 fps= 15 q=-1.0 Lsize=    1081kB time=00:00:05.12 bitrate=1729.6kbits/s speed=0.575x    &#xA;video:1079kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.220914%&#xA;[libx264 @ 0x6aaf500] frame I:1     Avg QP:21.61  size: 37761&#xA;[libx264 @ 0x6aaf500] frame P:34    Avg QP:22.25  size: 18066&#xA;[libx264 @ 0x6aaf500] frame B:96    Avg QP:24.46  size:  4706&#xA;[libx264 @ 0x6aaf500] consecutive B-frames:  2.3%  0.0%  0.0% 97.7%&#xA;[libx264 @ 0x6aaf500] mb I  I16..4: 15.2% 61.2% 23.6%&#xA;[libx264 @ 0x6aaf500] mb P  I16..4:  8.4% 15.6%  1.2%  P16..4: 39.2% 13.7%  6.9%  0.0%  0.0%    skip:15.0%&#xA;[libx264 @ 0x6aaf500] mb B  I16..4:  0.7%  1.8%  0.0%  B16..8: 44.5%  4.5%  0.5%  direct: 3.6%  skip:44.4%  L0:46.9% L1:48.0% BI: 5.1%&#xA;[libx264 @ 0x6aaf500] 8x8 transform intra:63.5% inter:83.1%&#xA;[libx264 @ 0x6aaf500] coded y,uvDC,uvAC intra: 22.1% 25.4% 2.8% inter: 11.6% 19.3% 1.2%&#xA;[libx264 @ 0x6aaf500] i16 v,h,dc,p:  4% 63%  8% 25%&#xA;[libx264 @ 0x6aaf500] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  9% 26% 53%  1%  2%  1%  3%  1%  3%&#xA;[libx264 @ 0x6aaf500] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 44% 16%  4%  4%  3%  5%  4%  4%&#xA;[libx264 @ 0x6aaf500] i8c dc,h,v,p: 66% 24%  9%  1%&#xA;[libx264 @ 0x6aaf500] Weighted P-Frames: Y:0.0% UV:0.0%&#xA;[libx264 @ 0x6aaf500] ref P L0: 57.5% 16.8% 18.2%  7.5%&#xA;[libx264 @ 0x6aaf500] ref B L0: 89.8%  8.0%  2.2%&#xA;[libx264 @ 0x6aaf500] ref B L1: 96.0%  4.0%&#xA;[libx264 @ 0x6aaf500] kb/s:1685.21&#xA;END RequestId: 96e1031a-b1a2-4480-a59d-68de487671bd&#xA;REPORT RequestId: 96e1031a-b1a2-4480-a59d-68de487671bd  Duration: 11721.77 ms   Billed Duration: 11722 ms   Memory Size: 2048 MB    Max Memory Used: 494 MB Init Duration: 353.14 ms&#xA;</argument></command></time></target>

    &#xA;

    I've been struggling with this for a couple days now, any help would be amazing.

    &#xA;

  • Data Privacy Day 2021 : Five ways to embrace privacy into your business

    27 janvier 2021, par Matomo Core Team — Community, Privacy

    Welcome to Data Privacy Day 2021 !

    This year we are excited to announce that we are participating as a #PrivacyAware Champion for DPD21 through the National Cyber Security Alliance. This means that on this significant day we are in partnership with hundreds of other organisations and businesses to share a unified message that empowers individuals to “Own Your Privacy” and for organisations to “Respect Privacy.”

    "Last year dawned a new era in the way many businesses operate from a traditional office work setting to a remote working from home environment for employees. This now means it’s more important than ever for your employees to understand how to take ownership of their privacy when working online."

    Matthieu - Founder of Matomo

    As a Data Privacy Day #PrivacyAware Champion we would like to provide some practical tips and share examples of how the Matomo team helps employees be privacy aware.

    Five ways to embrace privacy into your business

    1. Create a privacy aware culture within your business

    • Get leadership involved.
    • Appoint privacy ambassadors within your team. 
    • Create a privacy awareness campaign where you educate employees on your company privacy policy. 
    • Share messages about privacy around the office/or in meetings online, on internal message boards, in company newsletters, or emails. 
    • Teach new employees their role in your privacy culture and reinforce throughout their career.

    2. Organise privacy awareness training for your employees

    • Invite outside speakers to talk to employees about why privacy matters. 
    • Engage staff by asking them to consider how privacy and data security applies to the work they do on a daily basis.
    • Encourage employees to complete online courses to gain a better understanding of how to avoid privacy risks.

    3. Help employees manage their individual privacy

    • Better security and privacy behaviours at home will translate to better security and privacy practices at work. 
    • Teach employees how to update their privacy and security settings on personal accounts.
    • Use NCSA’s privacy settings page to help them get started

    4. Add privacy to the employee’s toolbox

    • Give your employees actual tools they can use to improve their privacy, such as company-branded camera covers or privacy screens for their devices, or virtual private networks (VPNs) to secure their connections.

    5. Join Matomo and we’ll be your web analytics experts

    • At Matomo, ensuring our users and customers that their privacy is protected is not only a core component of the work we do, it’s why we do what we do ! Find out how.

    Want to find out more about data privacy download your free DPD 2021 Champion Toolkit and read our post on “Why is privacy important”.

    Team Matomo

    2021 Data Privacy Day Toolkit

    Your guide to Data Privacy Day, January 28, 2021
  • Why does my ffmpeg audio sound slower and deeper - sample rate mismatch

    4 septembre 2020, par yogesh zinzu

    ok so this is a discord bot to record voice chat&#xA;https://hatebin.com/hgjlazacri&#xA;Now the bot works perfectly fine but the issue is that the audio sounds a bit deeper and slower than normal.. Why does it happen ? how can I make the audio sound 1:1..

    &#xA;

    &#xD;&#xA;
    &#xD;&#xA;
    const Discord = require(&#x27;discord.js&#x27;);&#xA;const client = new Discord.Client();&#xA;const ffmpegInstaller = require(&#x27;@ffmpeg-installer/ffmpeg&#x27;);&#xA;const ffmpeg = require(&#x27;fluent-ffmpeg&#x27;);&#xA;ffmpeg.setFfmpegPath(ffmpegInstaller.path);&#xA;const fs = require(&#x27;fs-extra&#x27;)&#xA;const mergeStream = require(&#x27;merge-stream&#x27;);&#xA;const config = require(&#x27;./config.json&#x27;);&#xA;const { getAudioDurationInSeconds } = require(&#x27;get-audio-duration&#x27;);&#xA;const cp = require(&#x27;child_process&#x27;);&#xA;const path1 = require(&#x27;path&#x27;);&#xA;const Enmap = require(&#x27;enmap&#x27;);&#xA;const UserRecords = require("./models/userrecords.js")&#xA;const ServerRecords = require("./models/serverrecords.js")&#xA;let prefix = `$`&#xA;class Readable extends require(&#x27;stream&#x27;).Readable { _read() {} }&#xA;let recording = false;&#xA;let currently_recording = {};&#xA;let mp3Paths = [];&#xA;const silence_buffer = new Uint8Array(3840);&#xA;const express = require(&#x27;express&#x27;)&#xA;const app = express()&#xA;const port = 3000&#xA;const publicIP = require(&#x27;public-ip&#x27;)&#xA;const { program } = require(&#x27;commander&#x27;);&#xA;const { path } = require(&#x27;@ffmpeg-installer/ffmpeg&#x27;);&#xA;const version = &#x27;0.0.1&#x27;&#xA;program.version(version);&#xA;let debug = false&#xA;let runProd = false&#xA;let fqdn = "";&#xA;const mongoose = require("mongoose");&#xA;const MongoClient = require(&#x27;mongodb&#x27;).MongoClient;&#xA;mongoose.connect(&#x27;SECRRET&#x27;,{&#xA;  useNewUrlParser: true&#xA;}, function(err){&#xA;  if(err){&#xA;    console.log(err);&#xA;  }else{&#xA;    console.log("Database connection initiated");&#xA;  }&#xA;});&#xA;require("dotenv").config()&#xA;function bufferToStream(buffer) {&#xA;    let stream = new Readable();&#xA;    stream.push(buffer);&#xA;    return stream;&#xA;}&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;client.commands = new Enmap();&#xA;&#xA;client.on(&#x27;ready&#x27;, async () => {&#xA;    console.log(`Logged in as ${client.user.tag}`);&#xA;&#xA;    let host = "localhost"&#xA;&#xA;    &#xA;&#xA;    let ip = await publicIP.v4();&#xA;&#xA;    let protocol = "http";&#xA;    if (!runProd) {&#xA;        host = "localhost"&#xA;    } else {&#xA;        host = `35.226.244.186`;&#xA;    }&#xA;    fqdn = `${protocol}://${host}:${port}`&#xA;    app.listen(port, `0.0.0.0`, () => {&#xA;        console.log(`Listening on port ${port} for ${host} at fqdn ${fqdn}`)&#xA;    })&#xA;});&#xA;let randomArr = []&#xA;let finalArrWithIds = []&#xA;let variable = 0&#xA;client.on(&#x27;message&#x27;, async message => {&#xA;    console.log(`fuck`);&#xA;    if(message.content === `$record`){&#xA;        mp3Paths = []&#xA;        finalArrWithIds = []&#xA;        let membersToScrape = Array.from(message.member.voice.channel.members.values());&#xA;        membersToScrape.forEach((member) => {&#xA;            if(member.id === `749250882830598235`) {&#xA;                console.log(`botid`);&#xA;            }&#xA;            else {&#xA;                finalArrWithIds.push(member.id)&#xA;            }&#xA;            &#xA;        })&#xA;        const randomNumber = Math.floor(Math.random() * 100)&#xA;        randomArr = []&#xA;        randomArr.push(randomNumber)&#xA;    }&#xA;   &#xA;    &#xA;    const generateSilentData = async (silentStream, memberID) => {&#xA;        console.log(`recordingnow`)&#xA;        while(recording) {&#xA;            if (!currently_recording[memberID]) {&#xA;                silentStream.push(silence_buffer);&#xA;            }&#xA;            await new Promise(r => setTimeout(r, 20));&#xA;        }&#xA;        return "done";&#xA;    }&#xA;    console.log(generateSilentData, `status`)&#xA;    function generateOutputFile(channelID, memberID) {&#xA;        const dir = `./recordings/${channelID}/${memberID}`;&#xA;        fs.ensureDirSync(dir);&#xA;        const fileName = `${dir}/${randomArr[0]}.aac`;&#xA;        console.log(`${fileName} ---------------------------`);&#xA;        return fs.createWriteStream(fileName);&#xA;    }&#xA;    &#xA;    if (!fs.existsSync("public")) {&#xA;        fs.mkdirSync("public");&#xA;    }&#xA;    app.use("/public", express.static("./public"));&#xA;  if (!message.guild) return;&#xA;&#xA;  if (message.content === config.prefix &#x2B; config.record_command) {&#xA;    if (recording) {&#xA;        message.reply("bot is already recording");&#xA;        return&#xA;    }&#xA;    if (message.member.voice.channel) {&#xA;        recording = true;&#xA;        const connection = await message.member.voice.channel.join();&#xA;        const dispatcher = connection.play(&#x27;./audio.mp3&#x27;);&#xA;&#xA;        connection.on(&#x27;speaking&#x27;, (user, speaking) => {&#xA;            if (speaking.has(&#x27;SPEAKING&#x27;)) {&#xA;                currently_recording[user.id] = true;&#xA;            } else {&#xA;                currently_recording[user.id] = false;&#xA;            }&#xA;        })&#xA;&#xA;&#xA;        let members = Array.from(message.member.voice.channel.members.values());&#xA;        members.forEach((member) => {&#xA;&#xA;            if (member.id != client.user.id) {&#xA;                let memberStream = connection.receiver.createStream(member, {mode : &#x27;pcm&#x27;, end : &#x27;manual&#x27;})&#xA;&#xA;                let outputFile = generateOutputFile(message.member.voice.channel.id, member.id);&#xA;                console.log(outputFile, `outputfile here`);&#xA;                mp3Paths.push(outputFile.path);&#xA;                    &#xA;&#xA;                silence_stream = bufferToStream(new Uint8Array(0));&#xA;                generateSilentData(silence_stream, member.id).then(data => console.log(data));&#xA;                let combinedStream = mergeStream(silence_stream, memberStream);&#xA;&#xA;                ffmpeg(combinedStream)&#xA;                    .inputFormat(&#x27;s32le&#x27;)&#xA;                    .audioFrequency(44100)&#xA;                    .audioChannels(2)&#xA;                    .on(&#x27;error&#x27;, (error) => {console.log(error)})&#xA;                    .audioCodec(&#x27;aac&#x27;)&#xA;                    .format(&#x27;adts&#x27;) &#xA;                    .pipe(outputFile)&#xA;                    &#xA;            }&#xA;        })&#xA;    } else {&#xA;      message.reply(&#x27;You need to join a voice channel first!&#x27;);&#xA;    }&#xA;  }&#xA;&#xA;  if (message.content === config.prefix &#x2B; config.stop_command) {&#xA;&#xA;    let date = new Date();&#xA;    let dd = String(date.getDate()).padStart(2, &#x27;0&#x27;);&#xA;    let mm = String(date.getMonth() &#x2B; 1).padStart(2, &#x27;0&#x27;); &#xA;    let yyyy = date.getFullYear();&#xA;    date = mm &#x2B; &#x27;/&#x27; &#x2B; dd &#x2B; &#x27;/&#x27; &#x2B; yyyy;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;    let currentVoiceChannel = message.member.voice.channel;&#xA;    if (currentVoiceChannel) {&#xA;        recording = false;&#xA;        await currentVoiceChannel.leave();&#xA;&#xA;        let mergedOutputFolder = &#x27;./recordings/&#x27; &#x2B; message.member.voice.channel.id &#x2B; `/${randomArr[0]}/`;&#xA;        fs.ensureDirSync(mergedOutputFolder);&#xA;        let file_name = `${randomArr[0]}` &#x2B; &#x27;.aac&#x27;;&#xA;        let mergedOutputFile = mergedOutputFolder &#x2B; file_name;&#xA;    &#xA;        &#xA;    let download_path = message.member.voice.channel.id &#x2B; `/${randomArr[0]}/` &#x2B; file_name;&#xA;&#xA;        let mixedOutput = new ffmpeg();&#xA;        console.log(mp3Paths, `mp3pathshere`);&#xA;        mp3Paths.forEach((mp3Path) => {&#xA;             mixedOutput.addInput(mp3Path);&#xA;            &#xA;        })&#xA;        console.log(mp3Paths);&#xA;        //mixedOutput.complexFilter(&#x27;amix=inputs=2:duration=longest&#x27;);&#xA;        mixedOutput.complexFilter(&#x27;amix=inputs=&#x27; &#x2B; mp3Paths.length &#x2B; &#x27;:duration=longest&#x27;);&#xA;        &#xA;        let processEmbed = new Discord.MessageEmbed().setTitle(`Audio Processing.`)&#xA;        processEmbed.addField(`Audio processing starting now..`, `Processing Audio`)&#xA;        processEmbed.setThumbnail(`https://media.discordapp.net/attachments/730811581046325348/748610998985818202/speaker.png`)&#xA;        processEmbed.setColor(` #00FFFF`)&#xA;        const processEmbedMsg = await message.channel.send(processEmbed)&#xA;        async function saveMp3(mixedData, outputMixed) {&#xA;            console.log(`${mixedData} MIXED `)&#xA;            &#xA;            &#xA;            &#xA;            return new Promise((resolve, reject) => {&#xA;                mixedData.on(&#x27;error&#x27;, reject).on(&#x27;progress&#x27;,&#xA;                async (progress) => {&#xA;                    &#xA;                    let processEmbedEdit = new Discord.MessageEmbed().setTitle(`Audio Processing.`)&#xA;                    processEmbedEdit.addField(`Processing: ${progress.targetSize} KB converted`, `Processing Audio`)&#xA;                    processEmbedEdit.setThumbnail(`https://media.discordapp.net/attachments/730811581046325348/748610998985818202/speaker.png`)&#xA;                    processEmbedEdit.setColor(` #00FFFF`)&#xA;                    processEmbedMsg.edit(processEmbedEdit)&#xA;                    console.log(&#x27;Processing: &#x27; &#x2B; progress.targetSize &#x2B; &#x27; KB converted&#x27;);&#xA;                }).on(&#x27;end&#x27;, () => {&#xA;                    console.log(&#x27;Processing finished !&#x27;);&#xA;                    resolve()&#xA;                }).saveToFile(outputMixed);&#xA;                console.log(`${outputMixed} IT IS HERE`);&#xA;            })&#xA;        }&#xA;        // mixedOutput.saveToFile(mergedOutputFile);&#xA;        await saveMp3(mixedOutput, mergedOutputFile);&#xA;        console.log(`${mixedOutput} IN HEREEEEEEE`);&#xA;        // We saved the recording, now copy the recording&#xA;        if (!fs.existsSync(`./public`)) {&#xA;            fs.mkdirSync(`./public`);&#xA;        }&#xA;        let sourceFile = `${__dirname}/recordings/${download_path}`&#xA;        console.log(`DOWNLOAD PATH HERE ${download_path}`)&#xA;        const guildName = message.guild.id;&#xA;        const serveExist = `/public/${guildName}`&#xA;        if (!fs.existsSync(`.${serveExist}`)) {&#xA;            fs.mkdirSync(`.${serveExist}`)&#xA;        }&#xA;        let destionationFile = `${__dirname}${serveExist}/${file_name}`&#xA;&#xA;        let errorThrown = false&#xA;        try {&#xA;            fs.copySync(sourceFile, destionationFile);&#xA;        } catch (err) {&#xA;            errorThrown = true&#xA;            await message.channel.send(`Error: ${err.message}`)&#xA;        }&#xA;        const usersWithTag = finalArrWithIds.map(user => `\n &lt;@${user}>`);&#xA;        let timeSpent = await getAudioDurationInSeconds(`public/${guildName}/${file_name}`)&#xA;        let timesSpentRound = Math.floor(timeSpent)&#xA;        let finalTimeSpent = timesSpentRound / 60&#xA;        let finalTimeForReal = Math.floor(finalTimeSpent)&#xA;        if(!errorThrown){&#xA;            //--------------------- server recording save START&#xA;            class GeneralRecords {&#xA;                constructor(generalLink, date, voice, time) {&#xA;                  this.generalLink = generalLink;&#xA;                  this.date = date;&#xA;                  this.note = `no note`;&#xA;                  this.voice = voice;&#xA;                  this.time = time&#xA;                }&#xA;              }&#xA;              let newGeneralRecordClassObject = new GeneralRecords(`${fqdn}/public/${guildName}/${file_name}`, date, usersWithTag, finalTimeForReal)&#xA;              let checkingServerRecord = await ServerRecords.exists({userid: `server`})&#xA;              if(checkingServerRecord === true){&#xA;                  existingServerRecord = await ServerRecords.findOne({userid: `server`})&#xA;                  existingServerRecord.content.push(newGeneralRecordClassObject)&#xA;                  await existingServerRecord.save()&#xA;              }&#xA;              if(checkingServerRecord === false){&#xA;                let serverRecord = new ServerRecords()&#xA;                serverRecord.userid = `server`&#xA;                serverRecord.content.push(newGeneralRecordClassObject)&#xA;                await serverRecord.save()&#xA;              }&#xA;              //--------------------- server recording save STOP&#xA;        }&#xA;        &#xA;        //--------------------- personal recording section START&#xA;        for( member of finalArrWithIds) {&#xA;&#xA;        let personal_download_path = message.member.voice.channel.id &#x2B; `/${member}/` &#x2B; file_name;&#xA;        let sourceFilePersonal = `${__dirname}/recordings/${personal_download_path}`&#xA;        let destionationFilePersonal = `${__dirname}${serveExist}/${member}/${file_name}`&#xA;        await fs.copySync(sourceFilePersonal, destionationFilePersonal);&#xA;        const user = client.users.cache.get(member);&#xA;        console.log(user, `user here`);&#xA;        try {&#xA;            ffmpeg.setFfmpegPath(ffmpegInstaller.path);&#xA;          &#xA;            ffmpeg(`public/${guildName}/${member}/${file_name}`)&#xA;             .audioFilters(&#x27;silenceremove=stop_periods=-1:stop_duration=1:stop_threshold=-90dB&#x27;)&#xA;             .output(`public/${guildName}/${member}/personal-${file_name}`)&#xA;             .on(`end`, function () {&#xA;               console.log(`DONE`);&#xA;             })&#xA;             .on(`error`, function (error) {&#xA;               console.log(`An error occured` &#x2B; error.message)&#xA;             })&#xA;             .run();&#xA;             &#xA;          }&#xA;          catch (error) {&#xA;          console.log(error)&#xA;          }&#xA;        &#xA;&#xA;        // ----------------- SAVING PERSONAL RECORDING TO DATABASE START&#xA;        class PersonalRecords {&#xA;            constructor(generalLink, personalLink, date, time) {&#xA;              this.generalLink = generalLink;&#xA;              this.personalLink = personalLink;&#xA;              this.date = date;&#xA;              this.note = `no note`;&#xA;              this.time = time;&#xA;            }&#xA;          }&#xA;          let timeSpentPersonal = await getAudioDurationInSeconds(`public/${guildName}/${file_name}`)&#xA;          let timesSpentRoundPersonal = Math.floor(timeSpentPersonal)&#xA;          let finalTimeSpentPersonal = timesSpentRoundPersonal / 60&#xA;          let finalTimeForRealPersonal = Math.floor(finalTimeSpentPersonal)&#xA;          let newPersonalRecordClassObject = new PersonalRecords(`${fqdn}/public/${guildName}/${file_name}`, `${fqdn}/public/${guildName}/${member}/personal-${file_name}`, date, finalTimeForRealPersonal)&#xA;&#xA;           let checkingUserRecord = await UserRecords.exists({userid: member})&#xA;              if(checkingUserRecord === true){&#xA;                  existingUserRecord = await UserRecords.findOne({userid: member})&#xA;                  existingUserRecord.content.push(newPersonalRecordClassObject)&#xA;                  await existingUserRecord.save()&#xA;              }&#xA;              if(checkingUserRecord === false){&#xA;                let newRecord = new UserRecords()&#xA;                newRecord.userid = member&#xA;                newRecord.content.push(newPersonalRecordClassObject)&#xA;                await newRecord.save()&#xA;              }&#xA;&#xA;&#xA;       &#xA;        // ----------------- SAVING PERSONAL RECORDING TO DATABASE END&#xA;       &#xA;&#xA;        const endPersonalEmbed = new Discord.MessageEmbed().setTitle(`Your performance was amazing ! Review it here :D`)&#xA;        endPersonalEmbed.setColor(&#x27;#9400D3&#x27;)&#xA;        endPersonalEmbed.setThumbnail(`https://media.discordapp.net/attachments/730811581046325348/745381641324724294/vinyl.png`)&#xA;        endPersonalEmbed.addField(`1