![]() |
|
General Discussion General discussion about SageTV and related companies, products, and technologies. |
![]() |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Interlaced H.264?
Anyone know how to create interlaced H.264 files? I know it's supported by the MPEG4 standard. But I don't see any tools that are able to create interlaced videos. I did find a note that x264 is not able to create interlaced videos.
Just curious. I have some videos I'd like to convert but I'd rather not de-interlace them for the conversion. |
#2
|
|||
|
|||
I'm pretty sure MPEG (h.264 is MPEG4 part 10) compression basically can't be interlaced, you can deinterlace then compress and then reinterlace if you like but it's compression methods compare frames for redundency.
|
#3
|
|||
|
|||
Doing a little bit further searching it looks like (according to the Wikipedia page on MPEG4 Part 10) x264 can create interlaced coded video using MBAFF.
I'll have to dive further into that. It appears that most of the encoders that support interlaced coding , save for x264, are for professional use. |
#4
|
|||
|
|||
I guess the big question is why would anyone want to? or What is the bigger picture you have?
|
#5
|
|||
|
|||
I have some DVD's that are straight interlaced video and not telecined. I'd like to convert them to a smaller size to store them on my server but keep them in interlaced format. That way whatever playback device is being used can handle that.
Edit: it appears I can create an interlaced video by using the "--interlaced" option with x264. :-D Last edited by Taddeusz; 01-23-2008 at 10:38 AM. Reason: added info |
#6
|
||||
|
||||
I sometime leave my interlaced material as interlaced when encoding to x264 (mencoder). You need to be careful however, as it requires the height, and I think the width of the encoded file to be mod16.
Also not all hardware playback devices do de-interlacing. If you plan on using one to playback your files, your much better off encoding with a de-interlace filter (i like yadif). The only times I don't de-interlace on encoding is if the source is hi-motion (football games), or a PAL conversion (ie masterpiece theatre). |
#7
|
|||
|
|||
Quote:
I use Handbrake and the x264 settings you posted (http://forums.sagetv.com/forums/showthread.php?t=28963). Before you posted those settings, I noticed some DVDs I had ripped with older content (from 80's TV shows, mainly) had vertical lines and I figured it was an interlacing issue. When a re-encoded them using our x264 parms, the symptom was drastically reduced. Is it possible it wasn't actually an interlaced problem, given I did not add the --interlaced option? something else? Also, is there a way to determine what video sources would benefit from the --interlaced option? I've found your info and posts regarding compressing video to mpeg4, and my preferred target of x264 in an mkv file very valuable, thanks for all your input!!! |
#8
|
|||
|
|||
Ok, let me give a little back story I forgot to mention. I had played around with creating interlaced H.264 videos from some music videos I'd ripped from DVD. The problem I was having is that it was showing up as 480p instead of 480i in SageTV like the original MPEG2 rips did. As a result the fields were combined and not in half frames and looked like crap on my TV. I didn't know how to tell the encoder to code it as interlaced so I gave up for a while. I'm now interested in it again.
I'm at work right now but I'm going to play around with it tonight. It looks like using AutoMKV I can disable all de-interlacing options and then add "--interlaced" to the command-line and see what it spits out. On a side note. I know I've been an avid supporter of Handbrake. I'm now reformed. I've discovered that Handbrake has a really crappy reverse telecine engine. They actually admit it themselves. Apparently they're working on it. AutoMKV on the other hand seems to be awesome at detecting bad editing and such and produces awesome output. My trouble case was Mallrats where scene changes would go from good to bad back to good. I also had some movies that were improperly detected by Handbrake and got encoded at 29.97fps rather than 24.976fps. As a result they were jittery. AutoMKV produced the correct output in both cases. That being said AutoMKV is not perfect. When creating an MKV the resulting file does not have the SAR in the bitsream because mkvmerge strips it out by default. It also does not produce correct anamorphic SAR values when told to do so automatically. I've had to manually input the correct values into AutoMKV and then mux them myself so that they'll be played with the correct anamorphic aspect ratio in SageTV. I know way too much about this stuff now. Particularly after my crash session last weekend when I was trying to fix the SAR as well as converting the AAC 5.1 audio to AC3 on an aquired video so it would play correctly on SageTV and my HD Extender. I was ![]() ![]() |
#9
|
|||
|
|||
Well, just to update everyone. I was able to create interlaced H.264 videos but I had to use MeGUI. The problem I've run into is that SageTV detects it as 480p instead of 480i. I've contacted support to see if there is a way to fix that.
I've verified that the video is actually interlaced. I demuxed the mkv file and played the raw H.264 file in VLC. It doesn't know the framerate because it's a raw stream but it shows the resolution as 720x240. I'll have to play around some more and see if I can't get it working. Hopefully I'll hear something positive back from support. |
#10
|
|||
|
|||
Wow, looks like you've tried most everything. I've found handbrake works fine (for me, anyway), on progressive sources, just not interlaced.
So, right now, your encoding the content w/ meGUI, or are you encoding with autoMKV and doing some post-processing w/ meGUI. If/when you get things all figured out, I'd be interested in your findings. I thought Handbrake was doing fine with my interlaced material, but ran some TV mini-series through it and it looks pretty terrible. |
#11
|
|||
|
|||
Handbrake actually isn't that great at all. Particularly because it doesn't reverse telecine stuff correctly.
At this point I'm not actually sure the files I was creating were really interlaced. The VOB's are processed through AVISynth before being sent to x264. Granted, I don't know how MPEG 2 stores interlaced fields but I have this sneaking suspicion that AVISynth is combining the interlaced fields into a single frame instead of keeping them apart. Even though I'm telling meGUI to do interlaced I don't think the input it's getting is. I don't know if there are any tools I can use to determine whether or not what I have is really interlaced or not. |
#12
|
|||
|
|||
To determine if the mpeg2 is interlaced? I run them in dgindex, and the information screen tells if it is progressive or interlaced.
I'm thinking I'm going to end up with 2 encoding processes, one for progressive and one for interlaced, even if I have to use a different combination of tools. I'm also then categorizing content based on desired quality. I know you encode everything at 2Mbps, but I'm trying to conserve space a bit more, so I encode some content @ 1200Kbps (dramas, romantic comedies, etc), so another step to classify content as progressive or interlaced wont be that big of a deal for me. So, are you still doing the automkv processes you mentioned? I didn't completely understand the muxing of the SAR step. Are you using autoMKV to encode from mpeg2/dvd vob, or is there another step in there? |
#13
|
|||
|
|||
Quote:
No, to determine if the resulting H.264 stream is interlaced or not. Quote:
Unfortunately he doesn't seem to be very good at the maths. Even after several people, including myself, have described in detail the math behind calculating the correct SAR value to pass to x264. It's not really that huge of a deal. I already have the values calculated for the two aspect ratios I need. Right now I'm just happy that I can use AutoMKV without having to do a separate mkvmerge run to create a file that still has the bitstream AR. I have the AR stuff saved as the default options so if the movie is 16:9 it's all hands off for me now. And I can mux in the DTS audio if the DVD has it. Handbrake wouldn't do pass-thru DTS. |
#14
|
|||
|
|||
Taddeusz,
Since all TV's have to deinterlace in real-time, I find it hard to believe that there isn't some offline deinterlace filter that won't do a better job. Is there another reason why you want to keep some of your material interlaced? On another note, what are the custom SAR parameters that you put into AutoMKV? What's not fixed in beta21? Buzzhq is pretty quick to make changes as long as he understands it. Robert |
#15
|
|||
|
|||
Quote:
Quote:
It appears the values he computes for that is basically something like (16/9*100000000):100000000 so it turns out to be 177777770:100000000 on the command line (or something like that, I don't remember the number of zeros). The formula he should be using is the one above. He should be using that for ALL aspect ratio computations. Not just anamorphic. It's computed the same no matter whether you have square pixels or are using an anamorphic presentation. Oddly enough I've run into a problem where VLC wouldn't play a square pixel video correctly without the decimal AR muxed into it. I thought that was pretty weird. Of course it was a video that didn't have a standard 16:9 size. Something weird like 1920x858. I computed the value using that formula and it worked fine. ![]() I think one of the other posters said that it's a bug when you use anamorphic video, select Original as the video width and don't use cropping. Which is what I'm doing. That's the main reason I haven't really worried about it that much. I have the SAR values precomputed that I need to use so it's just a matter of copy and paste. Most of my stuff is 16:9 which I have saved in the defaults. I only need to change things up when I do something that's 4:3. I didn't verify that bug. That's just what I gathered from someone else. Last edited by Taddeusz; 01-28-2008 at 02:51 PM. Reason: correction |
#16
|
|||
|
|||
Not to be picky because I know nothing about this but if the formula is V/H*HAR/VAR wouldn't it be 480/720*16/9 or should your formula have been (V*HAR)/(H*VAR)? Or are they mathematically the same - it's been a long time since I had classes of any kind!
|
#17
|
|||
|
|||
OK, Taddeusz. Thanks.
Quote:
![]() Well, one can always assume that you intend to watch it on a monitor. Yah, that's it! That's what I was thinking. ![]() -Robert |
#18
|
|||
|
|||
They're mathematically the same. Jus two different ways of showing it. I know I showed both, probably kind of confusing. The first I did to show that you're multiplying two fractions. The second one I simplified it and showed how you come up with the two numbers. It all works out the same though because it's all multiplication and division so you'd work both of them using mathematical rules and end up with the same decimal number. But the latter version is easier to look at to achieve the fraction that's needed.
|
#19
|
|||
|
|||
Quote:
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
SageTV Mac Client won't show h.264 stream? | niknas | SageTV Mac Edition | 3 | 10-21-2007 09:36 AM |
Perfect r5000-hd H.264 playback | HawgGuy | SageTV Software | 6 | 09-08-2007 06:25 PM |
r5000hd h.264 vs Quicktime H.264 playback | HawgGuy | Hardware Support | 0 | 04-30-2007 08:09 AM |
Two Questions. H.264 and Tag Parsing | kranzel | SageTV Software | 0 | 01-16-2007 04:20 AM |
Help creating h.264 mp4 with SageTVTranscoder | Wade | SageTV Beta Test Software | 5 | 11-19-2006 06:17 PM |