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-4 Encoder GUIs

Reply
 
Thread Tools Search this Thread Display Modes
Old 19th June 2005, 02:47   #41  |  Link
berrinam
Registered User
 
berrinam's Avatar
 
Join Date: Apr 2005
Posts: 1,740
Quote:
Originally Posted by Doom9
D2V Creator: tracks selected for demux should be filled in as audio source in the main GUI and from there to the muxing window in auto mode (so that the language is pre-selected)
Any idea as to how to find the filename of the demuxed audio? It seems that all of the filename can be worked out from the Stream Information except for the bitrate of the audio. Should I just look for standard bitrates (448kbps, 384kbps, etc) or is there some way to get DGIndex to print the filenames to stdout?
berrinam is offline   Reply With Quote
Old 19th June 2005, 02:55   #42  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
It calls the files as follows:

projectname <audio format> <track> <channel_format> <bitrate>bps DELAY <delay>ms.extension

basically track is important (T01, T02, T03). So, I'd do a directory lookup (Directory.something) to get files that contain the track identifier and project name.. I think that should get you enough info to find the actual file.
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline   Reply With Quote
Old 19th June 2005, 04:32   #43  |  Link
xtknight
Registered User
 
Join Date: May 2005
Posts: 33
I don't completely understand what you want with the languages thing. I've never worked with DVDs before but I do have a full list of every DVD language if you want it. From what I could tell from your to-do list you already have a language selection (because you said instead of checkboxes)? What is the language used for? .ifo files? What do I do once I know what language the user has chosen?

Did you get around to thoroughly testing the MP4Box progress bar? I just don't know what to do with the subtitles you sent me...I'm real inexperienced with DVDs. I understand what vob,ifo files are I just don't know what's in the ifo files and where/how subtitles are stored. I read the doom9 dvd newbie guide on it but it didn't really explain the subtitles for me.

Quote:
And yet another one: the x264cli encoder should get the video bitrate (encoder tells you at the end), and from that derive the mp4 overhead and save it to the mp4stats file (and since direct mp4 output is now possible, I guess the mp4stats in the mp4 muxer will have to be adapted to take mp4 video input into account).
So, currently, x264.exe does not get the bitrate when it's called from your app? Just a quick question: what's CLI mean?

Hey, BTW I love the new interface on the latest MeGUI!

Last edited by xtknight; 19th June 2005 at 04:55.
xtknight is offline   Reply With Quote
Old 19th June 2005, 08:27   #44  |  Link
berrinam
Registered User
 
berrinam's Avatar
 
Join Date: Apr 2005
Posts: 1,740
Can more than 2 audio tracks be put into mp4? Is there a reason that MeGUI limits it to two?

I'm asking because I want to know what should happen when the user chooses more than two audio tracks -- which ones get put into the inputs?

Also, about zones in the new interface: it doesn't seem very practical. Where do you get the frame numbers from for the zones? I would presume from the avspreview window. But this is inaccessible while the zones window is open. Also, setting credit start doesn't appear to be adding a zone at the end.
berrinam is offline   Reply With Quote
Old 19th June 2005, 11:05   #45  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
Quote:
I don't completely understand what you want with the languages thing. I've never worked with DVDs before but I do have a full list of every DVD language if you want it. From what I could tell from your to-do list you already have a language selection (because you said instead of checkboxes)? What is the language used for? .ifo files? What do I do once I know what language the user has chosen?
Alright.. if you go to the settings, you'll find two empty language dropdowns. I will fill them in the next release. Based on that info, in the d2v creator, once you've parsed the info file, you can auto check the tracks that match the prfered language from the settings.
Then once you have created the dgindex project and close the window, the two audio tracks (if they match the languages from the preferences take those two, if there's only one match, take that and the first "other".. if there's no match take the first two, or if it's only one you only take one) and plug them into the audioFiles array in the main GUI.

Quote:
Did you get around to thoroughly testing the MP4Box progress bar? I just don't know what to do with the subtitles you sent me...I'm real inexperienced with DVDs. I understand what vob,ifo files are I just don't know what's in the ifo files and where/how subtitles are stored. I read the doom9 dvd newbie guide on it but it didn't really explain the subtitles for me.
Here's how to mux 2 audio tracks and 3 subs and chapters into an mp4:

mp4box -add video.264 -add audio1.mp4;lang=eng -add audio2.mp4;lang=ger -add subtitle1.srt;lang=eng -add subtitle2.srt;lang=ger -add subtitle3.srt;lang=fre -chap chapters.txt -spf 23.976 -new output.mp4

And no, I haven't gotten around to testing it.

Quote:
Can more than 2 audio tracks be put into mp4? Is there a reason that MeGUI limits it to two?
There is no limit. However, there is a limit in a practical sense.. most people watch movies in one lanugage. If it's a foreign language move they may at times want an additional track but 3 or more tracks are simply not practical.. most people don't speak as many languages. This also corresponds with how most other programs handle things and a poll on the AutoGK site on the subject. While I've now basically rewritten the audio selection code to be as flexible as the subtitle code (thus it wouldn't be a big issue to add a track, I'm just not sure about the bitrate updates), I will not do that.

Quote:
But this is inaccessible while the zones window is open.
Wait and you'll see.. I'm already working on it and I'm sure people will like the way it is done. Naturally it won't be the regular preview window but one you have to open from the codec configuration window.

Quote:
Also, setting credit start doesn't appear to be adding a zone at the end.
It does.. just not at the point you'd think. Because I don't want to put a zone into each codec configuration I only add it at the very end when you're queueing the job. There is a basic conflict between zones and credits though.. do you show it when you enter the configuration dialog? what to do if the configuration dialog is never entered, what to do if the codec is changed (remove it in the previous codec, or leave it). So I was thinking about the following: credits (and intro in the future) will not be shown in the configuration and once a job is created, if the credits zone intersects with an existing one, the credits zone has been configured manually and thus won't do anything.. if the credits zone would be the last one it would be added. There are of course a few alternatives.. I'm not a 100% sure which would be the best one. There's also the question about profiles and zones.. right now they are saved because they're part of the settings.. but does that make sense or should zones be removed if something is saved as a profile?
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline   Reply With Quote
Old 19th June 2005, 13:35   #46  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
I've added a few design studies for some of the features on the todo list.
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline   Reply With Quote
Old 19th June 2005, 23:07   #47  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
Quote:
So, currently, x264.exe does not get the bitrate when it's called from your app? Just a quick question: what's CLI mean?
cli = commandline interface, and of course I send the bitrate to x264.exe. But at the end of encoding, x264.exe shows the following line (amongst others):

encoded 43 frames, 22.02 fps, 1095.94 kb/s

from that you can get the actual video bitrate (without container overhead) and put into the log (you can also get the container overhead from this of course... ). mencoder writes something similar. It's really no big deal, just a little commandline parsing.

If you're working on the d2v creator, make sure you use the latest sources.. the language selections in the settings can finally be made.
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline   Reply With Quote
Old 19th June 2005, 23:10   #48  |  Link
berrinam
Registered User
 
berrinam's Avatar
 
Join Date: Apr 2005
Posts: 1,740
Quote:
Originally Posted by Doom9
If you're working on the d2v creator, make sure you use the latest sources.. the language selections in the settings can finally be made.
Will do.
berrinam is offline   Reply With Quote
Old 19th June 2005, 23:18   #49  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
and there's another one if you're already working on that class.. run dgindex minimized.. the solution can be either found in the development forum or the avi.net thread.. I'm a participant in both discussions. Or perhaps it's in the old megui thread. Either way the solution is aready around, and it's a real easy fix
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline   Reply With Quote
Old 20th June 2005, 08:30   #50  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,752
In case someone did not yet notice: Microsofts default Windows filters (after a fresh install) don't convert YV12 in general, planar video formats are rather unusual. But DivX 5 or XviD - once installed - take this job, and I even got some ATI codecs some long time ago.

ffdshow's raw video conversion is just another way to go. Who knows how many more filters or codecs can be used as "helpers"...
LigH is offline   Reply With Quote
Old 20th June 2005, 09:15   #51  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
@Ligh: though that doesn't seem to be the problem here as he can play the file in a media player. But if you can, then we know the filters are available.. it's just that AVIFile works differently.. I really wished I could reproduce this somehow because right now I'm rather clueless... I know which call fails but I have no idea why.. I guess I need to read into the AVIFile API after all - unfortunately it's the one class I didn't write by myself and except for a small change to expose the video framerate I have never touched it.

But first... x264 custom matrices.
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline   Reply With Quote
Old 20th June 2005, 09:27   #52  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,752
Before you get crazy about it - first we should try to find out if the reason is the 'CPAE'* bug.

The second idea: If you are often testing many different setups, a virtual PC might be the perfect solution; install, backup the harddisk file, check out... Some even support temporary disk operations which are discarded when the emulator closes, if I remember right. BOCHS is a free solution, but maybe a bit slow, I'm afraid?

__

* CPAE: "Codec Packs Are Evil"
LigH is offline   Reply With Quote
Old 20th June 2005, 10:31   #53  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
what is 'CPAE'*?

ahh.. saw it in your signature. Obviously I don't have time for 20 different setups so basically we need to compare configurations of cases where it fails to find out some common ground.

And before I forget, custom matrices are actually already supported since I have added a field to the x264 configuration where you can plug in additional commandline parameters.. just plug in a valid matrix configuration there and you're all set. And those settings are even saved in profiles
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline   Reply With Quote
Old 20th June 2005, 10:59   #54  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,752
Signature? - No, just a "footnote"! (Just made something similar to the "ID-10T error".)
LigH is offline   Reply With Quote
Old 20th June 2005, 12:08   #55  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Quote:
AVIStreamGetFrameOpen failed
I'm struggling with such problems for years, when I was using DShow instead of avifile it was even worse. Recent months I didn't get any bug reports at all so I guess most issues are solved. Try open with AVSEdit!

http://www.planetdvb.net/AVSEdit_1.1.1.3.exe

there is a reg key where you can define which yv12 decoder to use, it's described in the AVSEdit topic
stax76 is offline   Reply With Quote
Old 20th June 2005, 12:24   #56  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
@stax: what did you change in the avi opening routines in between the last release where this problem was reported and the last release?

GetFrameOpen certainly seems to point to a decoder problem. And I'm wondering why the problem does not ocurr in VDub.. could it be that it's using homebrewn routines rather than standard VfW ones, at least for certain tasks?

I did some more reading and found this: http://www.gamedev.net/reference/pro...file/page4.asp Makes me think the conversion to 24bit could be the culprit. http://www.shrinkwrapvb.com/avihelp/avihlp_3.htmseems to confirm that converting to 24 bit can be problematic.
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline   Reply With Quote
Old 20th June 2005, 13:12   #57  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
there were a couple of different things that could cause trouble, color space, yv12 decoder, color depth and iirc even screen resolution. The functions taking care of it are:

Code:
		string GetFourCC(int value)
		{
			byte[] bytes = BitConverter.GetBytes(value);
			char[] chars = new char[4];
			
			for (int i = 0; i < bytes.Length; i++)
				chars[i] = Convert.ToChar(bytes[i]);
			
			return new String(chars);
		}
		
		public void Open(string fileName)
		{
			try
			{
				AVIFileInit();
				
				int OF_SHARE_DENY_WRITE = 32;
				
				int result = AVIFileOpen(ref AviFile, fileName,
					OF_SHARE_DENY_WRITE, 0);
				
				if (result != 0)
					throw new Exception("AVIFileOpen failed");
				
				result = AVIFileGetStream(AviFile, out AviStream,
					1935960438 /*FourCC for vids*/, 0);
				
				if (result != 0)
					throw new Exception("AVIFileGetStream failed");
				
				FrameCountValue = AVIStreamLength(AviStream.ToInt32());
				
				StreamInfo = new AVISTREAMINFO();
				
				result = AVIStreamInfo(AviStream.ToInt32(), ref StreamInfo,
					Marshal.SizeOf(StreamInfo));
				
				if (result != 0)
					throw new Exception("AVIStreamInfo failed");
				
				if (GetFourCC(Convert.ToInt32(StreamInfo.fccHandler)) == "YV12")
					FrameObject = AVIStreamGetFrameOpen(AviStream, 1);
				else
					FrameObject = AVIStreamGetFrameOpen(AviStream, 0);
				
				if (FrameObject == IntPtr.Zero) 
					throw new Exception("AVIStreamGetFrameOpen failed");
			}
			catch (Exception ex)
			{
				MessageBox.Show("An error occurred. Maybe no YV12 decoder available, installing XviD, DivX or ffdshow might help.\r\n\r\n" +
					ex.ToString(), Application.ProductName,
					MessageBoxButtons.OK, MessageBoxIcon.Error);
			}
		}
Quote:
GetFrameOpen certainly seems to point to a decoder problem. And I'm wondering why the problem does not ocurr in VDub.. could it be that it's using homebrewn routines rather than standard VfW ones, at least for certain tasks?

I did some more reading and found this: http://www.gamedev.net/reference/pr...ifile/page4.asp Makes me think the conversion to 24bit could be the culprit. http://www.shrinkwrapvb.com/avihelp/avihlp_3.htmseems to confirm that converting to 24 bit can be problematic.
I don't know but you could ask Avery Lee

Last edited by stax76; 20th June 2005 at 13:17.
stax76 is offline   Reply With Quote
Old 20th June 2005, 14:12   #58  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
thanks
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline   Reply With Quote
Old 20th June 2005, 19:54   #59  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
@xtknight: I managed to kill your muxer with my test scenarios And I scrapped everything but the idea of starting two threads besides the main processing thread.. but that seems to work as desired, even though mp4box still "runs away".. but at least I get the stdout, and when I'm not debugging I expect the GUI to stay on top of the mp4box process. Now it's time to turn that status window back alive.
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline   Reply With Quote
Old 21st June 2005, 01:39   #60  |  Link
xtknight
Registered User
 
Join Date: May 2005
Posts: 33
Quote:
Originally Posted by Doom9
and there's another one if you're already working on that class.. run dgindex minimized.. the solution can be either found in the development forum or the avi.net thread.. I'm a participant in both discussions. Or perhaps it's in the old megui thread. Either way the solution is aready around, and it's a real easy fix
yup...see my reply in that thread:

http://forum.doom9.org/showthread.php?t=94578

Quote:
Originally Posted by Doom9
@xtknight: I managed to kill your muxer with my test scenarios And I scrapped everything but the idea of starting two threads besides the main processing thread.. but that seems to work as desired, even though mp4box still "runs away".. but at least I get the stdout, and when I'm not debugging I expect the GUI to stay on top of the mp4box process. Now it's time to turn that status window back alive.
OK...uh...what was the command line you gave to kill it? I realize I need to account for the different types of status mp4muxer spits out but the problem is I don't know what those would be, so I need to try the command line here and find out.

---------------------

By the way, about that AVIStreamGetFrameOpen open problem..umm..I got that error with MeGUI when I was opening a file with a broken version of AVISynth. Could that be the problem?

To catch the errors you must open a new thread because the AVIFile API will crash your main program thread without returning anything IIRC.

Last edited by xtknight; 21st June 2005 at 01:46.
xtknight is offline   Reply With Quote
Reply

Tags
development, megui, not a help thread

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 11:49.


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