PDA

View Full Version : Application for adding Pulldown to AVC streams (For H/W testing purposes)?


SeeMoreDigital
22nd September 2009, 12:51
I need to carry out some MPEG-4 AVC tests in hardware players. One of the tests involves their ability to detect pullown flags in AVC streams, within various containers.

Thanks to Neuron2 we have an application that can add pull-down flags to elementary MPEG-2 streams. But are there any applications that can do the same for AVC streams?


Many thanks

honai
22nd September 2009, 13:44
Since madshi can remove pulldown flags from AVC streams with eac3to, he might also know how to add them. Ask him.

shon3i
22nd September 2009, 14:08
AFAIK tool "h264info" by Trahald can add Pulldown to AVC streams.

SeeMoreDigital
22nd September 2009, 15:29
AFAIK tool "h264info" by Trahald can add Pulldown to AVC streams.Okay... I've just tried using h264info Alpha .26. Sadly, DGAVCIndex can't open the resulting muxes: -

http://img87.imageshack.us/img87/5572/dgavcindexreport.png

Looks like the file is b0rked....

SeeMoreDigital
23rd September 2009, 18:54
If there's anybody here who knows how to add the pull-down flags to progressive AVC streams. Here's a sample: -

http://www.one.seemoredigital.net/Downloads/Source_AVC@23.976fps_without_pull-down.zip


Many thanks

neuron2
23rd September 2009, 19:02
I have a personal app that can do it. I will test it on your sample.

Do you have control of the video? Can you add VUI? My app currently requires VUI to be present, although I could add it.

SeeMoreDigital
23rd September 2009, 19:09
I have a personal app that can do it. I will test it on your sample.Hey, thanks Donald...

Would you be able to provide me with your revised sample, so I can test it in my hardware players please?


Many thanks

neuron2
23rd September 2009, 20:18
As mentioned in my edit, I have to add the VUI data. Maybe tonight or tomorrow.

SeeMoreDigital
23rd September 2009, 21:21
As mentioned in my edit, I have to add the VUI data. Maybe tonight or tomorrow.Sorry, I missed the edited part of your post entirely!

To be honest, I don't understand the benefits "video usability information" has to offer. Is there individual criteria for different hardware and software players?

neuron2
23rd September 2009, 21:47
Pulldown is done with the pic_struct syntax element in pic timing SEIs. The presence or absence of the pic_struct syntax element is signalled by the field pic_struct_present_flag in the vui_parameters. The latter also signals the presence/absence of VCL and NAL HRD info.

Where did the source come from? I'm surprised there is no VUI data.

SeeMoreDigital
23rd September 2009, 22:24
Where did the source come from? I'm surprised there is no VUI data.That particular 35 second clip was extracted from the "THX Testing" section of the Star Wars region 1 DVD.

I used DGpulldown to remove the pull-down flags from the MPEG-2 stream prior to encoding to AVC using AutoMKV.

So far I've been able to generate the following files, in various containers, for testing in hardware players: -

MPEG-2@29.970 with pulldown in .ISO
MPEG-2@29.970 with pulldown in .MKV
MPEG-2@29.970 with pulldown in .MPG
MPEG-2@29.970 with pulldown in .TS

MPEG-2@23.976 without pulldown in .MKV
MPEG-2@23.976 without pulldown in .MPG
MPEG-2@23.976 without pulldown in .TS
----------------------------------------
AVC@23.976 without pulldown in .AVI
AVC@23.976 without pulldown in .MKV
AVC@23.976 without pulldown in .MP4
AVC@23.976 without pulldown in .MOV
AVC@23.976 without pulldown in .TS


Cheers

neuron2
23rd September 2009, 22:32
Hmm, that's strange, because I thought x264.exe generated VUI data. I'll investigate.

kemuri-_9
23rd September 2009, 22:45
Hmm, that's strange, because I thought x264.exe generated VUI data. I'll investigate.

x264 does generate VUI data but does not support pulldown (yet):

bs_write1( s, 0 ); /* nal_hrd_parameters_present_flag */
bs_write1( s, 0 ); /* vcl_hrd_parameters_present_flag */
bs_write1( s, 0 ); /* pic_struct_present_flag */


see encoder/set.c, x264_sps_init and x264_sps_write for the full details

neuron2
23rd September 2009, 23:51
Sure, I know it doesn't support pulldown.

But how did SMD make a stream without VUI?

neuron2
24th September 2009, 00:04
core 66 r1092 60f4cd8

Is that some ancient or patched version of x264?

Dark Shikari
24th September 2009, 00:05
core 66 r1092 60f4cd8

Is that some ancient or patched version of x264?If there's no "M", it is supposed to not have been modified. There are sites that use hacked versions of x264 though (e.g. Youtube).

neuron2
24th September 2009, 00:09
If there's no "M", it is supposed to not have been modified. There are sites that use hacked versions of x264 though (e.g. Youtube). OK, thanks, Dark.

@SMD

Please re-encode with the most recent stock x264.exe so that we have VUI in your stream.

SeeMoreDigital
24th September 2009, 19:47
@SMD

Please re-encode with the most recent stock x264.exe so that we have VUI in your stream.I've generated another x264 encode using todays build of Buzzqw's HDConvertToX v.2.1.458.3528 (with x264 core 70 r1206M 9a54c48).

Is this one okay: -

http://www.one.seemoredigital.net/Downloads/Source_AVC@23.976fps_without_pull-down.zip


Cheers all

Blue_MiSfit
24th September 2009, 20:04
@SMD - that build is still ~50 revs out of date, and who knows what patches were applied..

I'd suggest getting clean builds from http://x264.nl/

~MiSfit

neuron2
24th September 2009, 20:42
That one has VUI, so let me test with it.

SeeMoreDigital
24th September 2009, 20:50
@SMD - that build is still ~50 revs out of date, and who knows what patches were applied..

I'd suggest getting clean builds from http://x264.nl/What am I like!?

Okay I've generated "yet another" x264 encode using todays build of Buzzqw's HDConvertToX v.2.1.458.3528 (this time with x264 core 76 r1271 496d79d).

Here you go: -

http://www.one.seemoredigital.net/Downloads/Source_AVC@23.976fps_without_pull-down_3.zip


Cheers

neuron2
24th September 2009, 23:28
I have it working on your file. The pulldown is honored in the latest VLC player but not by Sonic Cinemaster running in MPC, which surprises me a bit.

What do you plan to test this on?

The code is so messy right now and makes some assumptions that happen to be satisfied by your source file that I really don't want to release it at this time. But if you want me to run it on a longer file, let me know. Otherwise I'll give you your uploaded one back with pulldown.

SeeMoreDigital
24th September 2009, 23:43
I have it working on your file. The pulldown is honored in the latest VLC player but not by Sonic Cinemaster running in MPC, which surprises me a bitHmmm... I wonder whether TSmuxerGUI can detect it!

What do you plan to test this on?I'm currently testing an Xtreamer (http://shop.xtreamer.net/) hardware player.

Currently, the Xtreamer is able to detect pull-down in MPEG-2 streams in some, not all containers. For which I have submitted a bug report. I would like to perform similar tests with AVC streams.

The code is so messy right now and makes some assumptions that happen to be satisfied by your source file that I really don't want to release it at this time. But if you want me to run it on a longer file, let me know. Otherwise I'll give you your uploaded one back with pulldown . Thanks Donald. I reckon the current file length will be fine for my purposes... Any longer and I might start nodding off ;)


Many, many thanks for your help...

neuron2
25th September 2009, 02:00
I uploaded the pulled down file:

http://neuron2.net/misc/smd.pulldown.264

Let us know how it plays.

SeeMoreDigital
25th September 2009, 17:00
Thanks Donald,

I muxed the AVC stream you provided into the .MP4 container, using YAMB and MP4muxer. The .MOV container using QuickTime Pro. The .M2TS container, using TSmuxer and the .MKV container, using MKVmergeGUI - (Oh, and the .AVI container using AVC2AVI+GUI).

I'm happy to report the Xtreamer was able to detect the pull-down flags for all the containers. It was also able to pass a 24Hz processing signal (for detection by suitable TV's) via the .MP4, .MOV and .AVI containers.


Just so as you know....

When I muxed the AVC stream into the .M2TS container repeatedly reported "Bad SEI detected. SEI too short". It was also unable to detect pull-down flags within the stream.

And MediaInfo was unable to report any data for the elementary stream.


Many thanks again Donald.

neuron2
25th September 2009, 19:22
When I muxed the AVC stream into the .M2TS container repeatedly reported "Bad SEI detected. SEI too short". It was also unable to detect pull-down flags within the stream. I'll take a look at it, but it may be a tsmuxer problem.

neuron2
29th September 2009, 20:13
My SEIs are indeed incorrect. I'll fix it and re-upload your pulled-down video. Test results with the one already supplied are null and void.

EDIT: It may work in some players and not others. Let's make a fully correct one, especially for testing hardware!

SeeMoreDigital
30th September 2009, 10:39
Thanks Donald...

neuron2
2nd October 2009, 01:55
I've re-uploaded the corrected file:

http://neuron2.net/misc/smd.pulldown.264

Please test and advise.

SeeMoreDigital
2nd October 2009, 12:02
Hi Donald. Thanks for the new sample...


The good news is: -
MediaInfo can read the properties of the elementary stream.
TSmuxer can detect the elementary stream contains pull-down.

The not so good news is: -

TS/M2TS muxes generated by TSmuxer look "animated" during playback.
TSmuxer is unable to remove pull-down from the elementary stream or from a muxed .TS/.M2TS file.
MP4 muxes generated by YAMB are "speeded-up" during playback.


Cheers

neuron2
2nd October 2009, 14:57
TS/M2TS muxes generated by TSmuxer look "animated" during playback. What do you mean by that? Are you talking about normal pulldown judder?

TSmuxer is unable to remove pull-down from the elementary stream or from a muxed .TS/.M2TS file.

MP4 muxes generated by YAMB are "speeded-up" during playback. These are deficiencies of these programs, not of the applied pulldown.