[RESOLVED] MPEG-1/MPEG-2 detection,...

Support forum for DGDecNV
Post Reply
User avatar
Selur
Posts: 134
Joined: Mon Nov 05, 2012 3:49 pm
Location: Germany
Contact:

[RESOLVED] MPEG-1/MPEG-2 detection,...

Post by Selur »

Got a file burosch1.mpg (29MB on GoogleDrive) which
ffmpeg reports as:

Code: Select all

Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, bottom first), 720x576 [SAR 64:45 DAR 16:9], 8000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
MediaInfo reports as:

Code: Select all

General
Count                                    : 328
Count of stream of this kind             : 1
Kind of stream                           : General
Kind of stream                           : General
Stream identifier                        : 0
Count of video streams                   : 1
Video_Format_List                        : MPEG Video
Video_Format_WithHint_List               : MPEG Video
Codecs Video                             : MPEG-2 Video
Complete name                            : f:\TestClips&Co\files\interlaceAndTelecineSamples\interlaced\burosch1.mpg
Folder name                              : f:\TestClips&Co\files\interlaceAndTelecineSamples\interlaced
File name                                : burosch1
File extension                           : mpg
Format                                   : MPEG-PS
Format                                   : MPEG-PS
Format/Extensions usually used           : mpeg mpg m2p vob pss evo
Commercial name                          : MPEG-PS
Internet media type                      : video/MP2P
Codec                                    : MPEG-PS
Codec                                    : MPEG-PS
Codec/Extensions usually used            : mpeg mpg m2p vob pss evo
File size                                : 30111744
File size                                : 28.7 MiB
File size                                : 29 MiB
File size                                : 29 MiB
File size                                : 28.7 MiB
File size                                : 28.72 MiB
Duration                                 : 30000
Duration                                 : 30 s 0 ms
Duration                                 : 30 s 0 ms
Duration                                 : 30 s 0 ms
Duration                                 : 00:00:30.000
Duration                                 : 00:00:30:00
Duration                                 : 00:00:30.000 (00:00:30:00)
Overall bit rate mode                    : CBR
Overall bit rate mode                    : Constant
Overall bit rate                         : 8029798
Overall bit rate                         : 8 030 kb/s
Frame rate                               : 25.000
Frame rate                               : 25.000 FPS
Frame count                              : 750
Stream size                              : 599225
Stream size                              : 585 KiB (2%)
Stream size                              : 585 KiB
Stream size                              : 585 KiB
Stream size                              : 585 KiB
Stream size                              : 585.2 KiB
Stream size                              : 585 KiB (2%)
Proportion of this stream                : 0.01990
File creation date                       : UTC 2011-12-31 13:50:50.545
File creation date (local)               : 2011-12-31 14:50:50.545
File last modification date              : UTC 2011-12-31 13:52:01.709
File last modification date (local)      : 2011-12-31 14:52:01.709

Video
Count                                    : 343
Count of stream of this kind             : 1
Kind of stream                           : Video
Kind of stream                           : Video
Stream identifier                        : 0
StreamOrder                              : 0
FirstPacketOrder                         : 0
ID                                       : 224
ID                                       : 224 (0xE0)
Format                                   : MPEG Video
Commercial name                          : MPEG-2 Video
Format version                           : Version 2
Format profile                           : Main@Main
Format settings                          : BVOP
Format settings, BVOP                    : Yes
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Default
Format settings, Matrix                  : Default
Format settings, GOP                     : M=3, N=12
Format settings, picture structure       : Frame
Internet media type                      : video/MPV
Codec                                    : MPEG-2V
Codec                                    : MPEG-2 Video
Codec/Family                             : MPEG-V
Codec profile                            : Main@Main
Codec settings, Matrix                   : Default
Duration                                 : 30000
Duration                                 : 30 s 0 ms
Duration                                 : 30 s 0 ms
Duration                                 : 30 s 0 ms
Duration                                 : 00:00:30.000
Duration                                 : 00:00:30:00
Duration                                 : 00:00:30.000 (00:00:30:00)
Bit rate mode                            : CBR
Bit rate mode                            : Constant
Bit rate                                 : 7870005
Bit rate                                 : 7 870 kb/s
Maximum bit rate                         : 8000000
Maximum bit rate                         : 8 000 kb/s
Width                                    : 720
Width                                    : 720 pixels
Height                                   : 576
Height                                   : 576 pixels
Sampled_Width                            : 720
Sampled_Height                           : 576
Pixel aspect ratio                       : 1.422
Display aspect ratio                     : 1.778
Display aspect ratio                     : 16:9
Frame rate                               : 25.000
Frame rate                               : 25.000 FPS
Frame count                              : 750
Standard                                 : PAL
Resolution                               : 8
Resolution                               : 8 bits
Colorimetry                              : 4:2:0
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Chroma subsampling                       : 4:2:0
Bit depth                                : 8
Bit depth                                : 8 bits
Scan type                                : Interlaced
Scan type                                : Interlaced
Scan order                               : BFF
Scan order                               : Bottom Field First
Interlacement                            : BFF
Interlacement                            : Bottom Field First
Compression mode                         : Lossy
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.759
Delay                                    : 500.000
Delay                                    : 500 ms
Delay                                    : 500 ms
Delay                                    : 500 ms
Delay                                    : 00:00:00.500
Delay_DropFrame                          : No
Delay, origin                            : Container
Delay, origin                            : Container
Delay_Original                           : 0
Delay_Original                           : 00:00:00.000
Delay_Original_Settings                  : drop_frame_flag=0 / closed_gop=1 / broken_link=0
Delay_Original_DropFrame                 : No
Delay_Original_Source                    : Stream
Time code of first frame                 : 00:00:00:00
Time code source                         : Group of pictures header
GOP, Open/Closed                         : Closed
GOP, Open/Closed                         : Closed
Stream size                              : 29512519
Stream size                              : 28.1 MiB (98%)
Stream size                              : 28 MiB
Stream size                              : 28 MiB
Stream size                              : 28.1 MiB
Stream size                              : 28.15 MiB
Stream size                              : 28.1 MiB (98%)
Proportion of this stream                : 0.98010
Buffer size                              : 229376
intra_dc_precision                       : 9
DGIndex reports it as:

Code: Select all

Stream Type: MPEG1 Program
Profile: main@main
Frame Size: 720x576
Display Size: [not specified]
Aspect Ratio: 16:9 [3]
Frame Rate: 25.000000 fps
Video Type: PAL
Frame Type: Interlaced
Coding Type: B
Colorimetry: BT.470-2 B,G*
Frame Structure: Frame
Field Order: Bottom
Coded Number: 750
Playback Number: 750
Frame Repeats: 0
Field Repeats: 0
VOB ID: 
Cell ID: 
Bitrate: 8.188 Mbps
Bitrate (Avg): 8.008 Mbps
Bitrate (Max): 8.202 Mbps
Timestamp: 0:00:00
Elapsed: 0:00:02
Remain: FINISH
FPS: 272.73
Info: 
and DGIndexNV aborts with:

Code: Select all

---------------------------
Video Type Detect Error
---------------------------
MPEG1 program streams not supported.
Exiting...
---------------------------
OK   
---------------------------
and then crashes.

So I got two issues:
  1. When a MPEG-1 source is detected, it's right to abort for DGIndexNV, but it shouldn't crash.
  2. Assuming the source I got is indeed MPEG-2 detecting it as MPEG-1 is wrong.
-> would be nice if you can:
a. fix the crash
b. have a look at the source and in case it is MPEG-2 fix the format detection.

Cu Selur

Ps.: No hurry from my end, I just stumbled over this and thought I should report it. :)
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: MPEG-1/MPEG-2 detection,...

Post by admin »

Thanks, Selur. You know I love bug squashing. Downloading now...
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: MPEG-1/MPEG-2 detection,...

Post by admin »

It is MPEG2 video inside an MPEG1 program stream container. That is legal but unusual. I have fixed the crash and if it is not too involved I'll add support for MPEG1 program streams. Slipstream later today or tomorrow with a few other small things.
User avatar
Selur
Posts: 134
Joined: Mon Nov 05, 2012 3:49 pm
Location: Germany
Contact:

Re: MPEG-1/MPEG-2 detection,...

Post by Selur »

Thanks for the prompt help and solution :hat:

Cu Sleur
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: MPEG-1/MPEG-2 detection,...

Post by admin »

You're welcome and thanks for reporting this.

I've got MPEG1 program stream support initially coded and it works perfectly in DGDecodeNV but there are some artifacts in DGIndexNV (the latter is more complicated due to audio and timestamp dump functionality). It's probably just a little typo but I ran out of energy today to track it down. I expect to have a test build for you tomorrow.

Revisiting old code legs that haven't been touched in years is a trip. My thorough commenting is serving me well. :lol:
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: MPEG-1/MPEG-2 detection,...

Post by admin »

All fixed! I'll release slipstream 120 now.
User avatar
Selur
Posts: 134
Joined: Mon Nov 05, 2012 3:49 pm
Location: Germany
Contact:

Re: [RESOLVED] MPEG-1/MPEG-2 detection,...

Post by Selur »

Works fine!
Thanks! :)

Cu Selur
Post Reply