digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   Codecs: Libavcodec progress thread (http://www.digitalfaq.com/archives/encode/14153-codecs-libavcodec-progress.html)

Sagittaire 03-11-2006 11:00 AM

Codecs: Libavcodec progress thread
 
New setting available:

- New adaptative bframe decision
Smaller size with higher quality at constant quant. Bframe decision is very better.

- New Bframe refine
Quality for bframe is improved.

+ 0.2 dB for OPSNR for my MPEG2 file reference
+ 1.0 Pt for SSIM for my MPEG2 file reference

Code:

|-----------------|---------|---------|---------|---------|
| Codec          | Bitrate |  Size  |  OPSNR  |  SSIM 2 |
|-----------------|---------|---------|---------|---------|
| TMPGEnc        |  1803  |  28130  |  45.26  |  80.67  |
| CCE            |  1800  |  28179  |  45.83  |  78.76  |
| Canopus        |  1793  |  27956  |  46.49  |  82.49  |
| Mainconcept    |  1800  |  28200  |  45.21  |  80.54  |
| HC              |  1801  |  28252  |  46.24  |  81.53  |
| QuEnc (lavc)    |  1800  |  28210  |  46.94  |  83.00  |
| mencoder (lavc) |  1801  |  28207  |  47.47  |  84.79  |
| AQMatEnc (lavc) |  1800  |  28244  |  46.72  |  82.97  |
|-----------------|---------|---------|---------|---------|
SSIM 0: Lumimask Off
SSIM 2: Lumimask On (One2Tech Patch)


gamma 03-11-2006 12:33 PM

yeah, but maybe libavcodec should first be 100% dvd compliant.

I made a 1 minute long clip using libavcodec, and verified the MPEG stream. It gave MANY error, some of them I quoted below:

Quote:

>>> [MPEG] ERROR 1130 (ref. MPEG Systems 2.4.4.2 | 2.5.3.4) :
Pack_header SCR difference is 146.0;
It must be at least 146.85 or 43885 [27MHz ticks]
given a mux rate of 10.08 Mbits/s.
at byte 4 bit 2 of pack 1 (PS stream byte 2052).
>>> MPEG ERROR 1130 will no longer be reported !

>>> [MPEG-2] SYNTAX ERROR 2420 (ref. MPEG-2 Systems 2.1.47) :
PES_packet 3 reserved bits field is 0x0; all bits should be 1
in PES stream 0xE0 at byte 19 bit 4 (byte 19 of packet 0);
byte 33 of pack 1 (PS stream byte 2081).
>>> MPEG-2 SYNTAX ERROR 2420 will no longer be reported !

>>> [MPEG] ERROR 1551 (ref. MPEG Video 2.4.3.2 | 6.3.11) :
Sequence_header intra_quantiser_matrix[0] is 48, should be 8
for video sequence (0) at byte 11 bit 7;
PES (0xE0) byte 34 (byte 34 of packet 0);
byte 48 of pack 1 (PS stream byte 2096).
>>> MPEG ERROR 1551 will no longer be reported !
This goes on for a while, totaling too much (different) errors. Bear in mind that I made a 1 minute testclip, which was 10MB.

Quote:

************************************************** **********
*
* ERROR SUMMARY :
*
* 2 Informations
* No Recommendation violations
* No Oddities
* No Warnings
* 2 Syntax errors
* 19361 Errors
* 1 System error
*
************************************************** **********

Seems like you have a metric/objective test here which proves libavcodec has a long way to go :wink:

rds_correia 03-11-2006 12:45 PM

But remember: he is always right and there's no point in trying to make him believe he's not right... :?

Dialhot 03-11-2006 01:13 PM

Quote:

Originally Posted by gamma
yeah, but maybe libavcodec should first be 100% dvd compliant.

First let it be 100% MPEG2 compliant. After we will see for DVD ;)

Quote:

I made a 1 minute long clip using libavcodec, and verified the MPEG stream. It gave MANY error, some of them I quoted below:
Which tool are you using ?

Sagittaire 03-11-2006 01:39 PM

Quote:

yeah, but maybe libavcodec should first be 100% dvd compliant.
You can upload this 1 min source please:

- your source
- your avs script
- your bitrate
- your mencoder script
- tool for MPEG stream check

rds_correia 03-11-2006 02:17 PM

Oh please!! Cut us some slack...
Even if he tell's us what he used you will never stand corrected anyway :roll:

Sagittaire 03-11-2006 02:39 PM

Quote:

Originally Posted by rds_correia
Oh please!! Cut us some slack...
Even if he tell's us what he used you will never stand corrected anyway :roll:

I want source just for reproduce MPEG stream error. I can't find hard source to produce no compliant stream for my different SAP with mencoder. This source and tool for check mpeg stream too are really interessing for me ...

gamma 03-11-2006 05:13 PM

Quote:

Originally Posted by rds_correia
But remember: he is always right and there's no point in trying to make him believe he's not right... :?

:lol:

Quote:

Originally Posted by Dialhot
First let it be 100% MPEG2 compliant. After we will see for DVD

You're right :D

Quote:

Originally Posted by Dialhot
Which tool are you using ?

I'm using the Philips DVD Video Verifier tool. It can analyze MPEG2 files or
complete authored DVD's. For this test, I just analyzed the MPEG2 file.

Quote:

Originally Posted by Sagittaire
You can upload this 1 min source please:

- your source
- your avs script
- your bitrate
- your mencoder script
- tool for MPEG stream check

Doesn't matter, just encode a clip with libavcodec :wink:

rds_correia 03-11-2006 06:48 PM

Quote:

Originally Posted by gamma
I'm using the Philips DVD Video Verifier tool. It can analyze MPEG2 files or
complete authored DVD's.

Hey, that is known as the holy graal of DVD verifying tools :D.
No way we can be wrong about libavcodec now, right? :lol:

gamma 03-12-2006 04:53 AM

Quote:

Originally Posted by rds_correia
Quote:

Originally Posted by gamma
I'm using the Philips DVD Video Verifier tool. It can analyze MPEG2 files or
complete authored DVD's.

Hey, that is known as the holy graal of DVD verifying tools :D.
No way we can be wrong about libavcodec now, right? :lol:

You're absolutely right :D
I thought, let him see the metrics about it, which seems one of his favorite ways to test a video sample :lol:

Check this out, I just made the same clip with CCE, below are the full results 8)

Quote:


>>> [MPEG] SYNTAX ERROR 1106 :
Expecting packet_start_code etc. (Look Ahead : 0x000001B3)
at byte 0 bit 0 of pack 4294967295 (PS stream byte 0).
[Look Ahead : 0x00 0x00 0x01 0xB3 (len : 32 bit)]
>>> MPEG SYNTAX ERROR 1106 will no longer be reported !

************************************************** **********
*
* ERROR SUMMARY :
*
* 2 Informations
* No Recommendation violations
* No Oddities
* No Warnings
* 103 Syntax errors
* No Errors
* 1 System error
*
************************************************** **********
Speaks for itself, where libavcodec has 19361 errors, CCE has none 8)
But, CCE has more syntax errors, this is one error that occurs 103 times.


EDIT: added results for TMPG and HCenc:

HCenc:

Quote:

>>> [MPEG] SYNTAX ERROR 1106 :
Expecting packet_start_code etc. (Look Ahead : 0x000001B3)
at byte 0 bit 0 of pack 4294967295 (PS stream byte 0).
[Look Ahead : 0x00 0x00 0x01 0xB3 (len : 32 bit)]
>>> MPEG SYNTAX ERROR 1106 will no longer be reported !



************************************************** **********
*
* ERROR SUMMARY :
*
* 2 Informations
* No Recommendation violations
* No Oddities
* No Warnings
* 20 Syntax errors
* No Errors
* 1 System error
*
************************************************** **********
TMPG:


Quote:

>>> [MPEG] SYNTAX ERROR 1106 :
Expecting packet_start_code etc. (Look Ahead : 0x000001B3)
at byte 0 bit 0 of pack 4294967295 (PS stream byte 0).
[Look Ahead : 0x00 0x00 0x01 0xB3 (len : 32 bit)]
>>> MPEG SYNTAX ERROR 1106 will no longer be reported !



************************************************** **********
*
* ERROR SUMMARY :
*
* 2 Informations
* No Recommendation violations
* No Oddities
* No Warnings
* 28 Syntax errors
* No Errors
* 1 System error
*
************************************************** **********
Interesting to see that all three encoders have the same "error 1106". In CCE the quantity of this error is the most.

gamma 03-12-2006 03:21 PM

BTW, a screenshot from bitrateviewer which also need no words.
More objective than this isn't possible :)

Encoded using a libavcodec, max bitrate at 8000kbps, avg bitrate at 5000kbps. As you all can see, the bitrate spikes are through the roof, and SAP's will crash.

http://www.digitalfaq.com/archives/error.gif

Dialhot 03-12-2006 04:17 PM

The bitrate peak was already known, but the results from this MPEG2 analyzer are simply amazing :D

Sagittaire 03-12-2006 08:31 PM

1) Bitrate viewer can't help because maxbitrate is not frame bitrate but little part to complex vbv limitation. Bitrate can be ponctually very more than 9800 Kbps.

2) DVD-Video Verifier v1.5.0 is a very good tool for check DVD compliance. Now I can prove that Mencoder can make DVD MPEG2 Compliant stream:

I choose very hard source for Rate Control. IMO the hardest availables sources are 1080p Quick Time Trailer. I choose hard source with high motion and full real 16/9 screen like night watch trailer.

But if you want I can choose an other very hard source here ...
http://www.apple.com/trailers/

... or make complete encoding with DVD

Night watch trailer is very uncompressible source : your KDVD-720x576-Full-D1-PAL profil, CQ 70, Highest quality, Notch Matrix, Max Bitrate = 9500 Kbps done Video Elementary Stream at 3000 Kbps. I choose 3000 Kbps for make encoding withMencoder. I mux m2v stream with sonic scenarist (scenarist can check m2v DVD compliance too) or TMPG DVD Author to obtain vob+ifo and I check structure with DVD-Video Verifier v1.5.0:

Quote:

************************************************** ******************
*
* Bitstream input file = C:\NewsGroup\MENCODER\VIDEO_TS\VTS_01_1.VOB
*
* Input stream_type = MPEG-2 PRS
*
* P-STD buffer gnuplot file generation enabled.
*
* Scrambled data is skipped !
*
************************************************** ******************

>>> [DVD] INFORMATION 5604 (ref. DVD_xcheck) :
The script-file specified Display_mode 0 (720x480), but
the cross check file value for this field is 2 (352x480).
The script-file value will be used.
>>> DVD INFORMATION 5604 will no longer be reported !

>>> pack 0
>>> pack 100

>>> [DVD] ERROR 5801 (ref. DVD-3 4.2.5-3) :
The MAP_ENA (0x0079) specified by MAP_EN 3 with TMU 1, must be 0x0099 (current VOBU_SA)
because the VOBU_S_PTM is 291154 ticks and the VOBU_E_PTM is 345154 ticks. The start time
of the Cell which includes this VOBU is 21154 and the total time of previous Cells is 0
at byte 44 bit 0 of pack 153 (PS stream byte 313388).
>>> DVD ERROR 5801 will no longer be reported !

>>> pack 200

>>> [DVD] INFORMATION 3124 :
Pack contains only padding data
at byte 2048 bit 0 of pack 213 (PS stream byte 438272).
>>> DVD INFORMATION 3124 will no longer be reported !

>>> pack 300
...
>>> pack 29000


************************************************** **********
*
* ERROR SUMMARY :
*
* 94 Informations
* No Recommendation violations
* No Oddities
* No Warnings
* No Syntax errors
* 9 Errors
* No System errors
*
************************************************** **********

I make the same check with TMPGEnc encoding:

Quote:

************************************************** ******************
*
* Bitstream input file = C:\NewsGroup\TMPGENC\VIDEO_TS\VTS_01_1.VOB
*
* Input stream_type = MPEG-2 PRS
*
* P-STD buffer gnuplot file generation enabled.
*
* Scrambled data is skipped !
*
************************************************** ******************

>>> [DVD] INFORMATION 5604 (ref. DVD_xcheck) :
The script-file specified Display_mode 0 (720x480), but
the cross check file value for this field is 2 (352x480).
The script-file value will be used.
>>> DVD INFORMATION 5604 will no longer be reported !

>>> pack 0

>>> [DVD] WARNING 3376 (ref. DVD-3 5.4.1.2.1 (6)) :
Sequence_display_extension : matrix_coefficients value is 4,
which is different from the default values 5 or 6
for video sequence (0) at byte 157 bit 0;
PES ($E0) byte 179 (byte 179 of packet 0);
byte 193 of pack 1 (PS stream byte 2241).
>>> DVD WARNING 3376 will no longer be reported !

>>> pack 100
>>> pack 200

>>> [DVD] INFORMATION 3124 :
Pack contains only padding data
at byte 2048 bit 0 of pack 248 (PS stream byte 509952).
>>> DVD INFORMATION 3124 will no longer be reported !


>>> [DVD] ERROR 5801 (ref. DVD-3 4.2.5-3) :
The MAP_ENA (0x010D) specified by MAP_EN 5 with TMU 1, must be 0x0125 (current VOBU_SA)
because the VOBU_S_PTM is 471154 ticks and the VOBU_E_PTM is 525154 ticks. The start time
of the Cell which includes this VOBU is 21154 and the total time of previous Cells is 0
at byte 44 bit 0 of pack 293 (PS stream byte 600108).
>>> DVD ERROR 5801 will no longer be reported !

>>> pack 300
......
>>> pack 29100


************************************************** **********
*
* ERROR SUMMARY :
*
* 19 Informations
* No Recommendation violations
* No Oddities
* 278 Warnings
* No Syntax errors
* 13 Errors
* No System errors
*
************************************************** **********

Conclusion: My Mencoder Stream with my Mencoder Setting (Multipass, quantizer blur, quantizer range, highest quality setting, HVS optimisation ...) are perfectly MPEG2 DVD compliant without MPEG2 fatal error like underflow. Download my sample and try to find incompatible SAP if you want.


@ gamma

- thank's gamma for this link to DVD-Video Verifier
- Upload your little clip source if you want ... I will make compliant libavcodec encoding

gamma 03-13-2006 01:44 AM

@dailhot
I'm liking this tool too :D
I think it's very interesting to see that even the accepted/proven encoders produce errors. The ultimate test I think is still to burn on RW
and put it in the SAP.


@sagittaire

1) I find it very hard to believe that after all this mpeg2-compliancy discussions, you suddenly (within a day) bought the Philips DVD Verifier software, after I posted results here. I'm strongly thinking that you used w@rez for this.

2) OK, now burn it on a RW and put it in your SAP.

3) Nice results. I wonder why they differ so much from my findings. I find it hard to believe that you produced a stream with totally no errors. Verify a original (as in: bought) DVD, you'll see what I mean.

4) Have you made full-D1 or half-D1?

5) For the record: I posted no link, I don't want any affiliation with you obtaining this tool at probably an illeg@l way.

6) I must admit, encodings with libavcodec look good. But they also do with TMPG and CCE. And those are the mainstream encoders, which files will play in any SAP. As long as libavcodec has it's problems (ratecontrol), it just won't cut it.

Sagittaire 03-13-2006 04:53 AM

Quote:

1) I find it very hard to believe that after all this mpeg2-compliancy discussions, you suddenly (within a day) bought the Philips DVD Verifier software, after I posted results here. I'm strongly thinking that you used w@rez for this.
http://www.licensing.philips.com/ser...ments1051.html

Use just for evaluation. Anyway test complete DVD is very very very slow ... perhaps more than complete reencoding. For me useless because I always know that my mencoder encoding was DVD compliant. At this time DVD-Video Verifier v1.5.0 is unintalled ...


Quote:

2) OK, now burn it on a RW and put it in your SAP.
Work perfectly on my SAP (Philips DVP-720, H&B AV512, and Siemssen SCO 5000 ND), Work perfectly on all other SAP tested with complete DVD encoding. I can make mencoder stream purpose testing on DVD forum and post complete compatible SAP list here if you want.


Quote:

3) Nice results. I wonder why they differ so much from my findings. I find it hard to believe that you produced a stream with totally no errors. Verify a original (as in: bought) DVD, you'll see what I mean.
All my MPEG2 "low bitrate" encoding are always make with mencoder. I like to make MPEG2 encoding for 8 cm DVD. I make recently Star Wars Ripp with mencoder without problem.

Quote:

4) Have you made full-D1 or half-D1?
No advanced test because I use only mencoder for low bitrate encoding ... but it's possible to make 5 Mbps encoding with mencoder.


Quote:

5) For the record: I posted no link, I don't want any affiliation with you obtaining this tool at probably an illeg@l way.
http://www.licensing.philips.com/ser...ments1051.html


Quote:

6) I must admit, encodings with libavcodec look good. But they also do with TMPG and CCE. And those are the mainstream encoders, which files will play in any SAP. As long as libavcodec has it's problems (ratecontrol), it just won't cut it.
Use mencoder for make super-bit DVD is useless. I use Mencoder just for very hard encoding in very hard condition.

gamma 03-13-2006 05:21 AM

Well, you didn't answer all my questions, but I think the keyword is "low-bitrate".

I think you're just lucky, when you encode at low-bitrate, the spikes are probably less high. It's just a timebomb.

BTW, HCenc gives nice results also, and hasn't got the ratecontrol problem.

Dialhot 03-13-2006 06:32 AM

Quote:

Originally Posted by Sagittaire
Quote:

1) I find it very hard to believe that after all this mpeg2-compliancy discussions, you suddenly (within a day) bought the Philips DVD Verifier software, after I posted results here. I'm strongly thinking that you used w@rez for this.
http://www.licensing.philips.com/ser...ments1051.html

I just tried and IT IS NOT POSSIBLE to use the tool without registering it first. :roll:

gamma 03-13-2006 06:48 AM

Quote:

Originally Posted by Dialhot
Quote:

Originally Posted by Sagittaire
Quote:

1) I find it very hard to believe that after all this mpeg2-compliancy discussions, you suddenly (within a day) bought the Philips DVD Verifier software, after I posted results here. I'm strongly thinking that you used w@rez for this.
http://www.licensing.philips.com/ser...ments1051.html

I just tried and IT IS NOT POSSIBLE to use the tool without registering it first. :roll:

Yes I suspected that. I guess we will have to make conclusions about the further credibility of sagittaire.
If he misleads us with this, I wouldn't rule out hasseling with testresults because "he is always right" :?

Sagittaire 03-13-2006 07:28 AM

Quote:

Originally Posted by gamma
Well, you didn't answer all my questions, but I think the keyword is "low-bitrate".

min available quantizer is in fact 2 for mencoder (minor bug in mencoder with x2 scale quantizer in mencoder) with custom matrix always > 16. For good security with RC you must target more than average q4 encoding with mencoder. Make "high bitrate (low average quantizer)" with mencoder is in practice useless and very difficult because:
- MPEG2 Q4 is for me high quality encoding. For example CQ 80 in TMPGEnc make encoding at ~ quantizer 4
- I use only Mencoder for make MPEG2 encoding in hardest conditions not for make super-bit DVD.
- Make "high bitrate" is certainely not the KDVD profil objective too


Quote:

I think you're just lucky, when you encode at low-bitrate, the spikes are probably less high. It's just a timebomb.
Quick Time Trailer are from my experience very hardest than DVD complexity. It's easy for me to make DVD ripp with mencoder but not with these trailers (more than 3 pass are sometimes necessary)

Choose some source here
http://www.apple.com/trailers/

And try to make mencoder encoding without underflow. I can make DVD compliant encodings for all these trailer (with equivalent bitrate < CQ 80 for TMPGEnc)
http://multimediacom.free.fr/Video/MENCODER.rar

Sagittaire 03-13-2006 07:47 AM

Quote:

Yes I suspected that. I guess we will have to make conclusions about the further credibility of sagittaire.
And my english is very bad too ... don't forget that for my credibility ... :roll:

Quote:

Use just for evaluation. Anyway test complete DVD is very very very slow ... perhaps more than complete reencoding. For me useless because I always know that my mencoder encoding was DVD compliant. At this time DVD-Video Verifier v1.5.0 is unintalled ...
It's perhaps not legal but if I want log (and particullary 500$ log) I will try it always before. I try it for some sample. Too slow for complete check and DVD-Video Verifier v1.5.0 say only something that always know: "mencoder can done DVD compliant stream". DVD-Video Verifier v1.5.0 is unintalled now. But my english or licence for this log is not problem here.

I always just say:
Mencoder can make DVD compliant stream

You say:
Mencoder can't make DVD compliant stream. DVD-Video Verifier v1.5.0 prove it

I say:
Mencoder can make DVD compliant stream. DVD-Video Verifier v1.5.0 prove it

If you can't make compliant stream with mencoder it's simply because you don't use the good CLI. Upload your sample. I upload encoding with mencoder profil CLI for reproduce the encoding ... :idea:

For example only the third pass in my CLI done compliant stream for some Quick Time Trailer:


All times are GMT -5. The time now is 05:59 PM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.