Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-2 Encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 18th March 2010, 21:41   #1  |  Link
OvejaNegra
ekTOMBE STUDIOS
 
OvejaNegra's Avatar
 
Join Date: Dec 2005
Location: Cuba
Posts: 254
Re - encode mpeg2 video track and preserve wierd flags

Anime DVDs usually have wierd flags (VFR or progressive flagged as interlaced or progressive + interlaced fades flagged as interlaced, OR progressive with interleced credits flagged as interlaced).

If i re-enocode the video track from a DVD (demuxed with dgindex) as interlaced on any encoder i will lose quality / eficience.
If i encode as pulldown i will have a mess if interlacing / progressive patterns on the movie.

My question:
Is there any encoder able to re-encode detecting progressive - interlaced ON THE IMAGE and flag the stream correctly
Or
re-encode detecting the progressive - interlaced on the image and copy the original flags to the destination stream
Or
Remove those flags and encode detecting the interlaced - progressive on the image and then re-flag with other tool the resulting stream with the flags of the original?


Yes this is a little confusing (for me).
I dont know why they do that.
Why not encode the film sections with the correct pulldown and the interlaced sections as interlaced? Then i could cut and encode each section with the appropiated settings.


Thanks
__________________
So, it works or not???
OvejaNegra is offline   Reply With Quote
Old 20th March 2010, 01:46   #2  |  Link
hank315
HCenc author
 
Join Date: Nov 2003
Location: Netherlands
Posts: 570
Quote:
Originally Posted by OvejaNegra
Is there any encoder able to re-encode detecting progressive - interlaced ON THE IMAGE and flag the stream correctly
HCenc running in auto detect mode will do that.
It scans every frame to see if it's interlaced or progressive and set the right flags.
__________________
HCenc at: http://hank315.nl
hank315 is offline   Reply With Quote
Old 22nd March 2010, 12:00   #3  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
Quote:
Originally Posted by OvejaNegra View Post
Then i could cut and encode each section with the appropiated settings.
I do that sort of thing all the time, as long as there aren't too many switches along the way. Say there's a progressive 29.97fps opening, hard or soft telecined episode (to be IVTC'd and encoded as progressive 23.976fps with pulldown), interlaced 29.97fps credits and a hard or soft telecined preview. It's easy enough to split it into 4 sections, encode each as it should be encoded, and then join them with Muxman at the authoring stage.
manono is offline   Reply With Quote
Old 22nd March 2010, 18:17   #4  |  Link
OvejaNegra
ekTOMBE STUDIOS
 
OvejaNegra's Avatar
 
Join Date: Dec 2005
Location: Cuba
Posts: 254
Thanks both of you.

(now the user makes click on the hank315 signature and goes to download a new fresh version of HCE)
Manono: DVD re-authoring is something unknow for me:
What you use to substitute the original video track with the new you just encoded? (without affecting menus or audio or the DVD stucture)
Or that is not possible?
__________________
So, it works or not???
OvejaNegra is offline   Reply With Quote
Old 23rd March 2010, 18:58   #5  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
Quote:
Originally Posted by OvejaNegra View Post
Manono: DVD re-authoring is something unknow for me:
What you use to substitute the original video track with the new you just encoded? (without affecting menus or audio or the DVD stucture)
Aren't you reencoding this for DVD? How did you plan on getting it back into the DVD after reencoding it?

Anyway, reencode the movie or episodes or whatever it is, author with Muxman, and then put it back into the original DVD, getting back the menus and anything else you're keeping. using the 'Replace' button of VobBlanker.

The free version of DVD-Rebuilder also gives it back to you as originally - with all the original flags intact. If you haven't had encoding or authoring experience, it's a good way to accomplish what you want pretty easily.
manono is offline   Reply With Quote
Old 24th March 2010, 16:32   #6  |  Link
OvejaNegra
ekTOMBE STUDIOS
 
OvejaNegra's Avatar
 
Join Date: Dec 2005
Location: Cuba
Posts: 254
MY question is what can i use for re-mux the new encoded video track on the dvd in place of the original video track:
VobBlanker + Muxman

Yes i tested rebuilder, but i prefer do the encoding myself, and the DVDs i'm re-conding right now are flaged as interlaced but are 99% FILM and y prefer it that way because the encoder encode as progressive with 3:2 pulldown and because trimension works correctly on my old Windvd
But i'm not sure if remuxing a video track with different flags (interlaced VS 3:2) will affect the dvd structure in some way (i think not, but i don't have any experience with this)

To avoid creating a new thread:
Using the tools you mention can i re-encode a PCM / DTS audio track as dolby or mp2 and use it in place of the original track?
Or re-encode one (or two) 5.1 dolby track as stereo an remux in place the the original tracks (to save bit rate for the video)?

And finally (yes, im abusing of your pacience
I like trimension (faking it with avisynth does not look the same for me)
Let's say the original DVD is already 4.37 GB so i dont need re-encode (like those anime DVDs with one or two chapters): Can i detect the Film / interlaced sections with a tool (like TIVTC in avisinth maybe) and "copy" the flags to the video stream without re-encoding? (so i can have the video stream flagged as film on the film sections)

Thanks
__________________
So, it works or not???
OvejaNegra is offline   Reply With Quote
Old 25th March 2010, 10:35   #7  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
Quote:
Originally Posted by OvejaNegra View Post
MY question is what can i use for re-mux the new encoded video track on the dvd in place of the original video track:
VobBlanker + Muxman
As I said last time:
Quote:
Originally Posted by manono View Post
Anyway, reencode the movie or episodes or whatever it is, author with Muxman, and then put it back into the original DVD, getting back the menus and anything else you're keeping. using the 'Replace' button of VobBlanker.
So, take the reencoded video, your audio, the chapter list from the Celltimes.txt, the subs, if any, and load them all into Muxman for authoring. When done you'll have a DVD of the movie alone. Stick it back into the original DVD by opening the original DVD in VobBlanker and using the 'Replace' button to add in your new DVD.
Quote:
Using the tools you mention can i re-encode a PCM / DTS audio track as dolby or mp2 and use it in place of the original track?
Yes, you can use different audio. The audio reencoding should be done separately. Muxman only authors. VobBlanker will ask you if you really want to use a different audio and if the IFOs should be changed (answer 'yes').
Quote:
I like trimension (faking it with avisynth does not look the same for me)
I have no idea what trimension is, but AviSynth doesn't 'fake' anything.
Quote:
Can i detect the Film / interlaced sections with a tool (like TIVTC in avisinth maybe) and "copy" the flags to the video stream without re-encoding? (so i can have the video stream flagged as film on the film sections)
The only way to reflag certain sections of which I'm aware is to split up the video, reflag those sections you want, and then rejoin the pieces in Muxman. If you're saying it's incorrectly flagged in places, I'd need a sample showing the incorrect flagging before I'd be prepared to believe that. I'm not saying incorrect flagging doesn't occur, but only that it's fairly rare and given your displayed level of knowledge so far, your saying it doesn't make it so. No offense intended, but I suspect you're confusing hard telecine (the telecine encoded into the video) with soft telecine (progressive 23.976fps film with 3:2 pulldown applied). And reflagging something like that as progressive will give you a complete mess - something that will give most DVD players fits..
manono is offline   Reply With Quote
Old 27th March 2010, 01:17   #8  |  Link
OvejaNegra
ekTOMBE STUDIOS
 
OvejaNegra's Avatar
 
Join Date: Dec 2005
Location: Cuba
Posts: 254
Thank you for your atention:

Trimension is something from Intervideo WinDVD (actually now it's Corel Windvd). It interpolates frames and make a telecined video (23.976) with 60 fps (yes ok, those are fake frames) but it looks VERY fluid (like video from a comon DV home camera or like sports footage). Using Avisynth and MVtools there are some tricks to simulate the effect (there was a disscusion about that right here on this forum), but for me it does not look the same.

Read here first:
http://en.wikipedia.org/wiki/Trimension

If the DVD is FILM with the usual flags it will be detected by trimension and trimension will work.
If the DVD is interlaced (real interlaced content) in wont work because is not needed (the bob deinterlacer of windvd will give the 60 fps and the fluid look)

As far as i know (correct me if i'm wrong) Hard telecine is (as you say) the telecine encoded right on the video with out flags (DGindex wont report it as FILM). You can use detection on the image to restore the film frames (like many plugins on avisnth do).

BUT: Many anime DVDs (i'm talking about japan anime right here, not usual animation like disney, those are ok) contains a mix of:
Sections with FILM (23.976)
Sections with 29.97 progressive CG effects or pannings
Real interlaced fades or rolling credits at the end (you can bob those sections and the credits roll very smooth and the fades look very smooth too)

All that flagged as interlaced ALL the time (Dgindex shows interlaced / VIDEO all the time)

But if you use TFM (from tivtc) and Tdecimate you can recover the FILM / Progressive sections and well for the interlaced credits + fades do some trick.

If you play a DVD like this one on WinDVD trimesion wont work because it "thinks" its a normal VIDEO movie and will use a simple Bob or maybe nothing.

Doing some experiments with HCENC (re- encoding the DVD of course) and using the auto detect produces a stream with the Film sections flagged as FILM and the others, well as they should. And that stream will run on WinDVD with the Trimension working as it should (it auto-disables on non film sections and auto- enable on film sections) and looks good. But in the end i'm re-encoding the video.

My question is if its possible scan the video (inspecting the frames) detecting the film / progressive / true interlaced sections and rewrite the flags for each section with out encoding the video bacause is not necesary.

I have some anime DVDs i want to modify (add a new subtitle stream and replace one audio stream) and if i'm going to do that, well maybe do the reflag trick to make them work with trimension.

Well thats all. I will upload a sample if you need it.

Thanks for the help.

Two more links:
http://www.avsforum.com/avs-vb/showthread.php?t=1025800
http://forum.doom9.org/showthread.php?t=138305 (read here: Particularities of anime)

Thanks
__________________
So, it works or not???
OvejaNegra is offline   Reply With Quote
Old 27th March 2010, 06:15   #9  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
Quote:
Originally Posted by OvejaNegra View Post
As far as i know (correct me if i'm wrong) Hard telecine is (as you say) the telecine encoded right on the video with out flags (DGindex wont report it as FILM). You can use detection on the image to restore the film frames (like many plugins on avisnth do).
Not without reencoding it, you can't. Anything you do in an AviSynth script (like the IVTC to which you're referring) has to be reencoded for the wanted changes to take place
Quote:
BUT: Many anime DVDs (i'm talking about japan anime right here, not usual animation like disney, those are ok) contains a mix of:
Sections with FILM (23.976)
Sections with 29.97 progressive CG effects or pannings
Real interlaced fades or rolling credits at the end (you can bob those sections and the credits roll very smooth and the fades look very smooth too)

All that flagged as interlaced ALL the time (Dgindex shows interlaced / VIDEO all the time)
If there's progressive film, it's not encoded as interlaced. Hard telecine is (and should be) encoded as interlaced. If you have a counter example, post it somewhere for us to have a look. Progressive 29.97fps content is almost always encoded as interlaced. No big deal. Except maybe to the flag reading software and standalone DVD players that will deinterlace it. Better cadence readers can output the untouched progressive frames.
Quote:
If you play a DVD like this one on WinDVD trimesion wont work because it "thinks" its a normal VIDEO movie and will use a simple Bob or maybe nothing.
Most software DVD players are lousy flag readers and shouldn't be used with difficult sources such as anime or TV shows on DVD. I believe the Nvidea player can perform an on-the-fly IVTC.
Quote:
My question is if its possible scan the video (inspecting the frames) detecting the film / progressive / true interlaced sections and rewrite the flags for each section with out encoding the video bacause is not necesary.
Do you not understand what's at work here? You can't just reflag hard telecine. It has to be reencoded in order to properly flag it as progressive. Why are you married to this WinDVD Trimension? Get a better player if you watch via your computer or HTPC. I'm not one of those that thinks creating new frames is such a good idea. Not with all the artifacting they leave behind, and the altered appearance of the video. Converting to 120 or 240 Hz is a fine idea when the frames are duplicated. I have no problem at all with this kind of source as the Oppo series of DVD players will IVTC hard telecine. Or go read in the AVS Forums about what people use to get optimum playback for all their DVDs. A lot of them run the video through AviSynth scripts on the way to the display device. Yeah, I know, you did already. Maybe someone else can give you the answers you want. Good luck.
manono is offline   Reply With Quote
Old 29th March 2010, 21:55   #10  |  Link
OvejaNegra
ekTOMBE STUDIOS
 
OvejaNegra's Avatar
 
Join Date: Dec 2005
Location: Cuba
Posts: 254
Quote:
Not without reencoding it, you can't. Anything you do in an AviSynth script (like the IVTC to which you're referring) has to be reencoded for the wanted changes to take place
Yes, of course, i know i have to re-encode the video. Sorry if i dont explain myself correctly.


Quote:
Progressive 29.97fps content is almost always encoded as interlaced
Why not as progressive? It's for correct displaying on analog TV?

Quote:
Most software DVD players are lousy flag readers and shouldn't be used with difficult sources such as anime or TV shows on DVD. I believe the Nvidea player can perform an on-the-fly IVTC.
Note taken. I will take a look to the nvidia player. When you say on the fly ivtc, are you talking about detecting correctly the FILM content without using the flags on the stream right? So it will display conrrectly the hard-telecined content?

Quote:
Do you not understand what's at work here? You can't just reflag hard telecine. It has to be reencoded in order to properly flag it as progressive
I dont understand why you cant reflag hard telecine sections as normal FILM (soft telecine) without re-encoding <<< this was my original question.

Yes, i understand why now. Soft telecine streams have 23.976 fps and hard telecine streams have 29.976 fps.

Quote:
Maybe someone else can give you the answers you want. Good luck.
Please don't get angry. The laguage barrier is something i cant solve for now.

I think we both have a serious miss understanding of what im asking and what you think i'm asking.

I'm not so obsessed with trimension (it works well with the R1 DVDs with soft telecine or PAL DVDs).

If im going to mess with my anime DVDs to add subtitle / audio tracks, well why not reflag the hard telecine sections as soft telecine?

But know i know is not possible without re-encoding.

Yes you just answered my question.

Thank you again for your patience and sorry for being so newbie.




Have a nice day. (No sarcasm intended, i really wish you a good day).
__________________
So, it works or not???
OvejaNegra is offline   Reply With Quote
Old 30th March 2010, 00:51   #11  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by OvejaNegra View Post
Yes, of course, i know i have to re-encode the video. Sorry if i dont explain myself correctly.
If you know that, why did you ask:

Quote:
My question is if its possible scan the video (inspecting the frames) detecting the film / progressive / true interlaced sections and rewrite the flags for each section with out encoding the video bacause is not necesary.
You can rewrite the flags but you also have to modify the stream itself (see below).

Quote:
Yes, i understand why now. Soft telecine streams have 23.976 fps and hard telecine streams have 29.976 fps.
No, it's nothing to do with the frame rate. It's very simple. With hard telecine, you have physical copies of the fields. So the result is that you have some interlaced frames that truly are constructed from fields from different temporal moments. You cannot undo that by changing the flagging.

Quote:
Please don't get angry. The laguage barrier is something i cant solve for now.
Nobody is angry and it is rude for you to suggest that manono, one of the most patient guys I know, is angry.

Quote:
I think we both have a serious miss understanding of what im asking and what you think i'm asking.
Nope, just you.

Quote:
If im going to mess with my anime DVDs to add subtitle / audio tracks, well why not reflag the hard telecine sections as soft telecine?
Because it would create a mess *unless* you also physically remove the field duplicates.

Quote:
But know i know is not possible without re-encoding.
But you keep asking for it anyway! See above.

Last edited by Guest; 30th March 2010 at 00:53.
Guest is offline   Reply With Quote
Old 31st March 2010, 15:45   #12  |  Link
OvejaNegra
ekTOMBE STUDIOS
 
OvejaNegra's Avatar
 
Join Date: Dec 2005
Location: Cuba
Posts: 254
Quote:
If you know that, why did you ask: (...)
Manono is tellin me (i think) that i can't magically preocess anything with avisynth without actually doing a reencode of the content.

I say yes, i know that.

My orignal intention with TIVTC was using (for example) the matches output from TFM to identify each section on the video stream an rewrite the flags.

Quote:
Originally Posted by OvejaNegra ->
As far as i know (correct me if i'm wrong) Hard telecine is (as you say) the telecine encoded right on the video with out flags (DGindex wont report it as FILM). You can use detection on the image to restore the film frames (like many plugins on avisnth do).
I think Manono got confused because how i asked the question.

Quote:
Nobody is angry and it is rude for you to suggest that manono, one of the most patient guys I know, is angry.
Sorry if i sounded rude (That was exactly the oppossite of my intentions). When Manono said "Maybe someone else can give you the answers you want. Good luck" my impression was he got angry for me being so persistant.

Quote:
But you keep asking for it anyway! See above
Sorry but... where?

Annyway im not going to keep asking this. I know possitive now that is not possible, and HCenc does a good job with the auto option.
Thanks
__________________
So, it works or not???
OvejaNegra is offline   Reply With Quote
Reply

Tags
dvd, encoding, flags, hybrid, interlaced

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 16:42.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.