From Progressive to Interlaced ?!

MACKerMD

New member
I made a recording from H264 Level-3 source, which uses 'low-res' MP4 in H264 mode level-3 and broadcasts in Progressive mode.

I made an edit and outputted it into H264 .MP4. The output showed as 'interlaced' in MediaInfo, plus showed macroblocking in several segments of the program.

So, I thought I'd output it to H264 .TS in the hopes that there wouldn't be ANY alterings into the packet-headers and just 'edit n output'. However, this also shows Interlaced afterwards.

I will save the original recording for 7 days before I'll delete it, in case you want a trimmed portion of the file.
 

MACKerMD

New member
Here's the MediaInfo from the original untouched source:

Source said:
Code:
General
Complete name                    : C:\Outfoxed Rupert Murdochs War on Journa.ts
Format                           : MPEG-TS
Format profile                   : No PAT/PMT
File size                        : 1.18 GiB
Duration                         : 1h 29mn
Overall bit rate                 : 1 884 Kbps

Video
ID                               : 513 (0x201)
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L3.0
Format settings, CABAC           : Yes
Format settings, ReFrames        : 3 frames
Format settings, GOP             : M=4, N=24
Duration                         : 1h 29mn
Bit rate                         : 1 596 Kbps
Width                            : 720 pixels
Height                           : 576 pixels
Display aspect ratio             : 16:9
Frame rate                       : 25.000 fps
Standard                         : Component
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.154
Stream size                      : 1.00 GiB (85%)
Color primaries                  : BT.470-6 System B, BT.470-6 System G, BT.601-6 625, BT.1358 625, BT.1700 625 PAL, BT.1700 625 SECAM
Transfer characteristics         : BT.470-6 System B, BT.470-6 System G
Matrix coefficients              : BT.470-6 System B, BT.470-6 System G, BT.601-6 625, BT.1358 625, BT.1700 625 PAL, BT.1700 625 SECAM, IEC 61966-2-4 601

Audio
ID                               : 82 (0x52)
Format                           : MPEG Audio
Format version                   : Version 1
Format profile                   : Layer 2
Duration                         : 1h 29mn
Bit rate mode                    : Constant
Bit rate                         : 192 Kbps
Channel(s)                       : 2 channels
Sampling rate                    : 48.0 KHz
Compression mode                 : Lossy
Delay relative to video          : -681ms
Stream size                      : 124 MiB (10%)
[/quote]
Here's the Mediainfo from the edited output as .MP4:
MP4_EDIT said:
Code:
General
Complete name                    : L:\Outfoxed.Rupert.Murdochs.War.on.Journalism.DUTCH.SUBBED.PDTV.MPEG4.mp4
Format                           : MPEG-4
Format profile                   : Base Media
Codec ID                         : isom
File size                        : 500 MiB
Duration                         : 48mn 0s
Overall bit rate                 : 1 455 Kbps
Writing application              : Lavf52.64.2

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L3.0
Format settings, CABAC           : Yes
Format settings, ReFrames        : 3 frames
Format settings, GOP             : M=4, N=24
Codec ID                         : avc1
Codec ID/Info                    : Advanced Video Coding
Duration                         : 48mn 0s
Bit rate                         : 1 258 Kbps
Width                            : 720 pixels
Height                           : 576 pixels
Display aspect ratio             : 16:9
Original display aspect ratio    : 16:9
Frame rate mode                  : Constant
Frame rate                       : 25.000 fps
Standard                         : Component
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Interlaced
Scan order                       : Top Field First
Bits/(Pixel*Frame)               : 0.121
Stream size                      : 432 MiB (86%)

Audio
ID                               : 2
Format                           : MPEG Audio
Format version                   : Version 1
Format profile                   : Layer 2
Codec ID                         : 6B
Duration                         : 48mn 0s
Duration_LastFrame               : -24ms
Bit rate mode                    : Constant
Bit rate                         : 192 Kbps
Channel(s)                       : 2 channels
Sampling rate                    : 48.0 KHz
Compression mode                 : Lossy
Stream size                      : 65.9 MiB (13%)
Language                         : Dutch

[/quote]
Here's the Mediainfo from the edited output as .TS
TS_EDIT said:
Code:
General
ID                               : 1 (0x1)
Complete name                    : L:\VARiOUS_TV\Outfoxed.Rupert.Murdochs.War.on.Journalism.DUTCH.SUBBED.PDTV.MPEG4.ts
Format                           : MPEG-TS
File size                        : 548 MiB
Duration                         : 48mn 0s
Overall bit rate                 : 1 596 Kbps

Video
ID                               : 513 (0x201)
Menu ID                          : 1 (0x1)
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L3.0
Format settings, CABAC           : Yes
Format settings, ReFrames        : 3 frames
Format settings, GOP             : M=4, N=24
Codec ID                         : 27
Duration                         : 48mn 0s
Bit rate                         : 1 323 Kbps
Width                            : 720 pixels
Height                           : 576 pixels
Display aspect ratio             : 16:9
Frame rate                       : 25.000 fps
Standard                         : Component
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Interlaced
Scan order                       : Top Field First
Bits/(Pixel*Frame)               : 0.128
Stream size                      : 454 MiB (83%)
Color primaries                  : BT.470-6 System B, BT.470-6 System G, BT.601-6 625, BT.1358 625, BT.1700 625 PAL, BT.1700 625 SECAM
Transfer characteristics         : BT.470-6 System B, BT.470-6 System G
Matrix coefficients              : BT.470-6 System B, BT.470-6 System G, BT.601-6 625, BT.1358 625, BT.1700 625 PAL, BT.1700 625 SECAM, IEC 61966-2-4 601

Audio
ID                               : 82 (0x52)
Menu ID                          : 1 (0x1)
Format                           : MPEG Audio
Format version                   : Version 1
Format profile                   : Layer 2
Codec ID                         : 3
Duration                         : 48mn 0s
Bit rate mode                    : Constant
Bit rate                         : 192 Kbps
Channel(s)                       : 2 channels
Sampling rate                    : 48.0 KHz
Compression mode                 : Lossy
Stream size                      : 65.9 MiB (12%)
Language                         : Dutch

[/quote]
Will hold the files just in case you need them. Just in case you're wondering the difference in timelength of output and source, I let the source ran longer on for like 45 more mins [2nd show] before I started to edit it.
I did not notice any change in resolution nor format switch during that time [my TV would switch from Progressive to Interlaced mode]
 

Danr

Administrator
Staff member
Can you try just running a QSF on the file, want to see if it's the cut that is causing the change?

Also, can you post the source and output info as reported by Tools>Show Program Info?
 

MACKerMD

New member
THIS is from the original, uncut, NON-QSF'ed SOURCE file:

SOURCE said:
Code:
 File:                                     Name : C:\Outfoxed Rupert Murdochs War on Journa.ts
                                           Size : 1.271 GB
                                       Duration : 01:29:58.18
                                       Mux type : TS Stream
                                    TS mux rate : 1.691 Mbps
 Video:                                Encoding : H.264
                                  VideoStreamID : x201
                                     Frame rate : 25.00 fps
                                  Encoding size : 720 x 576
                                   Aspect ratio : 1.82:1
                                Header bit rate : 10.000 Mbps
                                     VBV buffer : 152 KBytes
                                        Profile : High/3.0
                                    Progressive : Interlaced
                                         Chroma : 4:2:0
                                   Entropy mode : CABAC
                                       Bit rate : 1.624 Mbps
 Audio Stream: 1 (Primary)                Codec : MPEG
                                      MPEGLayer : Layer 2
                                       Channels : 2.0
                                       Language : dut
                                            PID : x52
                                  PES Stream Id : xC0
                                       Bit rate : 192 Kbps
                                  Sampling rate : 48000
                                    Sample size : 16 bits
[/quote]
VRDS4 shows that the source -is- interlaced.

Still want me to QSF it? .. For some odd reason MediaInfo and the Internal-Program-Info show 2 different things for the source.


OUTPUT_TS said:
Code:
 File:                                     Name : L:\VARiOUS_TV\Outfoxed.Rupert.Murdochs.War.on.Journalism.DUTCH.SUBBED.PDTV.MPEG4.ts
                                           Size : 0.575 GB
                                       Duration : 00:48:00.10
                                       Mux type : TS Stream
                                    TS mux rate : 1.803 Mbps
 Video:                                Encoding : H.264
                                  VideoStreamID : x201
                                     Frame rate : 25.00 fps
                                  Encoding size : 720 x 576
                                   Aspect ratio : 1.82:1
                                Header bit rate : 10.000 Mbps
                                     VBV buffer : 152 KBytes
                                        Profile : High/3.0
                                    Progressive : Interlaced
                                         Chroma : 4:2:0
                                   Entropy mode : CABAC
                                       Bit rate : 1.348 Mbps
 Audio Stream: 1 (Primary)                Codec : MPEG
                                      MPEGLayer : Layer 2
                                       Channels : 2.0
                                       Language : dut
                                            PID : x52
                                  PES Stream Id : xC0
                                       Bit rate : 192 Kbps
                                  Sampling rate : 48000
                                    Sample size : 16 bits
[/quote]

OUTPUT_MP4 said:
Code:
 File:                                     Name : L:\VARiOUS_TV\Outfoxed.Rupert.Murdochs.War.on.Journalism.DUTCH.SUBBED.PDTV.MPEG4.mp4
                                           Size : 0.524 GB
                                       Duration : 00:48:00.06
                                       Mux type : MP4
 Video:                                Encoding : H.264
                                  VideoStreamID : x201
                                     Frame rate : 25.00 fps
                                  Encoding size : 720 x 576
                                   Aspect ratio : 1.82:1
                                Header bit rate : 10.000 Mbps
                                     VBV buffer : 152 KBytes
                                        Profile : High/3.0
                                    Progressive : Interlaced
                                         Chroma : 4:2:0
                                   Entropy mode : CABAC
                                       Bit rate : 1.213 Mbps
 Audio Stream: 1 (Primary)                Codec : MPEG
                                      MPEGLayer : Layer 2
                                       Channels : 2.0
                                       Language : dut
                                            PID : x202
                                  PES Stream Id : xC0
                                       Bit rate : 192 Kbps
                                  Sampling rate : 48000
                                    Sample size : 16 bits

[/quote]
Also notice the 4 seconds 'difference' between the .TS output and .MP4 output. Maybe that tells something about the 'error'-issues mentioned below. It's like VRD4 is 'skipping' info which later seems 'important'. Is that so?

Still doesn't explain the macroblocking in the program. This ONLY happens when I edited MPEG4-sourced material. The original recordings always play flawless on PVR and even WDTV, but as soon as I edited them, no matter if it's HDTV or SDTV, if the recording is MPEG4-H264-Video, the edited output gets macroblocks. Which is -very- annoying to say the least. Sometime its only a few, sometimes a lot. With cartoons its very clearly visible. It doesn't matter from which TV-station [eg. BBC-HD, Boomerang, HistoryHD, DiscoveryHD, SyFy [SD-MPEG4]], it's always the same.
Recordings are 'fine', the output shows up with 'errors', even though VRDS4 does NOT report ANY errors after outputting the output in the info-box nor log-file, and only happens 99 out of 100 times with MPEG4 sourced files.

Examples of how BAD macroblocking is showing : HERE

I have absolutely none of these issues when dealing with MPEG2-Video
 
Last edited:

Dan203

Senior Developer
Staff member
Is the macroblocking happening at the edit points? Or randomly within the program?

Dan
 

MACKerMD

New member
MPEG4 [SD] sourced I save to .TS and/or .MP4 [or .MKV for container usage on ext. player]
MPEG4 [HD] sourced I save to .TS and/or .MP4 [or .MKV for container usage on ext. player]
MPEG2 [SD] sourced I save to .MPG or .TS
 

Danr

Administrator
Staff member
@MACKerMD, Thanks for the uploads they have proven very useful. The issue you're seeing is that the file at the sequence header level is marked as non-progressive. In non-progressive mode, frames can either be encoded as progressive or interlaced on a frame by frame basis. This is similar to the way MPEG2 DVDs are encoded. In fact Tools>Show Program Info for MPEG2 files says "Progressive or Interlaced" rather than "Interlaced".

What MediaInfo is showing the frame type of the first few frames of the file. To truly know if the file is progressive or interlaced the entire file would have to be read and each frame header decoded, which MediaInfo doesn't do as it would take a long time. To some degree, both VideoReDo and MediaInfo are correct in that the first few frames are Progressive, and the sequence headers (SPS) allow for a combination of interlaced and progressive. If you're interested in learning more about this, google: H.264 PAFF.

Where does this leave TVSuite? Currently we base the frame encoding, at cut points, off of the sequence header so your frames are being encoded as interlaced. I'm exploring how to switch this on a frame by frame basis so we can maintain the progressive pattern. However, because the sequence headers allow for a mixture of interlaced and progressive frame, the fact that we are coding to interlaced shouldn't be a problem. Some sample cuts I did on your files came out fine.

I've sent you an email requesting information so that we can duplicate the problem you're seeing.
 
Last edited:
Well to add my 2 cents here, I downloaded those 2 files and they played just fine in VRD--no macroblocking, yet VLC would **not** play them. VLC just sat in its small rectangular startup position and did nothihng. I also tried playing in my PCH and it did nothing but show me a black screen. So I have to wonder if the very low bitrate (1.2,1.3Mbps H264) has something to do with the issues.

Mike
 

MACKerMD

New member
Well to add my 2 cents here, I downloaded those 2 files and they played just fine in VRD--no macroblocking, yet VLC would **not** play them. VLC just sat in its small rectangular startup position and did nothihng. I also tried playing in my PCH and it did nothing but show me a black screen. So I have to wonder if the very low bitrate (1.2,1.3Mbps H264) has something to do with the issues.

Mike
Nope, I had the same problem at first as well. This is when I turned to PC programs which solved this issue.
VRD and the other utils I mentioned seemed to work for my recordings. It's something with the first 180-185 bytes which aren't standard.
Eg. (plz don't pinpoint me on the exact numbers) they should be 183 and mine seem 184. (or vice versa) making PC players get confused and would tell that it's not a .ts etc.
 
Last edited:

MACKerMD

New member
@MACKerMD, Thanks for the uploads they have proven very useful.
You're very welcome. I'm always trying to help out as good as I possibly can.
The issue you're seeing is that the file at the sequence header level is marked as non-progressive. In non-progressive mode, frames can either be encoded as progressive or interlaced on a frame by frame basis. This is similar to the way MPEG2 DVDs are encoded. In fact Tools>Show Program Info for MPEG2 files says "Progressive or Interlaced" rather than "Interlaced".
Interresting...
What MediaInfo is showing the frame type of the first few frames of the file. To truly know if the file is progressive or interlaced the entire file would have to be read and each frame header decoded, which MediaInfo doesn't do as it would take a long time. To some degree, both VideoReDo and MediaInfo are correct in that the first few frames are Progressive, and the sequence headers (SPS) allow for a combination of interlaced and progressive. If you're interested in learning more about this, google: H.264 PAFF.
I'll definately gonna read up more on this. Didn't know there could be 2 various forms of interlacing within one stream as you just mentioned.
Where does this leave TVSuite? Currently we base the frame encoding, at cut points, off of the sequence header so your frames are being encoded as interlaced. I'm exploring how to switch this on a frame by frame basis so we can maintain the progressive pattern. However, because the sequence headers allow for a mixture of interlaced and progressive frame, the fact that we are coding to interlaced shouldn't be a problem. Some sample cuts I did on your files came out fine.

I've sent you an email requesting information so that we can duplicate the problem you're seeing.
I replied the email and will record a few new portions and add a VPRJ for it, simply because it's easier than to upload 2gb for a VPRJ file.
 

Danr

Administrator
Staff member
I'll definately gonna read up more on this. Didn't know there could be 2 various forms of interlacing within one stream as you just mentioned.
What this does is permit the broadcaster to encode as interlaced, but then switch dynamically to progressive when the source frames are progressive.
 

MACKerMD

New member
Seaky bastards they are :)

Anyway .. uploading 2 H264's to the ftp and will email.
One is a short -Boomerang- [SD] and one from TravelChannelHD [for the subtitles-issue] or.. am I posting this in the wrong thread ? If so, I'll make sure the proper thread-number is added to the ftp-foldername.
 

MrVideo

Active member
What this does is permit the broadcaster to encode as interlaced, but then switch dynamically to progressive when the source frames are progressive.
I believe that is called PAFF.

There is a third party tool out there are is used as a front end to AVIsynth abd x264 encoding that tears apart each video frame,. The original program did not deal with PAFF H.264 encodings very well and caused issues with the recoding.

A new version was released that required the use of the Nvidia card and the drivers, so that the program could send the video through the card to get it converted to raw video correctly, for recoding by x264.

So, while PAFF frames can be an issue, they aren't such to cause programs to come to a screeching halt.
 

MACKerMD

New member
I believe that is called PAFF.

There is a third party tool out there are is used as a front end to AVIsynth abd x264 encoding that tears apart each video frame,. The original program did not deal with PAFF H.264 encodings very well and caused issues with the recoding.

A new version was released that required the use of the Nvidia card and the drivers, so that the program could send the video through the card to get it converted to raw video correctly, for recoding by x264.

So, while PAFF frames can be an issue, they aren't such to cause programs to come to a screeching halt.
Unfort my Nvidia doesn't support CUDA, which makes it even harder for me.
Dan did mention it was called PAFF. The avisynth thing I didn't know, because I never dug that deep into the matter. I mostly want to convert my HD/SD to MKV/AVI and I make outputs in VRD and use Stax [which used VDub with AVS-scripts] to encode in a to-me-set'd bitrate/filesize/resolution, etc.
 

MrVideo

Active member
Nvidia cards are cheap. One doesn't need a expensive gamer card when all one is going to do is display video and/or edit video. The cost of the software to be the go-between the video and AVISynth/x264 is a one-time $15.

No need to generate AVI wrapped MPEG-2 files when H.264/MKV files are smaller, and of better overall quality (though you probably won't see any difference).
 
Top Bottom