Log in

View Full Version : help with megui muxing mp4 files


memberako
20th July 2007, 14:28
guys, i need your help... it says "error" when i try to mux mp4 videos using megui... but when i use yamb, it works... i don't know what's wrong... i even tried installing it again but it didn't work...

Looking for job processor for job...
Processor found!


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

Starting job job1 at 6:59:27 PM
Starting preprocessing of job...
Preprocessing finished!
encoder commandline:
-add "Z:\movie video.mp4" -add "Z:\movie audio.mp4":lang=eng -new "Z:\movie.mp4" -tmp "Z:\"
Job not started. Reason: starting encoder failed with error 'Process has exited'
Processing ended at 6:59:28 PM
----------------------

Log for job job1

Cannot open destination file Z:\movie.mp4: I/O Error

----------------------
End of log for job1
-------------------------------------------------------

thanks.

check
20th July 2007, 15:10
You can't output on top of a file you are using as input :) EDIT:lies, see below.

Kurtnoise
20th July 2007, 15:30
i don't know what's wrong...
wrong command line used...


Must be :
-add "Z:\movie video.mp4" -add "Z:\movie audio.mp4:lang=eng" -new "Z:\movie.mp4" -tmp Z:\

instead of
-add "Z:\movie video.mp4" -add "Z:\movie audio.mp4":lang=eng -new "Z:\movie.mp4" -tmp "Z:\"

Kurtnoise
20th July 2007, 15:31
You can't output on top of a file you are using as input :)
of course you can...

check
20th July 2007, 15:34
of course you can...
You can? :o Sorry, I'm more used to mkvmerge...

Kurtnoise
20th July 2007, 17:16
here is the patch :

Index: util/CommandLineGenerator.cs
===================================================================
--- util/CommandLineGenerator.cs (revision 138)
+++ util/CommandLineGenerator.cs (working copy)
@@ -864,9 +864,10 @@
StringBuilder sb = new StringBuilder();
if (settings.VideoInput.Length > 0)
{
- sb.Append("-add \"" + settings.VideoInput + "\"");
+ sb.Append("-add \"" + settings.VideoInput);
if (!settings.VideoName.Equals(""))
- sb.Append(":name=\"" + settings.VideoName + "\"");
+ sb.Append(":name=" + settings.VideoName);
+ sb.Append("\"");
}
if (settings.MuxedInput.Length > 0)
{
@@ -875,20 +876,22 @@
foreach (object o in settings.AudioStreams)
{
SubStream stream = (SubStream)o;
- sb.Append(" -add \"" + stream.path + "\"");
+ sb.Append(" -add \"" + stream.path);
if (stream.language != null && !stream.language.Equals(""))
sb.Append(":lang=" + stream.language);
if (stream.name != null && !stream.name.Equals(""))
- sb.Append(":name=\"" + stream.name + "\"");
+ sb.Append(":name=" + stream.name);
if (stream.delay != 0)
sb.AppendFormat(":delay={0}", stream.delay);
+ sb.Append("\"");
}
foreach (object o in settings.SubtitleStreams)
{
SubStream stream = (SubStream)o;
- sb.Append(" -add \"" + stream.path + "\"");
+ sb.Append(" -add \"" + stream.path);
if (!stream.language.Equals(""))
sb.Append(":lang=" + stream.language);
+ sb.Append("\"");
}

if (!settings.ChapterFile.Equals("")) // a chapter file is defined
@@ -902,8 +905,8 @@
string fpsString = settings.Framerate.ToString(ci);
sb.Append(" -fps " + fpsString);
}
- sb.Append(" -new \"" + settings.MuxedOutput + "\"");
- sb.AppendFormat(" -tmp \"{0}\"", Path.GetDirectoryName(settings.MuxedOutput));
+ sb.AppendFormat(" -tmp {0}", Path.GetDirectoryName(settings.MuxedOutput));
+ sb.Append(" -new \"" + settings.MuxedOutput + "\"");
return sb.ToString();
}
#endregion

memberako
21st July 2007, 00:56
im sorry, how can i use/make this patch? thanks.

bond
21st July 2007, 06:34
moved to gui forum

either a megui dev will realise it or you need to send the patch to one yourself

Kurtnoise
21st July 2007, 06:35
Just use it against the last svn entry to recompile megui...I can provide you a binary for sure but it costs 20 €...:D



/me kidding

deets
24th July 2007, 22:44
oh i get this as well, now i have to use yamb to mux :)

nxmehta
10th September 2007, 23:44
I still see this error as well. Has this not been fixed yet in MeGUI? Can someone please check this fix in. Seems like muxing mp4s is something that is useful.

If there's a way for me to check code into the SVN repository then I'll try to do it :)

Kurtnoise
11th September 2007, 07:20
you should use a development build...this has been fixed.

fatxy
5th November 2007, 23:09
hmm its not workin here too :(

dev build MeGUI Version: 0.2.6.1034:

Log for job job4

Job commandline: "D:\Programme\megui_dev\tools\mp4box\mp4box.exe" -add "C:\test.264" -add "C:\test.m4a" -fps 25 -tmp "C:\" -new "C:\test-muxed.mp4"
MP4Box [option] input [option]
-h general: general options help
-h hint: hinting options help
-h import: import options help
-h encode: encode options help
-h meta: meta handling options help
-h extract: extraction options help
-h dump: dump options help
-h swf: Flash (SWF) options help
-h crypt: ISMA E&A options help
-h format: supported formats help
-nodes: lists supported MPEG4 nodes
-node NodeName: gets MPEG4 node syntax and QP info
-xnodes: lists supported X3D nodes
-xnode NodeName: gets X3D node syntax
-snodes: lists supported SVG nodes
-snode NodeName: gets SVG node syntax
-languages: lists supported ISO 639 languages
-quiet: quiet mode
-v: verbose mode
-version: gets build version

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

End of log for job4
------------------------------------------------------


normal build:

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

Starting job job1-4 at 22:32:23
Starting preprocessing of job...
Preprocessing finished!
encoder commandline:
-add "C:\test.264" -add "C:\test.mp4" -fps 25 -new "C:\test-muxed.mp4" -tmp "C:\"
successfully started encoding
Processing ended at 22:32:23
----------------------

Log for job job1-4

Cannot open destination file C:\test-muxed.mp4: I/O Error

----------------------
The current job contains errors. Skipping chained jobs
End of log for job1-4
-------------------------------------------------------


only yamb works

ele_mental
6th November 2007, 00:23
Could be the version of mp4box? Had muxing issues a while back and pointed megui to NicMP4Box and have never experienced muxing issues. Finished this one up a moment ago-
Log for job job15

Job commandline: "C:\Program Files\megui\tools\NicMP4Box.exe" -add "K:\Flick\Flick.mp4" -add "K:\Flick\Flick T01 3_2ch 448Kbps DELAY 0ms.m4a" -fps 23.976 -tmp "K:\Flick" -new "K:\Flick\Flick-muxed.mp4"
Saving K:\Flick\Flick-muxed.mp4: 0.500 secs Interleaving

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

Starting postprocessing of job...
Job completed successfully and deletion of intermediate files is activated
Postprocessing finished!
End of log for job15

Kurtnoise
6th November 2007, 10:56
@fatxy: you have to run MeGUI as admin high levels on Vista...

fatxy
7th November 2007, 23:20
@fatxy: you have to run MeGUI as admin high levels on Vista...

yep i know thats what i am doing :)
ill try another version of mp4box...

Sharktooth
8th November 2007, 18:17
weird. it works here.

Kurtnoise
8th November 2007, 20:05
We need to remove the tmp command...and all problems will be gone.

Sharktooth
8th November 2007, 22:58
well, i know... but removing the -tmp command will end up in other problems as well...
what do you suggest?

berrinam
8th November 2007, 23:40
For the time being, check if OS is Vista. If so, remove -tmp, if not, leave it in.

Alternatively, provide an option in the setting to set the -tmp folder, or not to have it set at all.

Sharktooth
9th November 2007, 04:12
for the end user it will be better an auto-check for the OS and setting the commandlines accordingly.

Kurtnoise
9th November 2007, 08:03
That's not enough...

1/ tmp command is not mandatory for Vista. Personally, I don't use it with Yamb and that works perfectly.
2/ Problem occurs when users put their output files in the root of the hard drives. In other words,

....-tmp "C:\" -new "C:\output.mp4"
returns an error but
....-tmp C:\ -new "C:\output.mp4"
works fine. Don't ask me why. That's MP4Box behaviour...

So, to solve this I've 3 propositions:
Remove the tmp command...:D
Check the output path and raise a warning when the output file is located in the root [in the Queue button Event].
Check the output path and set up the appropriate command line [in the MP4BoxMuxer part].


What do you prefer ?

Sharktooth
9th November 2007, 14:54
i think the 3rd is the best solution. and btw this is a mp4box bug...

Kurtnoise
9th November 2007, 15:22
yeah I know...So, something like that:

Index: core/util/Util.cs
===================================================================
--- core/util/Util.cs (revision 352)
+++ core/util/Util.cs (working copy)
@@ -178,7 +178,18 @@
if (!t.HasValue) return null;
return t.Value.ToString();
}*/
-
+ public static int CountStrings(string src, char find)
+ {
+ int ret = 0;
+ foreach (char s in src)
+ {
+ if (s == find)
+ {
+ ++ret;
+ }
+ }
+ return ret;
+ }

#region range clamping
public static void clampedSet(NumericUpDown box, decimal value)
Index: packages/mux/mp4/MP4BoxMuxer.cs
===================================================================
--- packages/mux/mp4/MP4BoxMuxer.cs (revision 352)
+++ packages/mux/mp4/MP4BoxMuxer.cs (working copy)
@@ -238,8 +238,13 @@
}

// tmp directory
- sb.AppendFormat(" -tmp \"{0}\"", Path.GetDirectoryName(settings.MuxedOutput));
-
+ if (Util.CountStrings(settings.MuxedOutput, '\\') > 1) {
+ sb.AppendFormat(" -tmp \"{0}\"", Path.GetDirectoryName(settings.MuxedOutput));
+ }
+ else {
+ sb.AppendFormat(" -tmp {0}", Path.GetDirectoryName(settings.MuxedOutput));
+ }
+
// force to create a new output file
sb.Append(" -new \"" + settings.MuxedOutput + "\"");
return sb.ToString();

looks ok ?

Sharktooth
9th November 2007, 16:05
yes. that should work

EDIT: just a reminder, if you commit that patch add it to trunk and all branches as well.

Kurtnoise
9th November 2007, 18:04
How to merge the commits from the trunk to the all branches ?

Sharktooth
9th November 2007, 18:17
create a patch (unified diff) against the previous rev and save it (as in your previous post).
merge the patch to the other branches and commit changes.

Sharktooth
9th November 2007, 19:41
np. im just doing it.

fatxy
10th November 2007, 17:47
i auto-update to 1036 and tried a fresh install but:

http://img88.imageshack.us/img88/9030/errorqp6.png (http://imageshack.us)

Kurtnoise
11th November 2007, 09:08
remove the files which are in the jobs folder...

fatxy
11th November 2007, 12:13
ah thanks, that worked.

dunno if you wanted to fix the root as path thingy, here it still doesn't work. but as i know now the reason im doing my encodes in an etxra dir.

Kurtnoise
11th November 2007, 13:37
dunno if you wanted to fix the root as path thingy, here it still doesn't work.
it has been fixed in the svn trunk even if I don't like it...so, wait an update.

Sharktooth
11th November 2007, 16:17
a new stable release will come the next week.

Taurus
11th November 2007, 16:51
dunno if you wanted to fix the root as path thingy, here it still doesn't work. but as i know now the reason im doing my encodes in an etxra dir.

it has been fixed in the svn trunk even if I don't like it...so, wait an update.

I get a shiver seeing users putting their files in the root...
Mistakenly: del C:\ *.* | Whoa! Now ALL my files are gone. Windows goodbye!
At least they get tangled between system files if on C:\

Kurtnoise
1st December 2007, 10:15
That's not enough...

1/ tmp command is not mandatory for Vista. Personally, I don't use it with Yamb and that works perfectly.
2/ Problem occurs when users put their output files in the root of the hard drives. In other words,

....-tmp "C:\" -new "C:\output.mp4"
returns an error but
....-tmp C:\ -new "C:\output.mp4"
works fine. Don't ask me why. That's MP4Box behaviour...

I like my Windows OS....


Hehe, funny one :)

On win prompt, [-tmp "E:\"] [-opt1] [-opt2] is passed to the program as
[-tmp E:" -opt1 ] [-opt2] because \" is interpreted as escape for ". And as
usual, "E:\\" works like a charm.

I guess using \\ everywhere can help you there.
http://sourceforge.net/tracker/index.php?func=detail&aid=1768718&group_id=84101&atid=571738