Does QT support 1920X1080@High Level 4 (50,60fps MBAFF) codec?

Hi,


I am working one a project which needs to create a set of MP4 files for different profile@level with different frame coding (interlaced or progressive),


Now I have a issue about a stream which uses the following profile:

------------------------------------------------

resolution : 1920 X 1080

display aspect ratio : 16:9

bit rate mode: VBR

maximum bit rate: 25000

frame rate: 60fps

frame coding: interlaced. (MBAFF).

------------------------------------------------


I use ffmpeg to convert an AVI file into the mp4 stream file by using the following parameters.


-c:v libx264 \

-profile:v high444 \

-level:v 4 \

-s 1920x1080 \

-aspect 16:9 \

-b:v 25000k \

-nal-hrd vbr \

-tune animation \

-r 60 \

-flags +ildct+ilme \

-movflags frag_keyframe \

-x264opts tff:ref=4:qpmin=4:vbv-maxrate=25000:vbv-bufsize=2750



The problem I had is that the mp4 stream file plays well on VLC but is really jerky on Quicktime(10.2) on Mac ( OS X Version 10.8.3, Processor 2.3GHz, Intel Core i5, Memory 8GB), and no matter how I decrease the frame rate to 24fps or change the level up to 5 or slightly change the parameters, the result of playback on QT is just bad.


Could anyone here to tell me how the QT support 1080i? or any suggestions?


Many thanks


Best regards,

Monica.

MacBook Pro, OS X Mountain Lion (10.8.3)

Posted on Oct 15, 2013 9:28 AM

Reply
6 replies

Oct 15, 2013 5:56 PM in response to monica.mao

The problem I had is that the mp4 stream file plays well on VLC but is really jerky on Quicktime(10.2) on Mac ( OS X Version 10.8.3, Processor 2.3GHz, Intel Core i5, Memory 8GB), and no matter how I decrease the frame rate to 24fps or change the level up to 5 or slightly change the parameters, the result of playback on QT is just bad.

You have not mentioned the actual data rate of the resulting file or the effective frame rate when being played back in the QT player app. Basically you are limiting the target data rate to 1080i BD levels which means the QT player could be dropping frames during playback which is what it is programmed to do when it cannot render frames fast enough to keep up with data throughput. The easiest way to see if this is happening is to play the file in the QT 7 player and compare the the encoded target frame rate with the actual playback frame rate. If there is a major discrepancy between the two, then that would probably explain the jerky playback in the QT X v10.2 player. (I.e., changing the frame rate does not necessarily change the data rate but how the data is allocated to the frames over time. E.g., an average 20 Mbps file delivers an average of 20 Mbs of data per second whether the data is distributed between 24, 30, or 60 frames in that same second.)



Could anyone here to tell me how the QT support 1080i? or any suggestions?

Depending on the source of the 1080i60 data, I would probably try to detelecine to 24 fps or deinerlace to 30 fps and reduce the data rate limit to something in the 14.0 Mbps to 17.0 Mbps range depending on data rate excursion requirements.


User uploaded file

Oct 16, 2013 3:07 AM in response to Jon Walker

Hi Jon Walker,


Really thanks for your quick response, I never thought I can get reply so soon.


You have not mentioned the actual data rate of the resulting file or the effective frame rate when being played back in the QT player app.

The actual attributes of the resulting file from the ffmpeg is below (you can see the actual bit rate and other features)

------------------------------------------------------------

Stream overall bit rate : 14.1 Mbps

Format : AVC

Format/Info : Advanced Video Codec

Format profile : High@L4.0

Format settings, CABAC : Yes

Format settings, ReFrames : 4 frames

Codec ID : avc1

Codec ID/Info : Advanced Video Coding

Duration : 9mn 56s

Duration_FirstFrame : 9ms

Bit rate mode : Variable

Bit rate : 13.9 Mbps

Nominal bit rate : 25.0 Mbps

Maximum bit rate : 25.0 Mbps

Width : 1 920 pixels

Height : 1 080 pixels

Display aspect ratio : 16:9

Frame rate mode : Constant

Frame rate : 60.000 fps

Color space : YUV

Chroma subsampling : 4:2:0

Bit depth : 8 bits

Scan type : MBAFF

Bits/(Pixel*Frame) : 0.112

Stream size : 989 MiB (99%)

----------------------------------------------------------------------------

I don't know the effective frame rate being played back in QT with the profile I mentioned, but I know two facts from other streams I built

1 - Same profile but with progressive frame coding (I tried 30fps and 50fps) is played well in QT 10.2 on Mac, but is jerky in QT 7.7.4 on windows. the actual attributes of the resulting file is below ( then you can compare it with the above one)

------------------------------------------------------------------------------

Stream overall bit rate : 14.3 Mbps

Format : AVC

Format/Info : Advanced Video Codec

Format profile : High@L4.0

Format settings, CABAC : Yes

Format settings, ReFrames : 4 frames

Codec ID : avc1

Codec ID/Info : Advanced Video Coding

Duration : 9mn 56s

Bit rate mode : Variable

Bit rate : 14.2 Mbps

Nominal bit rate : 25.0 Mbps

Maximum bit rate : 25.0 Mbps

Width : 1 920 pixels

Height : 1 080 pixels

Display aspect ratio : 16:9

Frame rate mode : Constant

Frame rate : 30.000 fps

Color space : YUV

Chroma subsampling : 4:2:0

Bit depth : 8 bits

Scan type : Progressive

Bits/(Pixel*Frame) : 0.228

Stream size : 1 009 MiB (99%)

--------------------------------------------------------------------------------

This is why in the beginning I will think about the QT does not support interlaced frame coding with hight profile.


2- Another stream is built with the profile (MP@L2, 640x480, 4:3, CBR, 60i, max bit rate = 8000 kbps) is played well in the QT, I guess probably the reason for this is the data bit rate like you said is much lower.

Basically you are limiting the target data rate to 1080i BD levels which means the QT player could be dropping frames during playback which is what it is programmed to do when it cannot render frames fast enough to keep up with data throughput. The easiest way to see if this is happening is to play the file in the QT 7 player and compare the the encoded target frame rate with the actual playback frame rate.


I am not sure how to do the comparison, how can I know the actual playback frame rate😟?

If there is a major discrepancy between the two, then that would probably explain the jerky playback in the QT X v10.2 player. (I.e., changing the frame rate does not necessarily change the data rate but how the data is allocated to the frames over time. E.g., an average 20 Mbps file delivers an average of 20 Mbs of data per second whether the data is distributed between 24, 30, or 60 frames in that same second.)

It makes sence to me:), For your information, the source file I am using is the famous ("big buck bunny")

Stream overall bit rate : 12.5 Mbps

Format : MPEG-4 Visual

Format profile : Simple@L1

Format settings, BVOP : No

Format settings, QPel : No

Format settings, GMC : No warppoints

Format settings, Matrix : Default (H.263)

Codec ID : FMP4

Duration : 9mn 56s

Bit rate : 12.0 Mbps

Width : 1 920 pixels

Height : 1 080 pixels

Display aspect ratio : 16:9

Frame rate : 24.000 fps

Color space : YUV

Chroma subsampling : 4:2:0

Bit depth : 8 bits

Scan type : Progressive

Compression mode : Lossy

Bits/(Pixel*Frame) : 0.241

Stream size : 854 MiB (96%)


Depending on the source of the 1080i60 data, I would probably try to detelecine to 24 fps or deinerlace to 30 fps and reduce the data rate limit to something in the 14.0 Mbps to 17.0 Mbps range depending on data rate excursion requirements.

I will give a try to 24 fps with 14 Mps as maximum bit, let you know the result.


Thanks again for your information!


Best regards,

Monica.

Oct 16, 2013 4:38 AM in response to monica.mao

The actual attributes of the resulting file from the ffmpeg is below (you can see the actual bit rate and other features)

------------------------------------------------------------

Stream overall bit rate : 14.1 Mbps

Format : AVC

Format/Info : Advanced Video Codec

Format profile : High@L4.0

Format settings, CABAC : Yes

Format settings, ReFrames : 4 frames

Codec ID : avc1

Codec ID/Info : Advanced Video Coding

Duration : 9mn 56s

Duration_FirstFrame : 9ms

Bit rate mode : Variable

Bit rate : 13.9 Mbps

Nominal bit rate : 25.0 Mbps

Maximum bit rate : 25.0 Mbps

Width : 1 920 pixels

Height : 1 080 pixels

Display aspect ratio : 16:9

Frame rate mode : Constant

Frame rate : 60.000 fps

Color space : YUV

Chroma subsampling : 4:2:0

Bit depth : 8 bits

Scan type : MBAFF

Bits/(Pixel*Frame) : 0.112

Stream size : 989 MiB (99%)

----------------------------------------------------------------------------

I don't know the effective frame rate being played back in QT with the profile I mentioned, but I know two facts from other streams I built

1 - Same profile but with progressive frame coding (I tried 30fps and 50fps) is played well in QT 10.2 on Mac, but is jerky in QT 7.7.4 on windows. the actual attributes of the resulting file is below ( then you can compare it with the above one)

------------------------------------------------------------------------------

Stream overall bit rate : 14.3 Mbps

Format : AVC

Format/Info : Advanced Video Codec

Format profile : High@L4.0

Format settings, CABAC : Yes

Format settings, ReFrames : 4 frames

Codec ID : avc1

Codec ID/Info : Advanced Video Coding

Duration : 9mn 56s

Bit rate mode : Variable

Bit rate : 14.2 Mbps

Nominal bit rate : 25.0 Mbps

Maximum bit rate : 25.0 Mbps

Width : 1 920 pixels

Height : 1 080 pixels

Display aspect ratio : 16:9

Frame rate mode : Constant

Frame rate : 30.000 fps

Color space : YUV

Chroma subsampling : 4:2:0

Bit depth : 8 bits

Scan type : Progressive

Bits/(Pixel*Frame) : 0.228

Stream size : 1 009 MiB (99%)

--------------------------------------------------------------------------------

This is why in the beginning I will think about the QT does not support interlaced frame coding with hight profile.

A 1080i60 file should be compatible with QT using High@L4.0 but a 1080p60 would probably not be compatible sice it is non-standaard. You would have to use High@L4.2 for a 1080p50 or 1080p60 to be within standards. See chart below:


User uploaded file


As to the effective frame rate, as mentioned before, check the frame rate using the QT 7 player app. I.e., open the "Inspector" window and compare the target encode frame rate of the file with the effective frame rate during playback. See image beloow:


User uploaded file



2- Another stream is built with the profile (MP@L2, 640x480, 4:3, CBR, 60i, max bit rate = 8000 kbps) is played well in the QT, I guess probably the reason for this is the data bit rate like you said is much lower.

Once again, check the properties standards chart posted above. As you can see, smaller display frames support faster frame rates. My initial worry was that you were encoding the files at or near the targeted data rate limit. If true, the QT players are programmed to start dropping frames when a particular system cannot render the frames at the targeted frame rate because the player is trying to render more data per frame than the player/system combination can handle. Thus, an older system with less CPU power can begin dropping frames sooner than a newer more powerful system. I.e., playback can become very jerky on either system depending on how many consecutive frames are being dropped—it just takes the newer system longer to reach this point of data saturation. Luckily, your source file is less complex, graphically speaking, and has a moderate but not excessively high data rate. Since the AVC codec tends to only use as much of the allowed target data rate as it feels necessary, you resulting files seem to be well below the data saturation level I would normally expect.



I am not sure how to do the comparison, how can I know the actual playback frame rate😟?

See comment above regarding the QT 7 "Inspector" window. (I keep both QT X and QT 7 Pro installed on my systems.)



It makes sence to me:), For your information, the source file I am using is the famous ("big buck bunny")

Stream overall bit rate : 12.5 Mbps

Format : MPEG-4 Visual

Format profile : Simple@L1

Format settings, BVOP : No

Format settings, QPel : No

Format settings, GMC : No warppoints

Format settings, Matrix : Default (H.263)

Codec ID : FMP4

Duration : 9mn 56s

Bit rate : 12.0 Mbps

Width : 1 920 pixels

Height : 1 080 pixels

Display aspect ratio : 16:9

Frame rate : 24.000 fps

Color space : YUV

Chroma subsampling : 4:2:0

Bit depth : 8 bits

Scan type : Progressive

Compression mode : Lossy

Bits/(Pixel*Frame) : 0.241

Stream size : 854 MiB (96%)

I only have a 640x360 letterboxed in a 640x480 display for comparison so this information was helpful. My only question is why you would want to transcode the file and take the chance of losing quality and/or adding artifacts?



I will give a try to 24 fps with 14 Mps as maximum bit, let you know the result.

Had originally assumed your source file was a 1080i60 and assumed you might be trying to convert it to a progressive scan for use with most modern HDTVs, monitors, and mobile devices. Would normally never recommend changing the frame rate if it can be avoided.


User uploaded file

Oct 16, 2013 4:50 AM in response to monica.mao

I tried to encode with 24fps and 14 Mps, the result is better, but is still jerky 😟?


Any other suggestion?

What did you use as the source file? If source file was the 24 fps file mentioned above, did you us a declared "24 fps" or "current" encode setting. Since I'm not sure if you literally mean 24 fps or (24 fps x1000) / 1001 = 23.976 fps, I always recommend no change to frame rate as it can introduce skipped or duplicated frames. And, if I must modifiy the frame rate, it is only using algorythms other than the simple/traditional drop/duplicate algorythms—e.g., frame blending or varying the frame rate.


User uploaded file

Oct 16, 2013 7:09 AM in response to Jon Walker

Hi Jon,


Thanks for answering my question again, Bascially the project I am working is to create different MP4 testing materials based on the same source file ("big buck bunny" AVI file: 1920x1080 24 fps progressive)

for a custom who will use these materials to test digital TV. So just like you said, it is very likely to cause losing the quality depending on which profile is chosen, especially we use the ffmpeg which uses drop/duplicate alorigthm for convering the frame rate (possibly there is other parameter or other way to do, I need to do more investigation). Other streams files using lower profile@level and small resolution, the problem is not very obvious, but once the high profile@high level with high frame rate is used, the problem starts to be noticed.


Your explanation for causing jerky in player makes much sense to me because the player behaves just like you said, if the movie's quality is fine, the encoded frame rate is quite close to the actual frame rate, but for the above bad streams I mentioned, there is big gap between the two values and the player seems trying to catch up the speed by droping some frame or skiping some frame.


Now I have to sit back to digest and learn more knowledge about video endoding, think more carefully about all the profiles and the way transcoding the stream again (I am going to analyse the streams one by one use QT inspector and other tools), actually my customer does not mind to change the profile slightly, but I just did not have any idea to decide how I change the profile slightly to make the quality of the movie much better. I think at least I will try not to change the frame rate and find proper data rate. Btw the frame rate I said is the value (frames per second) I used in ffmpeg as input parameter, if the requirement says uses 23.976, I will use this value instead, so I guess it is literally frame rate ( to be honest, I don't know the difference between them).


Your information is very very helpful, I searched all over the internet to try to find some information but it is so hard. I will let you know the result once I get one:).


Many thanks


Best regards,

Monica.


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Does QT support 1920X1080@High Level 4 (50,60fps MBAFF) codec?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.