Log in

View Full Version : Nero AVC in Matroska


Yayita
9th February 2005, 22:45
I'd hate to double post but this topic should be in the new containers and new codecs forums.

(* NOTE TO MODERATOR: If you find it justified, please post question in New codecs forum *)

I am trying to use a Nero AVC video in matroska.

I am following the instructions in mkvtoolnix website:

http://www.bunkus.org/videotools/mkvtoolnix/avc-status.html

I am using the new matroska splitter, found in

http://haali.cs.msu.ru/mkv/,

and I am using Nero's own decoder in MPC 6.4.8.3; I can access the decoder configuration.

However the video is choppy, and I achieve less than optimal fps. My cpu is AMD 2800, and the task manager indicates that less than 50% of the cpu processing is used during playback, so I know it is not lack of pc engine.

I would like to know if anyone has been successful using avc in matroska, and could share their experience.

kurt
9th February 2005, 23:07
look here: http://forum.doom9.org/showthread.php?s=&threadid=85503&perpage=20&pagenumber=11

perhaps it'll help you :)

Yayita
10th February 2005, 00:48
Kurt, thanks for the reply.
Unfortunately your reply left me with more questions.

More testing shows (all played in MPC 6.8.3.4):
With the Nero decoder,
the mp4 file works fine (video only)
the matroska file (very choppy) unviewable.

With ffdshow 20050204
the mp4 file plays fine (video only)
the mp4 file muxed with audio (192 kbps aac) plays fine.
the matroska file plays fine (video only)
the matroska file with audio (192 kbps ac3) audio is out of synch and then video hangs; video output stops at a frame while audio continues.


What's going on?? :confused:

niamh
10th February 2005, 08:25
Unfortunately your reply left me with more questions.
I'll try and spell it out :

If you read Mosu's technical explanation in that thread:
Originally posted by Mosu
If you all want a technical explanation of what's going on:

MP4 files can contain an atom named CTTS. Especially for AVC/h.264 video tracks. This atom maps the timecodes usually found in a MP4 file to display timecodes. Normally, the timecodes are 0ms, 40ms, 80ms, 120ms... etc. for a 25 FPS file. With a CTTS atom these can become e.g. 0ms, 120ms, 40ms, 80ms... This is also the case for B frames in "normal" MPEG-4.

Up until early this year (I don't know the exact date, but let's say January 10th or so) mkvmerge did not evaluate the CTTS atom at all. So the build from 20050101 simply uses the ordered timecodes. ffdshow seems to be happy with those.

Unfortunately, Nero's decoder is NOT happy with those timestamps. It sees ordered timecodes, but it derives from the frame data itself that those are wrong and falls back to a fixed FPS mode. This is not what we want.

Therefore the Matroska team (more like Haali and me) decided to do it the "right" way and to store display timecodes. This is "right" because Matroska does indeed store display timecodes. This is also true for what I call "native MPEG-4 storage" or "native B frames".

Unfortunately ffdshow does not seem to be happy with those timecodes. We're not sure what we will do about that, but it seems that it is an issue on the decoder side and not one on mkvmerge's side. I guess Haali will try to contact Milan (the ffdshow developper). But judging from the past he may not be the quickest to respond.

>> the problem is in ffdshow

2 posts down, kurt replied:
Originally posted by kurt
with todays ffdshow build playback of avc in mkv (and haali-splitter) is fine now :)

http://www.aziendeassociate.it/cd.asp?dir=/ffdshow
The date was 1st february 2005

>> your ffdshow is outdated, please go to the mirror and download the later one :) It's been fixed(for ffdshow playback at least).

iapir
10th February 2005, 10:19
He's using Nero Decoder, not ffdshow.

But as the pb seems to be coming from the audio, can you tell us what audio decoders are used ? Or even better a Graphedit capture when you load the file ? Also make sure you disable most of MPC's internal filters...

kurt
10th February 2005, 19:02
strange... are you sure you are muxing with mkvtoolnix from 20050125 or later? i have no playback problems - neither with ffdshow (20050201) nor with nero decoder .... and the audio is always in sync (AC3)...

Yayita
10th February 2005, 19:10
niamh:
Thanks for helping. I say that Kurt's post left me with more doubts because: 1) I am using the latest ffdshow (see version in my 2nd post) 2) The recommended decoder is Nero's which works worst for me.

iapir:
Thanks for helping too. The audio does not seem to be the problem either. To save on the Forum's server bandwidth I'll tell you what Graphedit indicates, when I use the ac3 file it uses "Cyberlink Audio Decoder", that is the audio decoder embedded in Power DVD 6.0. The video decoder indicates either a) "Nero Video Decoder" or b) "ffdshow MPEG-4 Video decoder" depending on which one I am using (I install and uninstall ffdshow to switch between decoders).
I further test the possibility of problems with the audio muxing an mp3 version of the original audio, and I get the same problem as with ac3: audio out of synch, and eventual freezing of video rendering (with ffdshow/ with Nero totally choppy).

The problem seems not to be with MPC either, because I get the exact same behavior with Windows Media Player. So all considered the problem seems to be with the splitter (I believe in my supreme ignorance). Maybe I have two splitters trying to work at the same time.

I don't know.
:confused:

niamh
10th February 2005, 19:30
Your next option is to make a little sample of the mkv file available for download, so some other users can test it on their own system and narrow it down to either your system or the file in question.

Yayita
10th February 2005, 19:57
Got It! Got It! Got It! :D

Kurt gave me a clue. The problem was my version of mkvtoolnix. I have installed and tried so many versions of mkvtoolnix that I honestly don't know which was the one not working. :( That really sucks because it would help all of you that track bugs for a hobby :).
All I know is that it wasn't a very old version, I believe it was one of the "Elephant's Foot" version. Also it could not be too old because older versions like 1.02 and older do not even recognize the 4cc header of Nero AVC, and won't mux.

January 25 and Feb 8 versions of mkvtoolnix are working for me, perfect playback with ffdshow, decent playback with nero (audio in synch, but less than 23.97 fps, which results in not rendering some frames; i.e. barely choppy video). Thanks guys for the help.

And to the matroska team: Great Work!
Hopefully AVC support will be standard in the next matroska packs.

Mosu
11th February 2005, 09:15
Always check http://www.bunkus.org/videotools/mkvtoolnix/avc-status.html for information about AVC in Matroska, especially which versions of the different components you need at least.

iapir
11th February 2005, 10:16
Originally posted by Yayita
Got It! Got It! Got It! :D

Kurt gave me a clue. The problem was my version of mkvtoolnix. I have installed and tried so many versions of mkvtoolnix that I honestly don't know which was the one not working. :( That really sucks because it would help all of you that track bugs for a hobby :).
All I know is that it wasn't a very old version, I believe it was one of the "Elephant's Foot" version. Also it could not be too old because older versions like 1.02 and older do not even recognize the 4cc header of Nero AVC, and won't mux.

The software versions are written in your matroska files. So you can run mkvinfo on your b0rked files and you will known which version of mkvtoolnix was used :)