Author Topic: Bizarre Muxed File cannot be started  (Read 363 times)

jan771

  • Newbie
  • *
  • Posts: 46
Bizarre Muxed File cannot be started
« on: October 06, 2019, 09:55:53 PM »
I discovered multiple times, but rare, about 1% of muxing, that muxed mkv files can be created, that cannot be started. The muxed file contains video and audio and all motion pictures, but you can only click through the video, you cannot start it. AviDemus fails to mux those videos correctly, ffmpeg succeeds.

In this example video you can start the video only if you click through the pictures in the later part and there you can start the video. Once started, you can also go back to the beginning. I have discovered files though that cannot be started at all:
https://c.gmx.net/@334663428440331676/mbnHz885Rmy0tPWIDN1G1Q

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3400
Re: Bizarre Muxed File cannot be started
« Reply #1 on: October 06, 2019, 10:46:58 PM »
Works fine for me regarding the HEVC video track with the sample provided (the audio track cannot be decoded by libavcodec, likely the number of channels provided by the extradata doesn't match the actual stream) both with hw accel decoding enabled and disabled. Please try to switch DXVA2 accelerated video decoding on and off (please restart Avidemux if you toggle the "decode video using DXVA2" checkbox to be sure).

jan771

  • Newbie
  • *
  • Posts: 46
Re: Bizarre Muxed File cannot be started
« Reply #2 on: October 07, 2019, 08:44:42 PM »
Maybe there is a misunderstaning. This is a file created by AviDemux. It can play it. But Mediaplayer Classic using K-Lite Mega Codec Pack cannot play it. I guess there is a problem in the meta-Data of the muxed file, which might be an error in AviDemux. Unless ffmpeg could create a working file, I guessed so.

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3400
Re: Bizarre Muxed File cannot be started
« Reply #3 on: October 07, 2019, 09:35:50 PM »
The audio is definitely broken, but I don't see any problem with the video track.

Maybe MPC requires that both video and audio are fine to start playback? So does QuickTime on macOS.

jan771

  • Newbie
  • *
  • Posts: 46
Re: Bizarre Muxed File cannot be started
« Reply #4 on: October 08, 2019, 08:03:01 PM »
ok, audio is broken by AviDemux. That is the bug and maybe that is why media player does not start to play. When converting the same video with ffmpeg, then there was no problem.
I think it is due to the fact, that audio lanes change at the beginnning of the movie and they might not be 100% synchron with the key frames used as cuttin point.

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3400
Re: Bizarre Muxed File cannot be started
« Reply #5 on: October 08, 2019, 10:18:48 PM »
I think it is due to the fact, that audio lanes change at the beginnning of the movie

Probably, on-the-fly configuration changes within a stream are a scenario incompatible with the very design of Avidemux as of now, and also basically incompatible with formats like Matroska and MP4 where extradata, required to be able to decode some codecs like AAC (and H.264, HEVC etc.) is stored at a designated location outside of the stream.

Please always cut after a channel layout switch.

There is no easy fix.
« Last Edit: October 08, 2019, 10:20:35 PM by eumagga0x2a »