# Mpeg2 > Mpeg4 ?



## eric23 (Jan 15, 2002)

I just got a new cachecard. It's fab. I'm really looking forward to trying some of the lovely hacks out there that most of you have simply been taking for granted for the last few years. Whilst I am still ready and waiting to get on the HD train (and inevitably SkyHD+), Cachecard has definitely re-sparked my interest in my TiVo!

I'm surprised to find that TiVo records in 576x480, regardless of the aspect ratio of the programme. I don't know why that might be, but it seems the recorded image is being stretched back out to 16:9 either by TiVo or by my TV.

Obviously this has nothing to do with how to extract video. I am fully aware of the rules. It's just that I happen to have an MPEG2 file on my computer at 576x480 resolution. And I'm wondering how other people might go about converting an MPEG2 file into an MPEG4. Would you stretch it back out to 848x480 (keeping the same number of lines) when transcoding? What programme would you use to do this? Being a Mac user, I've tried ffmpegX, which is a great piece of open source software. But the video and audio isn't very well sync'ed (which could be my computer, but I have tried the same MP4 file on several machines now and they all have the same problem). So I think I'm going to purchase QuickTime's MPEG2 playback component, which (when used with QuickTime Pro) will allow me to export an MPEG2 to MPEG4. But I just wondered if I could draw on anyone else's experience first?


----------



## sanderton (Jan 4, 2002)

All non-HD widescreen is anamorphic, ie, 4:3 and 16:9 have the same pixel resolution but the display device puts out the right aspect ratio signal. Alternatively, you can see 4:3 as having square pixels and 16:9 as having rectangular ones.

Best on an unhacked TiVo with a satellite input is 544 x 576; many run the Mode 0 hack to increase that to 720 x 576 (same as a DVD).

Whether you need to recode to a 16:9 square pixel resolution such as 1024 x 576 depends on whether you output device can "stretch" the picture. All widescreen TVs can, of course, but on a computer it's a function of the playback software whether it allows you to manually set the aspect ratio.

Can't help you on mac software; Dr DiVx is good on a PC.


----------



## eric23 (Jan 15, 2002)

Thanks Stuart, for explaining anamorphic widescreen to me. I have heard of it before but never attempted to understand what it was!

So when TiVo records in best, it is doing the standard 576 lines, but only a width of 544 pixels? Even though the picture is wider than it is high?! Do you have any idea what is actually broadcast by Sky - is it a 720 wide picture?


----------



## Sneals2000 (Aug 25, 2002)

eric23 said:


> Thanks Stuart, for explaining anamorphic widescreen to me. I have heard of it before but never attempted to understand what it was!
> 
> So when TiVo records in best, it is doing the standard 576 lines, but only a width of 544 pixels? Even though the picture is wider than it is high?! Do you have any idea what is actually broadcast by Sky - is it a 720 wide picture?


The digital production standard - used in broadcast studios and edit suites - is 720 x 576. This is actually slightly wider than 4:3 or 16:9 for all sorts of reasons, the 4:3 / 16:9 portion (and the analogue compatible chunk) is actually the central 702x576 image. (Pedantic anorakky point) Vision mixers, VTRs etc. all run in 720x576 whether they are processing 16:9 or 4:3. In neither mode are the samples (or "pixels") square - they are just different non-square widths in 4:3 or 16:9!

I can't re-inforce how important it is to realise that broadcast samples or "pixels" aren't square... People who spend their lives working with PCs struggle with this concept - and assume that the resolution of an image also dictates its aspect ratio - it doesn't have to, as pixels can have aspect ratios other than 1:1. (If broadcast video was square pixel, then a UK TV image would be 768x576, and a US one 640x480... Ever wondered where that resolution came from?!)

Digital Satellite, Freeview and Digital cable use MPEG2 - which likes its resolutions to be divisible by 16, as this is the block structure used for motion detection etc.

Therefore 720x576 and 704x576 (closest to 702x576) are the common "full resolution" transmission standards for both 4:3 and 16:9. However some broadcasters, on both Freeview and Satellite (not sure about cable - but suspect it is the same) save bandwith by dropping to 544x576. (ITV do this on satellite but not Freeview for example)

Additionally - the BBC and quite a few other broadcasters treat 4:3 material internally as a pillarbox in a 16:9 frame - which means that rather than the full width of the video signal (720x576, 702x576, 544x576) being used for the 4:3 frame, only the central 3/4 (i.e. 12/16) portion is, with the rest of the picture containing black video. This means the horizontal resolution is reduced to between 540x576 and 408x576... (This is what happens when ITV1 broadcast a 4:3 football match on Digital Satellite with black bars either side - to allow for a 16:9 studio. You end up with a 408x576 resolution 4:3 picture... Soft...)

This happens even if the receiver itself is outputting 4:3 full width video in some cases.

(NB 480 line video is the US standard - otherwise known as 525 - we use 576 lines over here, otherwise known as 625)


----------



## iankb (Oct 9, 2000)

Channel Five used to transmit programmes in a very odd format that defeated all attempts by my Sony widescreen TV to avoid squashing it horizontally. Presumably it was adding black bars down the side since, when transmitted by video sender to my 4:3 TV's, I had to display them in letterbox mode, with black bars all round.

At least, I think that was what I remembered as happening. They seemed to have sorted themselves out nowadays.


----------



## sanderton (Jan 4, 2002)

eric23 said:


> So when TiVo records in best, it is doing the standard 576 lines, but only a width of 544 pixels? Even though the picture is wider than it is high?! Do you have any idea what is actually broadcast by Sky - is it a 720 wide picture?


Don't worry about the "wider than it is high" bit - with TV you need to break out from the computer monitor "pixels are square" way of thinking!

Oddly, for Cable and Freeview Best is a lower resolution than for Satellite. Lord knows why.

Broadcast digital signals are 720 x 576, 704 x 576 or 544 x 576 depending on which channel it is. The BBC are 720, ITV 704 and E4 544, typically.


----------



## iankb (Oct 9, 2000)

sanderton said:


> Oddly, for Cable and Freeview Best is a lower resolution than for Satellite. Lord knows why.


Because Murdoch paid or pressured TiVo into doing it, to make the Sky platform look better.

That's what sponsorship was all about.


----------



## Sneals2000 (Aug 25, 2002)

iankb said:


> Channel Five used to transmit programmes in a very odd format that defeated all attempts by my Sony widescreen TV to avoid squashing it horizontally. Presumably it was adding black bars down the side since, when transmitted by video sender to my 4:3 TV's, I had to display them in letterbox mode, with black bars all round.
> 
> At least, I think that was what I remembered as happening. They seemed to have sorted themselves out nowadays.


Channel Five used to use the same system as the BBC on DTT - which was permanent 16:9 broadcasts, with 4:3 material pillarboxed, and accompanied by an AFD (Active Format Descriptor) which triggered set top boxes set up for 4:3 TVs to flip from 16:9 letterboxing to 4:3 centre cut. Some early ONDigital boxes didn't like this (thought most were upgraded OTA). I guess it was more obvious on Five because they show more 4:3 material than the BBC?

If your box wasn't happy with AFDs it may have output their 4:3 material as it was broadcast - i.e. 16:9 pillarbox (so it would appear tall and thin on a 4:3 set, but with black bars either side)

Five changed their transmission system a year or so ago - and switched to the ITV/C4 system of switching actual video aspect ratios (which is also the only system supported on Sky receivers - and so the BBC have to use this system on DSat as well), from 16:9 full width to 4:3 full width, which is less accurate (as it has to take place on a GOP boundary, whereas AFDs can switch on a frame boundary) At the same time Five switched to a very long GOP MPEG2 encoder - which meant it took a lot longer to show a picture when you changed channel to it. (It also caused problems with some receivers - so the GOP is now not quite so long - though still outside the DVB-T reference model recommendations I believe?)


----------



## Sneals2000 (Aug 25, 2002)

sanderton said:


> Don't worry about the "wider than it is high" bit - with TV you need to break out from the computer monitor "pixels are square" way of thinking!
> 
> Oddly, for Cable and Freeview Best is a lower resolution than for Satellite. Lord knows why.
> 
> Broadcast digital signals are 720 x 576, 704 x 576 or 544 x 576 depending on which channel it is. The BBC are 720, ITV 704 and E4 544, typically.


Suspect it was influenced by the US OTA and Cable settings being lower?

In theory, analogue broadcasts, especially US NTSC ones, are much lower res than 720x480. (Many struggle to have much detail over about 3.5MHz where the colour subcarrier kicks in - which is nearer 360x480...)

AIUI some of the DSat platforms in the US run at a significantly lower horizontal resolution than 544 as a result - as they don't have to match high quality expectations compared to OTA analogue/analogue cable. This also explains why HD is a more major improvement over analogue and some digital SD in the US.


----------



## jar_uk1 (Jan 7, 2004)

Going back to the first post. ffmpegx works very well to convert a mpeg2 to divx/xvid, and it seems to be a lot quicker that the "proper" mac divx program...

If you stumbled across a recording that may have originated on a tivo  reset the audio rates to 32000, NOT 48000 on the audio tab in ffmpeg before encoding and this should keep it in sync, I guess it has a problem with that bit of it. (I havent a clue why).

John R


----------



## eric23 (Jan 15, 2002)

Ah, thanks for that suggestion John. I purchased the £15 "Let QuickTime Play MPEG2 and Transcode MPEG2 to MPEG4" option, and it is a pile of poo. ffmpegX does seem to do a lot better job of it (and QuickTime is so incredibly slow to encode!), so if I can sort out the audio issue, my problems should be resolved. I have been experiencing some problems with ffmpegX, though - it sometimes just refuses to encode, depending on the codec selected - I think the programme is great, but it does need a bit more work.

Could I ask what programmes both Mac and PC users would use to convert a 544x576 MPEG2 to a 720x576 MPEG2 and then to burn it to DVD? I had a look at DrDivX, as you suggested Sanderton, but it seems it can only handle outputting to DivX. I've had a look at TMPGEnc's Video Encoder XPress and DVD Author, which seems to do the job pretty well.


----------



## sanderton (Jan 4, 2002)

Don't assume you need to convert it; most DVD players will play 544 x 576 fine.

The main program I use is not discussable on this forum, but I also use TMPGEnc Express.


----------



## jar_uk1 (Jan 7, 2004)

Eric

While you shouldnt need to encode it, as the dvd player will probably play it, getting it to burn to dvd is another thing. I have toast (latest version) and the sodding thing always insists in recoding everything, even with an in spec picture 720x576 if the sound is not 48000 it will still recode the sound and take almost as long as recoding the picture as well (or so it seems)...

You could try sizzle, it will not recode anything, so a dvd created with it it will play as long as your dvd can cope with the "out of spec" picture/sound. It is very basic and i had some problems with it, you will not be able to create "pretty" dvd's but hey - its free.

I use "mpeg streamclip" for editing mpeg2 as the qt component is pretty pants as you have found out Although i still convert in ffmpeg.

I dont burn to dvd as i have xbox360 and a media centre pc, so i just convert to divx.

John R


----------



## eric23 (Jan 15, 2002)

I changed ffmpegX's audio setting back to 32000 after selecting the MP4 H264 codec, and all seems to be working nicely! Thanks for that. I have now set a whole load of MPEG2s going, to see if they all come out nicely at the end.

Unfortunately, when it comes to the DVD side, it looks like I'm going to have to resort to doing it on a PC anyway. My "Super Drive" isn't quite so super - it only authors DVD-Rs, which my Phillips DVDR75 doesn't like, so having to do it on the Pioneer 107D in my PC which will write +Rs. Still got some fiddling to do with settings to get exactly what I want. I'm surprised that this all still seems to be something of a black art! At least I have an inkling of a grasp on this (and an ever better grasp with your help!), but I feel sorry for the average user who doesn't have a clue where to even start. It's not exactly point and click!

I will give the "leave it at 544x576" thing a try for DVDs, just as soon as I find a piece of software that lets me do it - TMPGEnc's DVD Author insists on having a 720x576 source file. Maybe I need to try DVD Author Pro or something.


----------



## Sneals2000 (Aug 25, 2002)

Have you tried a couple of different brands of DVD-Rs and tried burning at a low rate? My DVDR75 has played every DVD-R I've burned...

I usually use +Rs and +RWs but have had reason to have -Rs as well - I've not had a disc not play in my 75...


----------



## Ian_m (Jan 9, 2001)

With some DVD-R's and some DVD players you have to write at least a couple Gb to the disk for it to work correctly. There is an option in Nero to do this for -R disks, see attachment.

I found this greatly improved -R compatibility. Also using big name brands worked well, eg Maxell etc compared to "bargain bucket" -R DVDs.

Or in my experience just use +R disks and get it right everytime, I have use 100's of +R's and have only got one coaster and that was because I failed to set the 16:9 flag on the video so result came out squashed.


----------

