Recherche avancée

Médias (91)

Autres articles (104)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (11473)

  • Writing only video (no audio) file using ffmpeg. av_write_header fails

    19 janvier 2018, par Kamal

    I have RTP packets with VP8 encoded data. I want to write it to a mkv file or webm file. I tried a bit, but I have not been successful yet. My code is as below

    #include
    #include
    #include
    #include
    #include

    #include <libavutil></libavutil>avassert.h>
    #include <libavutil></libavutil>channel_layout.h>
    #include <libavutil></libavutil>opt.h>
    #include <libavutil></libavutil>mathematics.h>
    #include <libavutil></libavutil>timestamp.h>
    #include <libavformat></libavformat>avformat.h>
    #include <libswscale></libswscale>swscale.h>
    #include <libswresample></libswresample>swresample.h>

    bool mfmedia_init_ffmpeg();
    void mfmedia_ffprint(void *handle, int cnt, const char *format, va_list valist);

    int main()
    {
       mfmedia_init_ffmpeg();
       return 0;
    }

    bool mfmedia_init_ffmpeg()
    {
       bool ret = false;

       AVCodecContext* context;
       AVCodec* codec;
       AVFormatContext* format;
       AVStream* stream;

       unsigned fps = 24;
       unsigned width = 768;
       unsigned height = 608;

       av_register_all();

       int err = 0;
       char errorLog[128] = { 0 };

       av_log_set_level(AV_LOG_TRACE);
       av_log_set_callback(mfmedia_ffprint);

       err = avformat_alloc_output_context2(&amp;format, NULL, NULL, "o.webm");
       if (err &lt; 0)
       {
           printf("Cannot allocate output context: %s\n", av_make_error_string(errorLog, 128, err));
           goto last;
       }

       codec = avcodec_find_encoder(AV_CODEC_ID_VP8);
       if (!codec)
       {
           printf("Cannot find an encoder\n");
           goto last;
       }

       context = avcodec_alloc_context3(codec);
       if (!context)
       {
           printf("Cannot allocate a codec context\n");
           goto last;
       }

       context->pix_fmt = AV_PIX_FMT_YUV420P;
       context->width = width;
       context->height = height;
       context->time_base = (AVRational){1, fps};

       err = avcodec_open2(context, codec, NULL);
       if(err &lt; 0)
       {
           printf("Cannot open codec: %s\n", av_make_error_string(errorLog, 128, err));
           goto last;
       }

       stream = avformat_new_stream(format, codec);
       if (!stream)
       {
           printf("Cannot create a new stream\n");
           goto last;
       }

       //av_dump_format(format, 0, "o.webm", 1);

       err = avio_open(&amp;format->pb, "o.webm", AVIO_FLAG_WRITE);
       if(err &lt; 0)
       {
           printf("Cannot open output: %s\n", av_make_error_string(errorLog, 128, err));
           goto last;
       }

       err = avformat_write_header(format, NULL);
       if(err &lt; 0)
       {
           printf("Cannot write header to stream: %s\n", av_make_error_string(errorLog, 128, err));
           goto last;
       }
       ret = true;

    last:
       return ret;
    }

    void mfmedia_ffprint(void *handle, int cnt, const char *format, va_list valist)
    {
       char *log_buf = (char *)malloc(38192);
       int length;

       if(log_buf)
       {
           time_t rawtime;
           time ( &amp;rawtime );

           length = vsprintf(log_buf ,format, valist);
           length += sprintf((log_buf + length), " : %s ", ctime (&amp;rawtime));
           *(log_buf + length) = 0x0;

           printf("%s", log_buf);
           fflush(stdout);
           free(log_buf);
       }
    }

    It is failing when I call avformat_write_header.

    From trace log (towards end) I see

    Setting default whitelist ’file,crypto’
     : Fri Jan 19 16:58:57 2018
    Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
     : Fri Jan 19 16:58:57 2018
    dimensions not set
     : Fri Jan 19 16:58:57 2018
    Cannot write header to stream : Invalid argument

    Please let me know why avformat_write_header is failing.

  • Unplayable video after running FFmpeg command

    25 mai 2020, par HB.

    I asked this question last year. I resolved the issue I had and I implemented the same logic for merging an image with a video, instead of two images. This is running on Android.

    &#xA;&#xA;

    Here is the command I'm using currently :

    &#xA;&#xA;

    "-i", mFilePath, "-i", drawingPath, "-filter_complex", "[0:v]scale=iw*sar:ih,setsar=1,pad=&#x27;max(iw\\,2*trunc(ih*47/80/2))&#x27;:&#x27;max(ih\\,2*trunc(ow*80/47/2))&#x27;:(ow-iw)/2:(oh-ih)/2[v0];[1:v][v0]scale2ref[v1][v0];[v0][v1]overlay=x=(W-w)/2:y=(H-h)/2[v]", "-map", "[v]", "-map", "0:a", "-c:v", "libx264", "-preset", "ultrafast", "-r", outputFPS, outputPath}&#xA;

    &#xA;&#xA;

    47/80/2 is calculated by getting a device's screen dimensions - 1128 x 1920.

    &#xA;&#xA;

    When running this on certain devices, it results in an unplayable video.

    &#xA;&#xA;

    But running the following command works perfectly fine :

    &#xA;&#xA;

    "-i", mFilePath, "-crf", "18", "-c:v", "libx264", "-preset", "ultrafast", outputPath};&#xA;

    &#xA;&#xA;

    I think the issue is with the filter being applied ?

    &#xA;&#xA;


    &#xA;&#xA;

    I compared running the first command on two different devices.

    &#xA;&#xA;

      &#xA;
    • On the first device (Samsung J7 Pro), I was able to run the command successfully and play the video afterward. I tested the output on both devices and it is working.
    • &#xA;

    • On the second device (Sony Xperia Tablet Z), I was able to run the command successfully but could not play the video. I tested the output on both devices and it doesn't play on either. It does play on my computer.
    • &#xA;

    &#xA;&#xA;

    I compared the original video with the one not working and the one without a filter and the only difference I could find is that the one that is not working profile is Baseline@L4.2 and the one without a filter profile is Baseline@L4.0. The original video profile is High@L4.0.

    &#xA;&#xA;

    Here are all the videos. The original, the one without a filter (working) and the one with the filter(no working).

    &#xA;&#xA;

    I have no idea why this is happening ? Any help would be appreciated.

    &#xA;&#xA;


    &#xA;&#xA;

    Edit 1 :

    &#xA;&#xA;

    Here is the actual log as requested :

    &#xA;&#xA;

    "-i", "/storage/emulated/0/Android/data/com.my.package/files/CameraTemp/2020_05_24_09_17_53.mp4", "-i", "/storage/emulated/0/Android/data/com.my.package/files/MyVideos/tempShapes.png", "-filter_complex", "[0:v]scale=iw*sar:ih,setsar=1,pad=&#x27;max(iw\\,2*trunc(ih*47/80/2))&#x27;:&#x27;max(ih\\,2*trunc(ow*80/47/2))&#x27;:(ow-iw)/2:(oh-ih)/2[v0];[1:v][v0]scale2ref[v1][v0];[v0][v1]overlay=x=(W-w)/2:y=(H-h)/2[v]", "-map", "[v]", "-map", "0:a", "-c:v", "libx264", "-preset", "ultrafast", "-r", "30", "/storage/emulated/0/Android/data/com.my.package/files/MyVideos/video with line.mp4"&#xA;

    &#xA;&#xA;

    and here is the complete log :

    &#xA;&#xA;

    ffmpeg version n4.0-39-gda39990 Copyright (c) 2000-2018 the FFmpeg developers&#xA;  built with gcc 4.9.x (GCC) 20150123 (prerelease)&#xA;  configuration: --target-os=linux --cross-prefix=/root/bravobit/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/root/bravobit/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-ffprobe --enable-libopus --enable-libvorbis --enable-libfdk-aac --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-libvpx --enable-libass --enable-yasm --enable-pthreads --disable-debug --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-linux-perf --disable-doc --disable-shared --enable-static --enable-runtime-cpudetect --enable-nonfree --enable-network --enable-avresample --enable-avformat --enable-avcodec --enable-indev=lavfi --enable-hwaccels --enable-ffmpeg --enable-zlib --enable-gpl --enable-small --enable-nonfree --pkg-config=pkg-config --pkg-config-flags=--static --prefix=/root/bravobit/ffmpeg-android/build/armeabi-v7a --extra-cflags=&#x27;-I/root/bravobit/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all&#x27; --extra-ldflags=&#x27;-L/root/bravobit/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie&#x27; --extra-cxxflags=&#xA;  libavutil      56. 14.100 / 56. 14.100&#xA;  libavcodec     58. 18.100 / 58. 18.100&#xA;  libavformat    58. 12.100 / 58. 12.100&#xA;  libavdevice    58.  3.100 / 58.  3.100&#xA;  libavfilter     7. 16.100 /  7. 16.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  1.100 /  5.  1.100&#xA;  libswresample   3.  1.100 /  3.  1.100&#xA;  libpostproc    55.  1.100 / 55.  1.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;/storage/emulated/0/Android/data/com.my.package/files/CameraTemp/2020_05_24_09_17_53.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : mp42&#xA;    minor_version   : 0&#xA;    compatible_brands: isommp42&#xA;    creation_time   : 2020-05-24T08:18:02.000000Z&#xA;  Duration: 00:00:01.64, start: 0.000000, bitrate: 20750 kb/s&#xA;    Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuv420p, 1920x1080, 18056 kb/s, SAR 1:1 DAR 16:9, 29.70 fps, 29.67 tbr, 90k tbn, 180k tbc (default)&#xA;    Metadata:&#xA;      creation_time   : 2020-05-24T08:18:02.000000Z&#xA;      handler_name    : VideoHandle&#xA;    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 155 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2020-05-24T08:18:02.000000Z&#xA;      handler_name    : SoundHandle&#xA;Input #1, png_pipe, from &#x27;/storage/emulated/0/Android/data/com.my.package/files/MyVideos/tempShapes.png&#x27;:&#xA;  Duration: N/A, bitrate: N/A&#xA;    Stream #1:0: Video: png, rgba(pc), 1920x1128, 25 tbr, 25 tbn, 25 tbc&#xA;Stream mapping:&#xA;  Stream #0:0 (h264) -> scale (graph 0)&#xA;  Stream #1:0 (png) -> scale2ref:default (graph 0)&#xA;  overlay (graph 0) -> Stream #0:0 (libx264)&#xA;  Stream #0:1 -> #0:1 (aac (native) -> aac (native))&#xA;Press [q] to stop, [?] for help&#xA;frame=    0 fps=0.0 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    &#xA;frame=    0 fps=0.0 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    &#xA;[libx264 @ 0xb83fc8a0] using SAR=1/1&#xA;[libx264 @ 0xb83fc8a0] using cpu capabilities: ARMv6 NEON&#xA;[libx264 @ 0xb83fc8a0] profile Constrained Baseline, level 4.2&#xA;[libx264 @ 0xb83fc8a0] 264 - core 152 r2851M ba24899 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=2 keyint_min=1 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0&#xA;Output #0, mp4, to &#x27;/storage/emulated/0/Android/data/com.my.package/files/MyVideos/video with line.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : mp42&#xA;    minor_version   : 0&#xA;    compatible_brands: isommp42&#xA;    encoder         : Lavf58.12.100&#xA;    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1920x1128 [SAR 1:1 DAR 80:47], q=-1--1, 29 fps, 14848 tbn, 29 tbc (default)&#xA;    Metadata:&#xA;      encoder         : Lavc58.18.100 libx264&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1&#xA;    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2020-05-24T08:18:02.000000Z&#xA;      handler_name    : SoundHandle&#xA;      encoder         : Lavc58.18.100 aac&#xA;frame=    1 fps=0.4 q=0.0 size=       0kB time=00:00:01.01 bitrate=   0.4kbits/s speed=0.397x    &#xA;frame=    5 fps=1.6 q=0.0 size=       0kB time=00:00:01.01 bitrate=   0.4kbits/s speed=0.33x    &#xA;frame=    9 fps=2.5 q=24.0 size=     256kB time=00:00:01.01 bitrate=2075.0kbits/s speed=0.28x    &#xA;frame=   13 fps=3.1 q=25.0 size=    1024kB time=00:00:01.01 bitrate=8298.9kbits/s speed=0.243x    &#xA;frame=   18 fps=3.8 q=29.0 size=    2048kB time=00:00:01.01 bitrate=16597.5kbits/s speed=0.214x    &#xA;frame=   21 fps=3.9 q=25.0 size=    2560kB time=00:00:01.01 bitrate=20746.7kbits/s speed=0.19x    &#xA;frame=   23 fps=3.9 q=25.0 size=    2816kB time=00:00:01.01 bitrate=22821.4kbits/s speed=0.173x    &#xA;frame=   26 fps=4.0 q=29.0 size=    3584kB time=00:00:01.01 bitrate=29045.3kbits/s speed=0.156x    &#xA;Past duration 0.617577 too large&#xA;Past duration 0.639641 too large&#xA;frame=   28 fps=3.9 q=29.0 size=    3840kB time=00:00:01.01 bitrate=31119.9kbits/s speed=0.142x    &#xA;Past duration 0.665230 too large&#xA;frame=   29 fps=3.8 q=25.0 size=    3840kB time=00:00:01.01 bitrate=31119.9kbits/s speed=0.132x    &#xA;Past duration 0.690834 too large&#xA;Past duration 0.711281 too large&#xA;Past duration 0.736885 too large&#xA;frame=   32 fps=3.9 q=29.0 size=    4608kB time=00:00:01.01 bitrate=37343.8kbits/s speed=0.123x    &#xA;Past duration 0.762474 too large&#xA;Past duration 0.783577 too large&#xA;Past duration 0.807564 too large&#xA;frame=   35 fps=3.9 q=25.0 size=    4864kB time=00:00:01.01 bitrate=39418.4kbits/s speed=0.112x    &#xA;Past duration 0.831551 too large&#xA;Past duration 0.855537 too large&#xA;frame=   37 fps=3.5 q=25.0 size=    5376kB time=00:00:01.01 bitrate=43567.7kbits/s speed=0.0968x    &#xA;Past duration 0.879524 too large&#xA;Past duration 0.903511 too large&#xA;frame=   39 fps=3.4 q=25.0 size=    5376kB time=00:00:01.06 bitrate=41196.6kbits/s speed=0.0927x    &#xA;Past duration 0.927498 too large&#xA;Past duration 0.951500 too large&#xA;frame=   41 fps=3.4 q=25.0 size=    5376kB time=00:00:01.13 bitrate=38700.0kbits/s speed=0.0931x    &#xA;frame=   41 fps=3.2 q=25.0 size=    5376kB time=00:00:01.13 bitrate=38700.0kbits/s speed=0.0886x    &#xA;frame=   41 fps=3.1 q=25.0 size=    5888kB time=00:00:01.43 bitrate=33554.2kbits/s speed=0.108x    &#xA;Past duration 0.975487 too large&#xA;frame=   45 fps=3.2 q=26.0 size=    6656kB time=00:00:01.60 bitrate=33905.4kbits/s speed=0.114x    &#xA;frame=   45 fps=3.0 q=-1.0 Lsize=    8158kB time=00:00:01.65 bitrate=40480.7kbits/s speed=0.11x    &#xA;video:8127kB audio:28kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.032895%&#xA;[libx264 @ 0xb83fc8a0] frame I:23    Avg QP:24.70  size:337646&#xA;[libx264 @ 0xb83fc8a0] frame P:22    Avg QP:29.00  size: 25250&#xA;[libx264 @ 0xb83fc8a0] mb I  I16..4: 100.0%  0.0%  0.0%&#xA;[libx264 @ 0xb83fc8a0] mb P  I16..4:  0.4%  0.0%  0.0%  P16..4: 43.6%  0.0%  0.0%  0.0%  0.0%    skip:56.0%&#xA;[libx264 @ 0xb83fc8a0] coded y,uvDC,uvAC intra: 90.0% 84.7% 58.1% inter: 20.1% 6.2% 0.1%&#xA;[libx264 @ 0xb83fc8a0] i16 v,h,dc,p: 25% 28% 28% 20%&#xA;[libx264 @ 0xb83fc8a0] i8c dc,h,v,p: 39% 25% 20% 16%&#xA;[libx264 @ 0xb83fc8a0] kb/s:42901.20&#xA;[aac @ 0xb83d7d10] Qavg: 3517.779&#xA;

    &#xA;

  • Problem using FFmpeg to convert MKV with A/52 B audio (aka E-AC3) to AAC

    5 juillet 2020, par nxl4

    I've got a number of MKV files which are (per VLC) encoded with A/52 B (aka E-AC3) audio codecs. I would like to convert these to AAC, but I'm having trouble doing this with FFmpeg. The command I'm running is :

    &#xA;&#xA;

    ffmpeg -hwaccel auto -i original_file.mkv -y -c:v copy -c:a aac output_file.mkv&#xA;

    &#xA;&#xA;

    The command completes without error. However, the generated file has no audio when I play it. FFmpeg's output is as follows :

    &#xA;&#xA;

    ffmpeg version 4.2.2-1ubuntu1 Copyright (c) 2000-2019 the FFmpeg developers&#xA;  built with gcc 9 (Ubuntu 9.3.0-3ubuntu1)&#xA;  configuration: --prefix=/usr --extra-version=1ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared&#xA;  libavutil      56. 31.100 / 56. 31.100&#xA;  libavcodec     58. 54.100 / 58. 54.100&#xA;  libavformat    58. 29.100 / 58. 29.100&#xA;  libavdevice    58.  8.100 / 58.  8.100&#xA;  libavfilter     7. 57.100 /  7. 57.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  5.100 /  5.  5.100&#xA;  libswresample   3.  5.100 /  3.  5.100&#xA;  libpostproc    55.  5.100 / 55.  5.100&#xA;Guessed Channel Layout for Input Stream #0.1 : 5.1&#xA;Input #0, matroska,webm, from &#x27;input_file.mkv&#x27;:&#xA;  Metadata:&#xA;    encoder         : libebml v1.3.5 &#x2B; libmatroska v1.4.8&#xA;    creation_time   : 2018-05-10T10:21:30.000000Z&#xA;  Duration: 00:42:08.15, start: 0.000000, bitrate: 3201 kb/s&#xA;    Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)&#xA;    Metadata:&#xA;      BPS-eng         : 2559028&#xA;      DURATION-eng    : 00:42:08.151000000&#xA;      NUMBER_OF_FRAMES-eng: 60615&#xA;      NUMBER_OF_BYTES-eng: 808701337&#xA;      _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 (&#x27;Tardigrades Will Inherit The Earth&#x27;) 64-bit&#xA;      _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-10 10:21:30&#xA;      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES&#xA;    Stream #0:1(eng): Audio: eac3, 48000 Hz, 5.1, fltp (default)&#xA;    Metadata:&#xA;      BPS-eng         : 640000&#xA;      DURATION-eng    : 00:42:08.096000000&#xA;      NUMBER_OF_FRAMES-eng: 79003&#xA;      NUMBER_OF_BYTES-eng: 202247680&#xA;      _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 (&#x27;Tardigrades Will Inherit The Earth&#x27;) 64-bit&#xA;      _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-10 10:21:30&#xA;      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES&#xA;    Stream #0:2(eng): Subtitle: subrip&#xA;    Metadata:&#xA;      BPS-eng         : 79&#xA;      DURATION-eng    : 00:41:15.299000000&#xA;      NUMBER_OF_FRAMES-eng: 802&#xA;      NUMBER_OF_BYTES-eng: 24598&#xA;      _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 (&#x27;Tardigrades Will Inherit The Earth&#x27;) 64-bit&#xA;      _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-10 10:21:30&#xA;      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES&#xA;    Stream #0:3(eng): Subtitle: subrip&#xA;    Metadata:&#xA;      title           : SDH&#xA;      BPS-eng         : 82&#xA;      DURATION-eng    : 00:41:15.299000000&#xA;      NUMBER_OF_FRAMES-eng: 844&#xA;      NUMBER_OF_BYTES-eng: 25598&#xA;      _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 (&#x27;Tardigrades Will Inherit The Earth&#x27;) 64-bit&#xA;      _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-10 10:21:30&#xA;      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (copy)&#xA;  Stream #0:1 -> #0:1 (eac3 (native) -> aac (native))&#xA;  Stream #0:2 -> #0:2 (subrip (srt) -> ass (ssa))&#xA;Press [q] to stop, [?] for help&#xA;[aac @ 0x55d0572a1740] Using a PCE to encode channel layout "5.1(side)"&#xA;Output #0, matroska, to &#x27;output_file.mkv&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.29.100&#xA;    Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc (default)&#xA;    Metadata:&#xA;      BPS-eng         : 2559028&#xA;      DURATION-eng    : 00:42:08.151000000&#xA;      NUMBER_OF_FRAMES-eng: 60615&#xA;      NUMBER_OF_BYTES-eng: 808701337&#xA;      _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 (&#x27;Tardigrades Will Inherit The Earth&#x27;) 64-bit&#xA;      _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-10 10:21:30&#xA;      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES&#xA;    Stream #0:1(eng): Audio: aac (LC) ([255][0][0][0] / 0x00FF), 48000 Hz, 5.1(side), fltp, 394 kb/s (default)&#xA;    Metadata:&#xA;      BPS-eng         : 640000&#xA;      DURATION-eng    : 00:42:08.096000000&#xA;      NUMBER_OF_FRAMES-eng: 79003&#xA;      NUMBER_OF_BYTES-eng: 202247680&#xA;      _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 (&#x27;Tardigrades Will Inherit The Earth&#x27;) 64-bit&#xA;      _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-10 10:21:30&#xA;      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES&#xA;      encoder         : Lavc58.54.100 aac&#xA;    Stream #0:2(eng): Subtitle: ass (ssa)&#xA;    Metadata:&#xA;      BPS-eng         : 79&#xA;      DURATION-eng    : 00:41:15.299000000&#xA;      NUMBER_OF_FRAMES-eng: 802&#xA;      NUMBER_OF_BYTES-eng: 24598&#xA;      _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 (&#x27;Tardigrades Will Inherit The Earth&#x27;) 64-bit&#xA;      _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-10 10:21:30&#xA;      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES&#xA;      encoder         : Lavc58.54.100 ssa &#xA;video:789747kB audio:121419kB subtitle:41kB other streams:0kB global headers:1kB muxing overhead: 0.142563%&#xA;[aac @ 0x55d0572a1740] Qavg: 428.063&#xA;

    &#xA;&#xA;

    Any ideas what I'm doing wrong here ? In case it helps an ffprobe -show_streams command run on the original file shows the following :

    &#xA;&#xA;

    DL.DDP5.1.H.264-NTG.mkv&#xA;ffprobe version 4.2.2-1ubuntu1 Copyright (c) 2007-2019 the FFmpeg developers&#xA;  built with gcc 9 (Ubuntu 9.3.0-3ubuntu1)&#xA;  configuration: --prefix=/usr --extra-version=1ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared&#xA;  libavutil      56. 31.100 / 56. 31.100&#xA;  libavcodec     58. 54.100 / 58. 54.100&#xA;  libavformat    58. 29.100 / 58. 29.100&#xA;  libavdevice    58.  8.100 / 58.  8.100&#xA;  libavfilter     7. 57.100 /  7. 57.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  5.100 /  5.  5.100&#xA;  libswresample   3.  5.100 /  3.  5.100&#xA;  libpostproc    55.  5.100 / 55.  5.100&#xA;Input #0, matroska,webm, from &#x27;input_file.mkv&#x27;:&#xA;  Metadata:&#xA;    encoder         : libebml v1.3.5 &#x2B; libmatroska v1.4.8&#xA;    creation_time   : 2018-05-10T10:21:30.000000Z&#xA;  Duration: 00:42:08.15, start: 0.000000, bitrate: 3201 kb/s&#xA;    Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)&#xA;    Metadata:&#xA;      BPS-eng         : 2559028&#xA;      DURATION-eng    : 00:42:08.151000000&#xA;      NUMBER_OF_FRAMES-eng: 60615&#xA;      NUMBER_OF_BYTES-eng: 808701337&#xA;      _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 (&#x27;Tardigrades Will Inherit The Earth&#x27;) 64-bit&#xA;      _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-10 10:21:30&#xA;      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES&#xA;    Stream #0:1(eng): Audio: eac3, 48000 Hz, 6 channels, fltp (default)&#xA;    Metadata:&#xA;      BPS-eng         : 640000&#xA;      DURATION-eng    : 00:42:08.096000000&#xA;      NUMBER_OF_FRAMES-eng: 79003&#xA;      NUMBER_OF_BYTES-eng: 202247680&#xA;      _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 (&#x27;Tardigrades Will Inherit The Earth&#x27;) 64-bit&#xA;      _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-10 10:21:30&#xA;      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES&#xA;    Stream #0:2(eng): Subtitle: subrip&#xA;    Metadata:&#xA;      BPS-eng         : 79&#xA;      DURATION-eng    : 00:41:15.299000000&#xA;      NUMBER_OF_FRAMES-eng: 802&#xA;      NUMBER_OF_BYTES-eng: 24598&#xA;      _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 (&#x27;Tardigrades Will Inherit The Earth&#x27;) 64-bit&#xA;      _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-10 10:21:30&#xA;      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES&#xA;    Stream #0:3(eng): Subtitle: subrip&#xA;    Metadata:&#xA;      title           : SDH&#xA;      BPS-eng         : 82&#xA;      DURATION-eng    : 00:41:15.299000000&#xA;      NUMBER_OF_FRAMES-eng: 844&#xA;      NUMBER_OF_BYTES-eng: 25598&#xA;      _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 (&#x27;Tardigrades Will Inherit The Earth&#x27;) 64-bit&#xA;      _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-10 10:21:30&#xA;      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES&#xA;[STREAM]&#xA;index=0&#xA;codec_name=h264&#xA;codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10&#xA;profile=High&#xA;codec_type=video&#xA;codec_time_base=1001/48000&#xA;codec_tag_string=[0][0][0][0]&#xA;codec_tag=0x0000&#xA;width=1280&#xA;height=720&#xA;coded_width=1280&#xA;coded_height=720&#xA;has_b_frames=2&#xA;sample_aspect_ratio=1:1&#xA;display_aspect_ratio=16:9&#xA;pix_fmt=yuv420p&#xA;level=31&#xA;color_range=tv&#xA;color_space=bt709&#xA;color_transfer=bt709&#xA;color_primaries=bt709&#xA;chroma_location=left&#xA;field_order=progressive&#xA;timecode=N/A&#xA;refs=1&#xA;is_avc=true&#xA;nal_length_size=4&#xA;id=N/A&#xA;r_frame_rate=24000/1001&#xA;avg_frame_rate=24000/1001&#xA;time_base=1/1000&#xA;start_pts=0&#xA;start_time=0.000000&#xA;duration_ts=N/A&#xA;duration=N/A&#xA;bit_rate=N/A&#xA;max_bit_rate=N/A&#xA;bits_per_raw_sample=8&#xA;nb_frames=N/A&#xA;nb_read_frames=N/A&#xA;nb_read_packets=N/A&#xA;DISPOSITION:default=1&#xA;DISPOSITION:dub=0&#xA;DISPOSITION:original=0&#xA;DISPOSITION:comment=0&#xA;DISPOSITION:lyrics=0&#xA;DISPOSITION:karaoke=0&#xA;DISPOSITION:forced=0&#xA;DISPOSITION:hearing_impaired=0&#xA;DISPOSITION:visual_impaired=0&#xA;DISPOSITION:clean_effects=0&#xA;DISPOSITION:attached_pic=0&#xA;DISPOSITION:timed_thumbnails=0&#xA;TAG:BPS-eng=2559028&#xA;TAG:DURATION-eng=00:42:08.151000000&#xA;TAG:NUMBER_OF_FRAMES-eng=60615&#xA;TAG:NUMBER_OF_BYTES-eng=808701337&#xA;TAG:_STATISTICS_WRITING_APP-eng=mkvmerge v21.0.0 (&#x27;Tardigrades Will Inherit The Earth&#x27;) 64-bit&#xA;TAG:_STATISTICS_WRITING_DATE_UTC-eng=2018-05-10 10:21:30&#xA;TAG:_STATISTICS_TAGS-eng=BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES&#xA;[/STREAM]&#xA;[STREAM]&#xA;index=1&#xA;codec_name=eac3&#xA;codec_long_name=ATSC A/52B (AC-3, E-AC-3)&#xA;profile=unknown&#xA;codec_type=audio&#xA;codec_time_base=1/48000&#xA;codec_tag_string=[0][0][0][0]&#xA;codec_tag=0x0000&#xA;sample_fmt=fltp&#xA;sample_rate=48000&#xA;channels=6&#xA;channel_layout=unknown&#xA;bits_per_sample=0&#xA;dmix_mode=-1&#xA;ltrt_cmixlev=-1.000000&#xA;ltrt_surmixlev=-1.000000&#xA;loro_cmixlev=-1.000000&#xA;loro_surmixlev=-1.000000&#xA;id=N/A&#xA;r_frame_rate=0/0&#xA;avg_frame_rate=0/0&#xA;time_base=1/1000&#xA;start_pts=0&#xA;start_time=0.000000&#xA;duration_ts=N/A&#xA;duration=N/A&#xA;bit_rate=N/A&#xA;max_bit_rate=N/A&#xA;bits_per_raw_sample=N/A&#xA;nb_frames=N/A&#xA;nb_read_frames=N/A&#xA;nb_read_packets=N/A&#xA;DISPOSITION:default=1&#xA;DISPOSITION:dub=0&#xA;DISPOSITION:original=0&#xA;DISPOSITION:comment=0&#xA;DISPOSITION:lyrics=0&#xA;DISPOSITION:karaoke=0&#xA;DISPOSITION:forced=0&#xA;DISPOSITION:hearing_impaired=0&#xA;DISPOSITION:visual_impaired=0&#xA;DISPOSITION:clean_effects=0&#xA;DISPOSITION:attached_pic=0&#xA;DISPOSITION:timed_thumbnails=0&#xA;TAG:language=eng&#xA;TAG:BPS-eng=640000&#xA;TAG:DURATION-eng=00:42:08.096000000&#xA;TAG:NUMBER_OF_FRAMES-eng=79003&#xA;TAG:NUMBER_OF_BYTES-eng=202247680&#xA;TAG:_STATISTICS_WRITING_APP-eng=mkvmerge v21.0.0 (&#x27;Tardigrades Will Inherit The Earth&#x27;) 64-bit&#xA;TAG:_STATISTICS_WRITING_DATE_UTC-eng=2018-05-10 10:21:30&#xA;TAG:_STATISTICS_TAGS-eng=BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES&#xA;[/STREAM]&#xA;[STREAM]&#xA;index=2&#xA;codec_name=subrip&#xA;codec_long_name=SubRip subtitle&#xA;profile=unknown&#xA;codec_type=subtitle&#xA;codec_time_base=0/1&#xA;codec_tag_string=[0][0][0][0]&#xA;codec_tag=0x0000&#xA;width=N/A&#xA;height=N/A&#xA;id=N/A&#xA;r_frame_rate=0/0&#xA;avg_frame_rate=0/0&#xA;time_base=1/1000&#xA;start_pts=0&#xA;start_time=0.000000&#xA;duration_ts=2528151&#xA;duration=2528.151000&#xA;bit_rate=N/A&#xA;max_bit_rate=N/A&#xA;bits_per_raw_sample=N/A&#xA;nb_frames=N/A&#xA;nb_read_frames=N/A&#xA;nb_read_packets=N/A&#xA;DISPOSITION:default=0&#xA;DISPOSITION:dub=0&#xA;DISPOSITION:original=0&#xA;DISPOSITION:comment=0&#xA;DISPOSITION:lyrics=0&#xA;DISPOSITION:karaoke=0&#xA;DISPOSITION:forced=0&#xA;DISPOSITION:hearing_impaired=0&#xA;DISPOSITION:visual_impaired=0&#xA;DISPOSITION:clean_effects=0&#xA;DISPOSITION:attached_pic=0&#xA;DISPOSITION:timed_thumbnails=0&#xA;TAG:language=eng&#xA;TAG:BPS-eng=79&#xA;TAG:DURATION-eng=00:41:15.299000000&#xA;TAG:NUMBER_OF_FRAMES-eng=802&#xA;TAG:NUMBER_OF_BYTES-eng=24598&#xA;TAG:_STATISTICS_WRITING_APP-eng=mkvmerge v21.0.0 (&#x27;Tardigrades Will Inherit The Earth&#x27;) 64-bit&#xA;TAG:_STATISTICS_WRITING_DATE_UTC-eng=2018-05-10 10:21:30&#xA;TAG:_STATISTICS_TAGS-eng=BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES&#xA;[/STREAM]&#xA;[STREAM]&#xA;index=3&#xA;codec_name=subrip&#xA;codec_long_name=SubRip subtitle&#xA;profile=unknown&#xA;codec_type=subtitle&#xA;codec_time_base=0/1&#xA;codec_tag_string=[0][0][0][0]&#xA;codec_tag=0x0000&#xA;width=N/A&#xA;height=N/A&#xA;id=N/A&#xA;r_frame_rate=0/0&#xA;avg_frame_rate=0/0&#xA;time_base=1/1000&#xA;start_pts=0&#xA;start_time=0.000000&#xA;duration_ts=2528151&#xA;duration=2528.151000&#xA;bit_rate=N/A&#xA;max_bit_rate=N/A&#xA;bits_per_raw_sample=N/A&#xA;nb_frames=N/A&#xA;nb_read_frames=N/A&#xA;nb_read_packets=N/A&#xA;DISPOSITION:default=0&#xA;DISPOSITION:dub=0&#xA;DISPOSITION:original=0&#xA;DISPOSITION:comment=0&#xA;DISPOSITION:lyrics=0&#xA;DISPOSITION:karaoke=0&#xA;DISPOSITION:forced=0&#xA;DISPOSITION:hearing_impaired=0&#xA;DISPOSITION:visual_impaired=0&#xA;DISPOSITION:clean_effects=0&#xA;DISPOSITION:attached_pic=0&#xA;DISPOSITION:timed_thumbnails=0&#xA;TAG:language=eng&#xA;TAG:title=SDH&#xA;TAG:BPS-eng=82&#xA;TAG:DURATION-eng=00:41:15.299000000&#xA;TAG:NUMBER_OF_FRAMES-eng=844&#xA;TAG:NUMBER_OF_BYTES-eng=25598&#xA;TAG:_STATISTICS_WRITING_APP-eng=mkvmerge v21.0.0 (&#x27;Tardigrades Will Inherit The Earth&#x27;) 64-bit&#xA;TAG:_STATISTICS_WRITING_DATE_UTC-eng=2018-05-10 10:21:30&#xA;TAG:_STATISTICS_TAGS-eng=BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES&#xA;[/STREAM]&#xA;&#xA;

    &#xA;