Recherche avancée

Médias (0)

Mot : - Tags -/images

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

Autres articles (100)

  • 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 (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 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 (...)

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

Sur d’autres sites (11181)

  • Issues with FFMPEG swresample and channel mapping

    19 mars 2024, par Joseph Katrinka

    Ive linked FFMPEG libs to a C++ project Im working on in VS2017 and have had mostly no problems with it so far.
Im currently trying to use it to extract audio from a movie file and save it as a wav file.
I managed to do this just fine, and my next step is to make a "split into mono". To make 2 mono wav files, one from the left channel and one from the right channel of a stereo file.
My code works for the orignal usecase, stereo to stereo (one wav file) and also works for when Im just doing the left, but when doing the right it fails.

    


    Exception thrown at 0x00007FF9603F2D20 (swresample-4.dll) in Matchbox.exe : 0xC0000005 : Access violation reading location 0x0000000000000000.

    


    This is the relevent code involved. It is failing inside the processing loop on line :
int ret = swr_convert_frame(swrCtx, resampledFrame, frame);

    


    /// FFMPEG init
    AVFormatContext* formatCtx = nullptr;
    AVCodecContext* codecCtx = nullptr;
    const AVCodec* codec = nullptr;
    SwrContext* swrCtx = nullptr;
    AVPacket* packet = nullptr;
    AVFrame* frame = nullptr;
    AVFrame* resampledFrame = nullptr;
    int audioStreamIndex = -1;

    int sampleRate;

    uint64_t in_channel_layout = AV_CH_LAYOUT_STEREO; /// we only care about stereo in for now
    uint64_t out_channel_layout = doMono ? AV_CH_LAYOUT_MONO : AV_CH_LAYOUT_STEREO;

    /// some redundancy in this stream setup/checking
    if (avformat_open_input(&formatCtx, movieFilePath.toRawUTF8(), nullptr, nullptr) < 0)
    {
        DBG("failed to open input file");
        return false;
    }
    if (avformat_find_stream_info(formatCtx, nullptr) < 0)
    {
        DBG("failed to find stream info");
        return false;
    }

    for (unsigned i = 0; i < formatCtx->nb_streams; i++) {
        if (formatCtx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO)
        {
            audioStreamIndex = i;
            break;
        }
    }
    if (audioStreamIndex == -1)
    {
        DBG("audio stream not found");
        return false;
    }

    codec = avcodec_find_decoder(formatCtx->streams[audioStreamIndex]->codecpar->codec_id);
    if (!codec)
    {
        DBG("decoder not found for audio stream");
        return false;
    }

    codecCtx = avcodec_alloc_context3(codec);
    if (avcodec_parameters_to_context(codecCtx, formatCtx->streams[audioStreamIndex]->codecpar) < 0)
    {
        DBG("failed to copy codec params to codec context");
        return false;
    }
    if (avcodec_open2(codecCtx, codec, nullptr) < 0)
    {
        DBG("failed to open codec");
        return false;
    }

    if (codecCtx->channels != 2)
    {
        DBG("unsupported channel layout");
        return false;
    }

    if (!codecCtx->channel_layout)
    {
        codecCtx->channel_layout = av_get_default_channel_layout(codecCtx->channels);
    }

    sampleRate = codecCtx->sample_rate; /// using this later for timecode calculation

    packet = av_packet_alloc();
    frame = av_frame_alloc();
    resampledFrame = av_frame_alloc();

    /// the input frame requires this info
    frame->format = codecCtx->sample_fmt;
    frame->channel_layout = codecCtx->channel_layout;
    frame->sample_rate = codecCtx->sample_rate;

    // does the resampled frame really need this?
    resampledFrame->format = AV_SAMPLE_FMT_S16;
    resampledFrame->channel_layout = out_channel_layout;
    resampledFrame->sample_rate = codecCtx->sample_rate;

    if (!packet || !frame || !resampledFrame)
    {
        DBG("failed to allocate packed or frame");
        return false;
    }

    /// Set up swrCtx for channel mapping if we need it
    swrCtx = swr_alloc();
    av_opt_set_int(swrCtx, "in_channel_layout", codecCtx->channel_layout, 0);
    av_opt_set_int(swrCtx, "out_channel_layout", out_channel_layout, 0);
    av_opt_set_int(swrCtx, "in_sample_rate", codecCtx->sample_rate, 0);
    av_opt_set_int(swrCtx, "out_sample_rate", codecCtx->sample_rate, 0);
    av_opt_set_sample_fmt(swrCtx, "in_sample_fmt", codecCtx->sample_fmt, 0);
    av_opt_set_sample_fmt(swrCtx, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0);

    /// channel mapping if we are doing mono
    if (doMono)
    {
        DBG("WE ARE DOING MONO");
        int in_channel_map[2];
        if (useLeft)
        {
            DBG("WE ARE DOING LEFT");
            in_channel_map[0] = AV_CH_FRONT_LEFT;
        }
        else
        {
            DBG("WE ARE DOING RIGHT");
            in_channel_map[0] = AV_CH_FRONT_RIGHT;
        }
        in_channel_map[1] = -1;
        swr_set_channel_mapping(swrCtx, in_channel_map);
    }
    

    if (swr_init(swrCtx) < 0)
    {
        DBG("failed to init resampler");
        return false;
    }

    AVFormatContext* outFormatCtx = nullptr;
    avformat_alloc_output_context2(&outFormatCtx, nullptr, nullptr, wavFilePath.toRawUTF8());
    if (!outFormatCtx)
    {
        DBG("failed to allocate output format context");
        return false;
    }

    AVStream* outStream = avformat_new_stream(outFormatCtx, nullptr);
    if (!outStream)
    {
        DBG("failed to create new stream for output");
        return false;
    }

    AVCodecContext* outCodecCtx = avcodec_alloc_context3(avcodec_find_encoder(AV_CODEC_ID_PCM_S16LE));
    if (!outCodecCtx)
    {
        DBG("failed to allocate output codec context");
        return false;
    }

    outCodecCtx->sample_rate = codecCtx->sample_rate;
    outCodecCtx->channel_layout = out_channel_layout;
    outCodecCtx->channels = doMono ? 1 : 2;
    outCodecCtx->sample_fmt = AV_SAMPLE_FMT_S16;
    outCodecCtx->bit_rate = 192000;
    outCodecCtx->time_base = (AVRational{ 1, outCodecCtx->sample_rate });

    if (avcodec_open2(outCodecCtx, avcodec_find_encoder(AV_CODEC_ID_PCM_S16LE), nullptr) < 0)
    {
        DBG("failed to open output codec");
        return false;
    }

    outStream->time_base = outCodecCtx->time_base;
    if (avcodec_parameters_from_context(outStream->codecpar, outCodecCtx) < 0)
    {
        DBG("failed to copy codec params from context to stream");
        return false;
    }

    if (!(outFormatCtx->oformat->flags & AVFMT_NOFILE))
    {
        if (avio_open(&outFormatCtx->pb, wavFilePath.toRawUTF8(), AVIO_FLAG_WRITE) < 0)
        {
            DBG("failed to open output file");
            return false;
        }
    }

    if (avformat_write_header(outFormatCtx, nullptr) < 0)
    {
        DBG("failed to write header to output file");
        return false;
    }

    int64_t total_samples = 0;

    while (av_read_frame(formatCtx, packet) >= 0)
    {
        if (packet->stream_index == audioStreamIndex)
        {
            if (avcodec_send_packet(codecCtx, packet) < 0)
            {
                DBG("failed secnding packet to decoder");
                av_packet_unref(packet);
                continue;
            }
            while (avcodec_receive_frame(codecCtx, frame) == 0)
            {
                int ret = swr_convert_frame(swrCtx, resampledFrame, frame);
                if (ret < 0)
                {
                    char errBuf[AV_ERROR_MAX_STRING_SIZE];
                    av_strerror(ret, errBuf, sizeof(errBuf));
                    DBG("Error resampling frame: " + std::string(errBuf));
                    continue;
                }

                resampledFrame->pts = av_rescale_q(total_samples, (AVRational{ 1, outCodecCtx->sample_rate }), outCodecCtx->time_base);
                total_samples += resampledFrame->nb_samples;

                AVPacket outPacket;
                av_init_packet(&outPacket);
                if (avcodec_send_frame(outCodecCtx, resampledFrame) < 0)
                {
                    DBG("error sending frame to decoder");
                    continue;
                }
                while (avcodec_receive_packet(outCodecCtx, &outPacket) == 0)
                {
                    outPacket.stream_index = outStream->index;
                    if (av_interleaved_write_frame(outFormatCtx, &outPacket) < 0)
                    {
                        av_packet_unref(&outPacket);
                        DBG("error writing packet to output file");
                        return false;
                    }
                    av_packet_unref(&outPacket);
                }
            }
        }
        av_packet_unref(packet);
    }

    /// trailer and cleanup
    av_write_trailer(outFormatCtx);

    avcodec_close(outCodecCtx);
    avcodec_close(codecCtx);
    avformat_close_input(&formatCtx);
    av_packet_free(&packet);
    av_frame_free(&frame);
    av_frame_free(&resampledFrame);
    swr_free(&swrCtx);
    if (!(outFormatCtx->oformat->flags & AVFMT_NOFILE)) avio_closep(&outFormatCtx->pb);
    avformat_free_context(outFormatCtx);


    


    Ive tried some debugging to see if the the values of either of the frames were unexpected or to see if the SwrContext might be unsual but did not manage anything. The thing I dont understand is the distinction that would cause this to fail for the right but not for when Im just doing the left.

    


  • ffmpeg : UDP to RTMP stream - issues with PES/out of range/corrupted macroblock

    15 août 2019, par MZL

    I´m trying to convert a UDP multicast transportstream video to a RTMP video stream with ffmpeg.

    The stream is generated with a Teracue ENC-300 hardware encoder. The encoder sends the stream as TS/UDP packets to the multicast IP 239.252.20.100:4444.
    ffmpeg can convert the stream, but only at a really low bitrate and/or with a lot of errors.

    My ffmpeg command looks as follows :

    ffmpeg -re -i udp://@239.252.20.100:4444?buffer_size=32000k
    -b:v 900k -maxrate 1000k -bufsize 32000k -f flv
    "rtmp://127.0.0.1/live/live1" -loglevel debug

    I´ve already tried some easyer code :

    ffmpeg -re -i udp://@239.252.20.100:4444 -f flv
    "rtmp://127.0.0.1/live/live1" -loglevel debug

    The Teracue generates the stream with a bitrate of 1500kbps. I also tried some higher or lower bitrates. But the output of ffmpeg has only a maximum bitrate of about 400kbps. If I increase the bitrate with

    -b:v 900k

    or sometimes, when no output bitrate is set, I get a lot of error messages, especially

    PES packet size mismatch
    error while decoding MB X X
    corrupted macroblock X X

    Here is the error code :

    >[h264 @ 000002883adfe800] nal_unit_type: 6(SEI), nal_ref_idc: 0

    >[h264 @ 000002883adfe800] nal_unit_type: 1(Coded slice of a non-IDR picture), >nal_ref_idc: 3

    >[h264 @ 000002883adfe800] ct_type:1 pic_struct:0

    >[mpegts @ 000002883a329340] Continuity check failed for pid 192 expected 4 >got 7

    >[mpegts @ 000002883a329340] pid=c0 pes_code=0x1c0

    >    Last message repeated 1 times

    >[mpegts @ 000002883a329340] pid=2c pes_code=0x1e0

    >[NULL @ 000002883a33f7c0] ct_type:1 pic_struct:0

    >udp://@239.252.20.100:4444?buffer_size=32000k: corrupt decoded frame in

    >stream 1

    >[h264 @ 000002883a35a240] nal_unit_type: 9(AUD), nal_ref_idc: 0

    >[h264 @ 000002883a35a240] nal_unit_type: 6(SEI), nal_ref_idc: 0

    >[h264 @ 000002883a35a240] nal_unit_type: 1(Coded slice of a non-IDR picture),

    >nal_ref_idc: 3

    >[h264 @ 000002883a35a240] ct_type:1 pic_struct:0

    >[h264 @ 000002883a35a240] out of range intra chroma pred mode

    >[h264 @ 000002883a35a240] error while decoding MB 14 8

    >[mpegts @ 000002883a329340] Continuity check failed for pid 44 expected 2 got
    >9

    >[mpegts @ 000002883a329340] PES packet size mismatch

    >[mpegts @ 000002883a329340] pid=2c pes_code=0x1e0

    >[NULL @ 000002883a33f7c0] ct_type:1 pic_struct:0

    >[h264 @ 000002883a35a240] concealing 845 DC, 845 AC, 845 MV errors in P frame

    >[h264 @ 000002883a38f6c0] nal_unit_type: 9(AUD), nal_ref_idc: 0

    >[h264 @ 000002883a38f6c0] nal_unit_type: 6(SEI), nal_ref_idc: 0

    >[h264 @ 000002883a38f6c0] nal_unit_type: 1(Coded slice of a non-IDR picture), >nal_ref_idc: 3

    >[h264 @ 000002883a38f6c0] ct_type:1 pic_struct:0

    >[h264 @ 000002883a38f6c0] Frame num gap 28 26

    >[mpegts @ 000002883a329340] Continuity check failed for pid 192 expected 9 >got 12

    >[mpegts @ 000002883a329340] pid=c0 pes_code=0x1c0

    >[mpegts @ 000002883a329340] Continuity check failed for pid 44 expected 1 got >15

    >[mpegts @ 000002883a329340] PES packet size mismatch

    >[mpegts @ 000002883a329340] pid=2c pes_code=0x1e0

    >[NULL @ 000002883a33f7c0] ct_type:1 pic_struct:0

    >udp://@239.252.20.100:4444?buffer_size=32000k: corrupt decoded frame in
    >stream 1

    >[h264 @ 000002883adf1980] nal_unit_type: 9(AUD), nal_ref_idc: 0

    >[h264 @ 000002883adf1980] nal_unit_type: 6(SEI), nal_ref_idc: 0

    >[h264 @ 000002883adf1980] nal_unit_type: 1(Coded slice of a non-IDR picture),

    >nal_ref_idc: 3

    >[h264 @ 000002883adf1980] ct_type:1 pic_struct:0

    >[h264 @ 000002883adf1980] mb_type 41 in P slice too large at 18 9

    >[h264 @ 000002883adf1980] error while decoding MB 18 9

    >[h264 @ 000002883adf1980] concealing 796 DC, 796 AC, 796 MV errors in P frame

    >[mpegts @ 000002883a329340] pid=c0 pes_code=0x1c0

    >[NULL @ 000002883a33f7c0] ct_type:1 pic_struct:0

    >[h264 @ 000002883adf20c0] nal_unit_type: 9(AUD), nal_ref_idc: 0

    >[h264 @ 000002883adf20c0] nal_unit_type: 7(SPS), nal_ref_idc: 3

    >[h264 @ 000002883adf20c0] nal_unit_type: 8(PPS), nal_ref_idc: 3

    >[h264 @ 000002883adf20c0] nal_unit_type: 6(SEI), nal_ref_idc: 0

    >[h264 @ 000002883adf20c0] nal_unit_type: 5(IDR), nal_ref_idc: 3

    >[h264 @ 000002883adf20c0] ct_type:1 pic_struct:0

    >[h264 @ 000002883adf20c0] corrupted macroblock 3 0 (total_coeff=-1)

    >114.0kbits/s speed=   1x

    >[h264 @ 000002883adf20c0] error while decoding MB 3 0

    >[mpegts @ 000002883a329340] pid=c0 pes_code=0x1c0

    Any solutions ?

  • File (mp3) concatenation issues using FFmpeg

    17 novembre 2020, par Giorgio Robino

    I want to concatenate some MP3 files using the FFmpeg concatenation protocol.

    


    Here is a successful try :

    


    $ ffmpeg -loglevel panic -i "concat:audio/it/ci.mp3|audio/it/èsse.mp3|audio/it/cu.mp3|audio/it/u.mp3|audio/it/tre.mp3|audio/it/zero.mp3|audio/it/cinque.mp3|audio/it/quattro.mp3|audio/it/tre.mp3|audio/it/otto.mp3|audio/it/tre.mp3" -c copy audio/it/CSQU3054383.mp3 -y

$ ll audio/it/CSQU3054383.mp3
-rw-rw-r-- 1 giorgio 26K Nov  9 16:16 audio/it/CSQU3054383.mp3


    


    So far, all is OK !

    


    BTW, all (Mp3) files have the same codecs, so MP3 FFmpeg concatenation protocol runs as expected !

    



    


    Now, I want to insert a pause file audio/it/PAUSE_2.mp3, between each previous files :

    


    $ ffmpeg -loglevel panic -i "concat:audio/it/ci.mp3|audio/it/PAUSE_2.mp3|audio/it/èsse.mp3|audio/it/PAUSE_2.mp3|audio/it/cu.mp3|audio/it/PAUSE_2.mp3|audio/it/u.mp3|audio/it/PAUSE_2.mp3|audio/it/tre.mp3|audio/it/PAUSE_2.mp3|audio/it/zero.mp3|audio/it/PAUSE_2.mp3|audio/it/cinque.mp3|audio/it/PAUSE_2.mp3|audio/it/quattro.mp3|audio/it/PAUSE_2.mp3|audio/it/tre.mp3|audio/it/PAUSE_2.mp3|audio/it/otto.mp3|audio/it/PAUSE_2.mp3|audio/it/tre.mp3" -c copy audio/it/CSQU3054383.mp3 -y
$


    


    This command run apparently without any error, but the output file (audio/it/CSQU3054383.mp3) is not generated at all.

    


    **Question 1 (minor) :

    


    Why doesn't FFmpeg report any error and doesn't generate the expected output ?**

    


    In fact, I already experienced that FFmpeg, in some circumstances, fails without saying why :(

    



    


    I suspect the problem happens because the file audio/it/PAUSE_2.mp3 doesn't have a constant bit rate (CBR), as other files, e.g. :

    


    $ mediainfo  audio/it/ci.mp3
General
Complete name                            : audio/it/ci.mp3
Format                                   : MPEG Audio
File size                                : 2.06 KiB
Duration                                 : 528 ms
Overall bit rate mode                    : Constant
Overall bit rate                         : 32.0 kb/s

Audio
Format                                   : MPEG Audio
Format version                           : Version 2
Format profile                           : Layer 3
Duration                                 : 528 ms
Bit rate mode                            : Constant
Bit rate                                 : 32.0 kb/s
Channel(s)                               : 1 channel
Sampling rate                            : 24.0 kHz
Frame rate                               : 41.667 FPS (576 SPF)
Compression mode                         : Lossy
Stream size                              : 2.06 KiB (100%)

$ ffprobe audio/it/ci.mp3
ffprobe version 3.4.8-0ubuntu0.2 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
[mp3 @ 0x564491288080] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from 'audio/it/ci.mp3':
  Duration: 00:00:00.53, start: 0.000000, bitrate: 32 kb/s
    Stream #0:0: Audio: mp3, 24000 Hz, mono, s16p, 32 kb/s



    


    Instead, the inserted pause file has a variable bit rate, as mediainfo states :

    


    $ mediainfo audio/it/PAUSE_2.mp3
General
Complete name                            : audio/it/PAUSE_2.mp3
Format                                   : MPEG Audio
File size                                : 8.29 KiB
Overall bit rate mode                    : Variable
Writing library                          : LAME3.100

Audio
Format                                   : MPEG Audio
Format version                           : Version 2
Format profile                           : Layer 3
Bit rate mode                            : Variable
Channel(s)                               : 1 channel
Sampling rate                            : 24.0 kHz
Compression mode                         : Lossy
Stream size                              : 8.06 KiB (97%)
Writing library                          : LAME3.100


    


    Here my Bash script I used to generate the pause :

    


    $ cat com/pause&#xA;#!/bin/bash&#xA;&#xA;# https://ffmpeg.org/ffmpeg-filters.html#toc-anullsrc&#xA;# https://ffmpeg.org/ffmpeg-utils.html#toc-Examples-1&#xA;&#xA;if [ $# -eq 0 ]&#xA;  then&#xA;    echo&#xA;    echo "create a pause, a silence audio file (MP3) of specified number of milliseconds"&#xA;    echo&#xA;    echo "usage: $0 <time duration="duration"> <directory path="path">"&#xA;    echo&#xA;    echo "example: $0 2"&#xA;    echo "example: $0 0.5 tmp/"&#xA;    echo&#xA;    exit&#xA;fi&#xA;&#xA;timeDuration=$1&#xA;directoryPath=$2&#xA;&#xA;suffix=mp3&#xA;&#xA;# https://trac.ffmpeg.org/wiki/Limiting%20the%20output%20bitrate&#xA;#https://trac.ffmpeg.org/wiki/Encode/MP3&#xA;bitrate=32k&#xA;samplingRate=24000&#xA;outputFile="${directoryPath}PAUSE_${timeDuration}.${suffix}"&#xA;&#xA;  #-b:a $bitrate -minrate $bitrate -maxrate $bitrate -bufsize $bitrate \&#xA;ffmpeg \&#xA;  -f lavfi \&#xA;  -i anullsrc=r=$samplingRate:cl=mono \&#xA;  -t $timeDuration \&#xA;  -b:a $bitrate -minrate $bitrate -maxrate $bitrate \&#xA;  -codec:a libmp3lame \&#xA;  $outputFile -y&#xA;&#xA;echo&#xA;echo "created file: $outputFile"&#xA;echo&#xA;&#xA;</directory></time>

    &#xA;

    Unfortunately, the created file seems with a variable bit rate and not with a constant bit rate (CBR), as expected ( -b:a ... ) :

    &#xA;

    $ com/pause 2&#xA;ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)&#xA;  configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared&#xA;  libavutil      55. 78.100 / 55. 78.100&#xA;  libavcodec     57.107.100 / 57.107.100&#xA;  libavformat    57. 83.100 / 57. 83.100&#xA;  libavdevice    57. 10.100 / 57. 10.100&#xA;  libavfilter     6.107.100 /  6.107.100&#xA;  libavresample   3.  7.  0 /  3.  7.  0&#xA;  libswscale      4.  8.100 /  4.  8.100&#xA;  libswresample   2.  9.100 /  2.  9.100&#xA;  libpostproc    54.  7.100 / 54.  7.100&#xA;Input #0, lavfi, from &#x27;anullsrc=r=24000:cl=mono&#x27;:&#xA;  Duration: N/A, start: 0.000000, bitrate: 192 kb/s&#xA;    Stream #0:0: Audio: pcm_u8, 24000 Hz, mono, u8, 192 kb/s&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (pcm_u8 (native) -> mp3 (libmp3lame))&#xA;Press [q] to stop, [?] for help&#xA;Output #0, mp3, to &#x27;PAUSE_2.mp3&#x27;:&#xA;  Metadata:&#xA;    TSSE            : Lavf57.83.100&#xA;    Stream #0:0: Audio: mp3 (libmp3lame), 24000 Hz, mono, s16p, 32 kb/s&#xA;    Metadata:&#xA;      encoder         : Lavc57.107.100 libmp3lame&#xA;size=       8kB time=00:00:02.01 bitrate=  33.7kbits/s speed= 192x&#xA;video:0kB audio:8kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.870640%&#xA;&#xA;created file: PAUSE_2.mp3&#xA;

    &#xA;

    Question 2 :

    &#xA;

    What's wrong in my Bash script (why doesn't it generate a CBR file ?&#xA;How can I generate an silence pause file (silence of N milliseconds) with the exact settings of previous files ?

    &#xA;