When remuxing an mp4 download to mkv an audio track delay is added. Is this normal?

Discussion in 'High Definition Software' started by Movieman12, Jul 28, 2021.

  1. Movieman12

    Movieman12 New Member


    I'm using the trial version of AnyStream and it seems to be working fine. However there's something that confuses me about my latest Amazon Prime download with AnyStream

    When I simply remux the mp4 file generated by AnyStream to an mkv container with MKVToolNix 59.0.0 (default settings) the resulting mkv file has a -80 ms delay added to the DD+ audio track

    Here's the MediaInfo paste of the mp4 download by anystream: https://pastebin.com/DBy0G47x

    Here's the MediaInfo paste of the mkv remuxed with MKVToolNix: https://pastebin.com/qcHXTmV2

    Does anyone know what could be causing this?

    Attached Files:

  2. sycor

    sycor Well-Known Member

    I don't think I've ever had this happen using MKVToolNix. Maybe try downloading the file again?
  3. DannyBoi

    DannyBoi Well-Known Member

    U can adjust the delay in mkvtoolnix, have a look on google how to do it, its easy
  4. Lowpro

    Lowpro Well-Known Member

    I'd post this in the High Definition Software forum section as this is not an AnyStream issue. You'll get better exposure there. That being said, I've authored hundreds of AnyStream downloads to Blu-ray at this point, all of which included Dolby Digital Plus audio. In some cases I included audio from multiple downloads when authoring a given title to Blu-ray. No issues to date. The audio has been spot on each and every time. Your results may vary evidently.
    RedFox 1 likes this.
  5. Wowfunhappy

    Wowfunhappy Well-Known Member

    A bit random, but I would be interested in what happens if you remux to a .ts container first, and then remux to an mkv.

    This is a good way to wipe out subtle DTS issues in general, and I've had it correct a few files downloaded with AnyStream in particular, which manifested in players like QuickTime.
  6. DannyBoi

    DannyBoi Well-Known Member

    I mux dts-hd master audio with mine
  7. zanetti

    zanetti Well-Known Member

    try videocontainerswitcher. no remux neede for mp4 to mkv and vice versa. simple copy stream(s) process. great if you dont need embedded subs etc...
  8. DiverJ

    DiverJ Member

    Any particular program you use to make a bluray disk? I have attempted to take just ONE anystream download and all I get is my 25GB disk just does not have enough room to complete the conversion. But I am not too knowledgeable on all of this switching formats and authoring discs.
  9. LogicDeLuxe

    LogicDeLuxe Active Member

    I noticed this too. If I check "Complete" in the "Debug" menu of MediaInfo, it also shows me a positive video delay of the same amount. In my experience, specifying a video delay is a very bad thing, since many players can't handle that.
    If you don't have the mp4 anymore, you can fix it by demultiplexing and multiplexing it again with a positive delay of the amount in question added to the audio tracks, ie. usually 80 or 83ms. By checking the clapping frame by frame in "7 Zwerge" (2004) at 5:03, this appears fitting. No promise that this is the case in all affected movies. I still have to check my collection.
    I have no idea why MKVToolNix multiplexes it that way. The positive video delay and negative audio delay certainly seems wrong. Those opposite delays plus the 80ms the audio actually needed did add up in audio coming noticeably too early (probably 240ms) in MPCHC for me.
  10. RedFox 1

    RedFox 1 Super Moderator

    Moved to High Def Software.
  11. LogicDeLuxe

    LogicDeLuxe Active Member

    Then, you should probably change the title to "When remuxing an mp4 download from AS to mkv an audio track delay is added. Is this normal?".
    While there is something buggy going on with MKVToolNix, it certainly can't be a coincidence, that this only happens with mp4 files from AS. I never experienced such a thing with any other mp4 file. Maybe the devs should take a closer look if AS accidentally does something nonstandard to its multiplex triggering the issue.
    Last edited by a moderator: Aug 2, 2021
  12. RedFox 1

    RedFox 1 Super Moderator

    Only the OP can request this.
  13. DrXenos

    DrXenos Well-Known Member

    That's exactly what remuxing is.
    zanetti likes this.
  14. zanetti

    zanetti Well-Known Member

    yeah, was thinking of reencode. hehe.
  15. DrXenos

    DrXenos Well-Known Member

    Ah, gotcha.
  16. Lowpro

    Lowpro Well-Known Member

    Sounds like the program you were using had the bitrate set way too high when encoding for Blu-ray compliance. I always check to ensure the bitrate matches that of the video within the MP4 file I'm working with. As a result, the size of the resulting Blu-ray never dwarfs the size of the MP4 file. That being said, the primary application I use to author to Blu-ray is multiAVCHD. Take the movie "Sweet November" for example which I downloaded via AnyStream and my HBOmax account. The file size of the MP4 file was 7.13 GB, the video bitrate being 8,250kbps. From multiAVCHD I add the MP4 file. Once added I open the extended properties window for the title adding chapters, audio tracks and subtitles in addition to setting the video to be encoded for Blu-ray complaince via the "Transcode" option which is also where you set the bitrate. In this case multiAVCHD already had the bitrate set to 8,250kbps, the estimated output being within 1GB of the size of the MP4 file, i.e. "Titles: 1 / Size 7309 MiB (7.138 GiB) / Estimated output: ~8059 MiB (7.87 GiB)".