Recherche avancée

Médias (0)

Mot : - Tags -/performance

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

Autres articles (77)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (6714)

  • ffmpeg concat doesn't sync to manual frame by frame concatenation

    5 juillet 2022, par memo

    I have hundreds of short (10-120seconds) videos (H264 mp4) with audio (aac). (let's call these 'clips'). All identical video and audio codecs, resolution, framerate, crf, pixel format, sample rate etc.

    


    concat_demux :

    


    If I concat these with ffmpeg concat (demuxer), I get a single nice H264 mp4 with audio perfectly synced to the video (as expected).

    


    cmd_args = ['ffmpeg',
            '-f concat',
            '-safe 0',
            f'-i "{output_filelist_path}"',
            '-c copy',
            '-y',
            '-r 30', # trying this out of desperation
            f'"{output_concat_demux}"'
            ]

cmd = ' '.join(cmd_args)
r = subprocess.call(cmd, shell=True, cwd=args.output_dir)


    


    frame_by_frame :

    


    However, if I manually iterate every frame of every clip video and write the frames to an mp4 using skvideo.io, this video drifts out of sync with the concat_demux version.

    


    input_dict = { '-r':str(fps) } 
output_dict = { '-r':str(fps), '-pix_fmt':'yuv420p', '-vcodec':'libx264', '-crf':'18' }
video_writer = skvideo.io.FFmpegWriter(output_path, inputdict=input_dict, outputdict=output_dict) 

for video_path in video_paths:
   video = skvideo.io.vread(video_path) # read all frames into np.array
   for frame in video:
      video_writer.writeFrame(frame)
video_writer.close()


    


    When I compare these two files in a video editor (e.g. AfterEffects) and step through frame by frame, I can see that with every new clip, the frame_by_frame version slips 1 or 2 frames ahead of the ffmpeg concat_demux version. What is going on ? How can I fix - or at least debug - this ?

    


    On a side note, I do need to concatenate manually frame by frame, as I'm also doing a ton of other stuff (triggering events on clip change, overlaying additional elements etc). And I need to be able to sync a concatenated audio. I was hoping to concatenate the video manually frame by frame and do my post-processing, and then mux with the audio from the ffmpeg concat_demux version. But alas they drift out of sync.

    



    


    (I've found quite a few posts on SO where the problem is using ffmpeg concat results in videos which are out of sync with the audio. However, this is not my problem. My video created with ffmpeg concat is perfectly in sync with the audio, but it's out of sync with a manually frame-by-frame concatenated video.)

    



    


    Update - concat_protocol

    


    I've tried using the concat protocol. Now the output of this gives a file where the video is frame synced to the frame_by_frame version, BUT the audio is synced to the audio of the concat_demux version. So its audio is out of sync with the video.

    


    intermediate_paths = []
for p in clip_file_list:
    intermediate_path = os.path.join(args.output_dir, 'intermediate', os.path.basename(p) + '.ts')
    intermediate_paths.append(intermediate_path)
    cmd_args = ['ffmpeg',
        f'-i "{p}"',
        '-c copy -bsf:v h264_mp4toannexb -f mpegts -y',
        f'"{intermediate_path}"'
        ]

    cmd = ' '.join(cmd_args)
    r = subprocess.call(cmd, shell=True, cwd=args.output_dir)


intermediate_paths = '|'.join(intermediate_paths)
cmd_args = ['ffmpeg',
            f'-i "concat:{intermediate_paths}"',
            '-c copy -bsf:a aac_adtstoasc',
            f'"{output_concat_path}"'
            ]

cmd = ' '.join(cmd_args)
r = subprocess.call(cmd, shell=True, cwd=args.output_dir)


    


    I am getting loads of errors like below

    


        corrupt input packet in stream 0
[mp4 @ 0x137e043d0] Non-monotonous DTS in output stream 0:1; previous: 83027966, current: 83027198; changing to 83027967. This may result in incorrect timestamps in the output file.


    



    


    here's the info on the two output files. Input #0 is the ffmpeg concat_demux. Input #1 is the manual frame-by-frame. Note the concat.mp4 has a framerate of 29.94 fps. I'm not sure if this is the problem. I couldn't figure out how to make this 30 (see '-r 30' in the ffmpeg concat command above)

    


    ffmpeg version 5.0.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with Apple clang version 13.1.6 (clang-1316.0.21.2.5)
  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/5.0.1_2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-neon
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'clips_concat.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf59.16.100
  Duration: 00:01:43.22, start: 0.000000, bitrate: 5412 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1080x1080 [SAR 1:1 DAR 1:1], 5276 kb/s, 29.94 fps, 30 tbr, 15360 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'clips_frames.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf59.16.100
  Duration: 00:01:43.00, start: 0.000000, bitrate: 4917 kb/s
  Stream #1:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1080x1080, 4914 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]


    



    


    here's info on first few clips (the manual concat is already 2 frames out of sync with the ffmpeg concat version by the second clip !)

    


    ffmpeg version 5.0.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with Apple clang version 13.1.6 (clang-1316.0.21.2.5)
  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/5.0.1_2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-neon
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'clip_1080px_0.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:00:05.02, start: 0.000000, bitrate: 3944 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1080x1080 [SAR 1:1 DAR 1:1], 3818 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 131 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'clip_1080px_1.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:00:05.02, start: 0.000000, bitrate: 4557 kb/s
  Stream #1:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1080x1080 [SAR 1:1 DAR 1:1], 4438 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #1:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'clip_1080px_2.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:00:11.02, start: 0.000000, bitrate: 5447 kb/s
  Stream #2:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1080x1080 [SAR 1:1 DAR 1:1], 5320 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #2:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
Input #3, mov,mp4,m4a,3gp,3g2,mj2, from 'clip_1080px_3.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:00:11.02, start: 0.000000, bitrate: 5978 kb/s
  Stream #3:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1080x1080 [SAR 1:1 DAR 1:1], 5851 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #3:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
Input #4, mov,mp4,m4a,3gp,3g2,mj2, from 'clip_1080px_4.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:00:16.02, start: 0.000000, bitrate: 6570 kb/s
  Stream #4:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1080x1080 [SAR 1:1 DAR 1:1], 6441 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #4:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
Input #5, mov,mp4,m4a,3gp,3g2,mj2, from 'clip_1080px_5.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:00:13.02, start: 0.000000, bitrate: 5069 kb/s
  Stream #5:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1080x1080 [SAR 1:1 DAR 1:1], 4940 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #5:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
Input #6, mov,mp4,m4a,3gp,3g2,mj2, from 'clip_1080px_6.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:00:22.02, start: 0.000000, bitrate: 4775 kb/s
  Stream #6:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1080x1080 [SAR 1:1 DAR 1:1], 4642 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #6:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
Input #7, mov,mp4,m4a,3gp,3g2,mj2, from 'clip_1080px_7.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:00:22.02, start: 0.000000, bitrate: 5402 kb/s
  Stream #7:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1080x1080 [SAR 1:1 DAR 1:1], 5269 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #7:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]


    


  • FFMPEG - rewarp MPEGDash to MP4 changes audio bitrate mode

    30 juin 2022, par Matthieu Ducorps

    I'm rewrapping some MPEGDash to MP4 wrapper and some files are outputed with variable audio bitrate where others with constant bitrate,and both sources looks exactly the same.

    


    For reference :

    


    I'm using FFMPEG 5.0 for the rewrapping

    


    ffmpeg version 5.0-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
    built with gcc 11.2.0 (Rev5, Built by MSYS2 project)
    configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
    libavutil      57. 17.100 / 57. 17.100
    libavcodec     59. 18.100 / 59. 18.100
    libavformat    59. 16.100 / 59. 16.100
    libavdevice    59.  4.100 / 59.  4.100
    libavfilter     8. 24.100 /  8. 24.100
    libswscale      6.  4.100 /  6.  4.100
    libswresample   4.  3.100 /  4.  3.100
    libpostproc    56.  3.100 / 56.  3.100


    


    And MediaInfo 22.09 to check the medias.

    


    MediaInfoVersion

    


    I'm using this command to rewrap the media :

    


    ffmpeg.exe -y -i MPEGDash.mpd -map 0:v -map 0:a -c copy OutFile.mp4


    


    This source MPEGDASH with constant audio bitrate

    


    General
Complete name                            : \\Constant\PROXY\A0002_30sec\MPEGDash_A0002_30sec.mpd
Format                                   : DASH MPD
File size                                : 4.14 MiB
Duration                                 : 30 s 80 ms
Overall bit rate mode                    : Constant
Overall bit rate                         : 1 154 kb/s

Video
ID                                       : 0-1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.1
Format settings                          : CABAC / 2 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 2 frames
Format settings, GOP                     : M=3, N=30
Muxing mode                              : dash
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 30 s 30 ms
Bit rate mode                            : Constant
Bit rate                                 : 640 kb/s
Width                                    : 640 pixels
Height                                   : 360 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 29.970 (30000/1001) FPS
Standard                                 : NTSC
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.093
Stream size                              : 2.28 MiB (55%)
Language                                 : English
Encoded date                             : UTC 2022-06-30 08:20:16
Tagged date                              : UTC 2022-06-30 08:20:16
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709
Source                                   : V0_360p_640000/V0_360p_640000_init.mp4
Codec configuration box                  : avcC

Audio #1
ID                                       : 160-1
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Muxing mode                              : dash
Codec ID                                 : mp4a-40-2
Duration                                 : 30 s 80 ms
Bit rate mode                            : Constant
Bit rate                                 : 128 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 460 KiB (11%)
Language                                 : English
Encoded date                             : UTC 2022-06-30 08:20:16
Tagged date                              : UTC 2022-06-30 08:20:16
Source                                   : A0_48000_128000/A0_48000_128000_init.mp4

Audio #2
ID                                       : 161-1
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Muxing mode                              : dash
Codec ID                                 : mp4a-40-2
Duration                                 : 30 s 80 ms
Bit rate mode                            : Constant
Bit rate                                 : 128 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 460 KiB (11%)
Language                                 : English
Encoded date                             : UTC 2022-06-30 08:20:16
Tagged date                              : UTC 2022-06-30 08:20:16
Source                                   : A1_48000_128000/A1_48000_128000_init.mp4

Audio #3
ID                                       : 162-1
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Muxing mode                              : dash
Codec ID                                 : mp4a-40-2
Duration                                 : 30 s 80 ms
Bit rate mode                            : Constant
Bit rate                                 : 128 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 460 KiB (11%)
Language                                 : English
Encoded date                             : UTC 2022-06-30 08:20:16
Tagged date                              : UTC 2022-06-30 08:20:16
Source                                   : A2_48000_128000/A2_48000_128000_init.mp4

Audio #4
ID                                       : 163-1
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Muxing mode                              : dash
Codec ID                                 : mp4a-40-2
Duration                                 : 30 s 80 ms
Bit rate mode                            : Constant
Bit rate                                 : 128 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 460 KiB (11%)
Language                                 : English
Encoded date                             : UTC 2022-06-30 08:20:16
Tagged date                              : UTC 2022-06-30 08:20:16
Source                                   : A3_48000_128000/A3_48000_128000_init.mp4


    


    Has the expected output with constant audio bitrate on the MP4

    


    General
Complete name                            : \\Constant\PROXY\A0002_30sec\A0002_30sec.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 4.13 MiB
Duration                                 : 30 s 96 ms
Overall bit rate mode                    : Constant
Overall bit rate                         : 1 152 kb/s
Movie name                               : MPEGDash_A0002_30sec.mpd
Writing application                      : Lavf59.16.100

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.1
Format settings                          : CABAC / 2 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 2 frames
Format settings, GOP                     : M=3, N=30
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 30 s 96 ms
Source duration                          : 29 s 997 ms
Bit rate mode                            : Constant
Bit rate                                 : 590 kb/s
Nominal bit rate                         : 640 kb/s
Maximum bit rate                         : 636 kb/s
Width                                    : 640 pixels
Height                                   : 360 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 29.970 (30000/1001) FPS
Standard                                 : NTSC
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.085
Stream size                              : 2.12 MiB (51%)
Source stream size                       : 2.28 MiB (55%)
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709
mdhd_Duration                            : 30030
Codec configuration box                  : avcC

Audio #1
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 30 s 80 ms
Bit rate mode                            : Constant
Bit rate                                 : 125 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 460 KiB (11%)
Language                                 : English
Default                                  : Yes
Alternate group                          : 1

Audio #2
ID                                       : 3
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 30 s 80 ms
Bit rate mode                            : Constant
Bit rate                                 : 125 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 460 KiB (11%)
Language                                 : English
Default                                  : Yes
Alternate group                          : 2

Audio #3
ID                                       : 4
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 30 s 80 ms
Bit rate mode                            : Constant
Bit rate                                 : 125 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 460 KiB (11%)
Language                                 : English
Default                                  : Yes
Alternate group                          : 3

Audio #4
ID                                       : 5
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 30 s 80 ms
Bit rate mode                            : Constant
Bit rate                                 : 125 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 460 KiB (11%)
Language                                 : English
Default                                  : Yes
Alternate group                          : 4


    


    But this source MPEGDASH which has the same characteristics :

    


    General
Complete name                            : \\Variable\PROXY\A0005_30sec\MPEGDash_A0005_30sec.mpd
Format                                   : DASH MPD
File size                                : 4.15 MiB
Duration                                 : 30 s 80 ms
Overall bit rate mode                    : Constant
Overall bit rate                         : 1 157 kb/s

Video
ID                                       : 0-1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.1
Format settings                          : CABAC / 2 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 2 frames
Format settings, GOP                     : M=3, N=30
Muxing mode                              : dash
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 30 s 30 ms
Bit rate mode                            : Constant
Bit rate                                 : 640 kb/s
Width                                    : 640 pixels
Height                                   : 360 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 29.970 (30000/1001) FPS
Standard                                 : NTSC
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.093
Stream size                              : 2.29 MiB (55%)
Language                                 : English
Encoded date                             : UTC 2022-06-30 08:24:03
Tagged date                              : UTC 2022-06-30 08:24:03
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709
Source                                   : V0_360p_640000/V0_360p_640000_init.mp4
Codec configuration box                  : avcC

Audio #1
ID                                       : 160-1
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Muxing mode                              : dash
Codec ID                                 : mp4a-40-2
Duration                                 : 30 s 80 ms
Bit rate mode                            : Constant
Bit rate                                 : 128 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 461 KiB (11%)
Language                                 : English
Encoded date                             : UTC 2022-06-30 08:24:03
Tagged date                              : UTC 2022-06-30 08:24:03
Source                                   : A0_48000_128000/A0_48000_128000_init.mp4

Audio #2
ID                                       : 161-1
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Muxing mode                              : dash
Codec ID                                 : mp4a-40-2
Duration                                 : 30 s 80 ms
Bit rate mode                            : Constant
Bit rate                                 : 128 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 460 KiB (11%)
Language                                 : English
Encoded date                             : UTC 2022-06-30 08:24:03
Tagged date                              : UTC 2022-06-30 08:24:03
Source                                   : A1_48000_128000/A1_48000_128000_init.mp4

Audio #3
ID                                       : 162-1
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Muxing mode                              : dash
Codec ID                                 : mp4a-40-2
Duration                                 : 30 s 80 ms
Bit rate mode                            : Constant
Bit rate                                 : 128 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 460 KiB (11%)
Language                                 : English
Encoded date                             : UTC 2022-06-30 08:24:03
Tagged date                              : UTC 2022-06-30 08:24:03
Source                                   : A2_48000_128000/A2_48000_128000_init.mp4

Audio #4
ID                                       : 163-1
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Muxing mode                              : dash
Codec ID                                 : mp4a-40-2
Duration                                 : 30 s 80 ms
Bit rate mode                            : Constant
Bit rate                                 : 128 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 460 KiB (11%)
Language                                 : English
Encoded date                             : UTC 2022-06-30 08:24:03
Tagged date                              : UTC 2022-06-30 08:24:03
Source                                   : A3_48000_128000/A3_48000_128000_init.mp4


    


    Has this output where the MP4 have the first audio with variable bitrate

    


    General
Complete name                            : \\Variable\PROXY\A0005_30sec\A0005_30sec.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 4.14 MiB
Duration                                 : 30 s 96 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 1 155 kb/s
Movie name                               : MPEGDash_A0005_30sec.mpd
Writing application                      : Lavf59.16.100

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.1
Format settings                          : CABAC / 2 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 2 frames
Format settings, GOP                     : M=3, N=30
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 30 s 96 ms
Source duration                          : 29 s 997 ms
Bit rate mode                            : Constant
Bit rate                                 : 593 kb/s
Nominal bit rate                         : 640 kb/s
Maximum bit rate                         : 640 kb/s
Width                                    : 640 pixels
Height                                   : 360 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 29.970 (30000/1001) FPS
Standard                                 : NTSC
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.086
Stream size                              : 2.13 MiB (51%)
Source stream size                       : 2.29 MiB (55%)
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709
mdhd_Duration                            : 30030
Codec configuration box                  : avcC

Audio #1
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 30 s 80 ms
Bit rate mode                            : Variable
Bit rate                                 : 126 kb/s
Maximum bit rate                         : 128 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 461 KiB (11%)
Language                                 : English
Default                                  : Yes
Alternate group                          : 1

Audio #2
ID                                       : 3
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 30 s 80 ms
Bit rate mode                            : Constant
Bit rate                                 : 125 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 460 KiB (11%)
Language                                 : English
Default                                  : Yes
Alternate group                          : 2

Audio #3
ID                                       : 4
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 30 s 80 ms
Bit rate mode                            : Constant
Bit rate                                 : 125 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 460 KiB (11%)
Language                                 : English
Default                                  : Yes
Alternate group                          : 3

Audio #4
ID                                       : 5
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 30 s 80 ms
Bit rate mode                            : Constant
Bit rate                                 : 125 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 460 KiB (11%)
Language                                 : English
Default                                  : Yes
Alternate group                          : 4


    


    Maybe I'm missing something but,I don't see what.

    


  • FFMPEG audio not delaying properly

    1er avril 2022, par Spartan 117

    I am trying to mix two audio files together, with one audio being delayed. Here are the file details

    


    Audio 1 - https://pastebin.com/vkYsH88e, "startTime" : "03/23/2022 21:20:27", "endTime" : "03/24/2022 01:06:11"

    


    Audio 2 - https://pastebin.com/Gs4V96GQ, "startTime" : "03/24/2022 01:05:30", "endTime" : "03/24/2022 04:21:41"

    


    As you can see from the paste bin and the json property, Audio two starts about 3 hours and 45 minutes after Audio one, here is how i am trying to mix them

    


    ffmpeg -i RTb295d0534191e1acb22a45bb971a12e6.mka -i RT103bfe5f4b129860f69cd8e820f3a10b.mka -filter_complex "[1:a]adelay=13500s:all=1[apad]; [0:a][apad]amix=inputs=2:weights=1|1[aout]" -map [aout] combined_audio.mka


    


    Here is the output of that mixture - https://pastebin.com/KAsw0905

    


    Files have been uploaded here, if anyone wants to test - https://easyupload.io/m/xveng4

    


    The issue i'm having ? Based on the parameters provided, the 2nd audio file should start playing after 3 hours and 45 minutes. Instead, it plays after 5 hours and 45 minutes. I'm new to FFMPEG and have been having trouble figuring this out. Any ideas ?