Log in

View Full Version : Command Line Muxer for HD Mpeg2 ?


Pookie
20th October 2005, 09:32
I do have a Gui version of Mplex.exe which works well when muxing 720p and 1080i .m2v and .ac3 files, but I'd like to automate the process so my machine can do the work at night.

I've tested every version of Mplex.exe I could find. Unfortunately, all of them choke after 5 seconds of muxing and exit.

I've looked at the syntax of Mencoder and FFMpeg, but no loving there either.

TIA

Prodater64
30th October 2005, 10:41
What about bbmpeg?

Pookie
5th November 2005, 03:37
I checked bbMPEG's documentation and I must be missing something. I don't see any place where it can mux via command line.

Prodater64
6th November 2005, 11:32
I checked bbMPEG's documentation and I must be missing something. I don't see any place where it can mux via command line.

Do use the bbmpeg version that came with dvd2svcd.
Basically you must to create first a bbmpeg.ini (default.ini) with your settings, it is to say, MPEG1, VCD, MPEG2, SVCD or DVD profiles. Remember always set "force mux rate = 0".

http://www.kvcd.net/Shot7.jpg

start bbMPEG and set the settings you need
save settings as default
close bbMPEG
open c:\bbmpegs folder\default.ini
add these lines to default.ini with notepad
AudioFilename=c:\your source folder\your audio source file 1.mp2
Audio1Filename=c:\your source folder\your audio source file 2.mp2 *
VideoFilename=c:\your source folder\your video source file.m2v
open bbMPEG with command line:
runbbMPEG c:\output folder\outputfile.mpg

runbbMPEG is a little app that comes with DVD2SVCD bbmpeg version.

Of course your cli app must to change your default.ini file each time before a new conversion, in such way that the new one file includes the names of the each a/v streams pairs:

Something like:
First do create all you ini files.
The batch file would be

Copy c:\inifiles\first.ini to c:\my project\default.ini
runbbMPEG c:\output folder\first.mpg
Copy c:\inifiles\second.ini to c:\my project\default.ini
runbbMPEG c:\output folder\second.mpg
Copy c:\inifiles\third.ini to c:\my project\default.ini
runbbMPEG c:\output folder\third.mpg

runbbmpeg, bbmpeg.dll and default.ini must to be in the same folder.

It seems hard to do, but when you catch it, you will feel happy.



http://www.kvcd.net/forum/images/smiles/ok.gif

Pookie
9th November 2005, 10:23
Hey, I'll try it. Thanks for the directions. I'll let you know :)

Prodater64
9th November 2005, 21:52
Hey, I'll try it. Thanks for the directions. I'll let you know :)


I forget.

Audio1Filename=c:\your source folder\your audio source file 2.mp2

This line is in case you have 2 audio files, if you have only one:

AudioFilename=c:\your source folder\your audio source file 1.mp2
Audio1Filename=

Pookie
10th November 2005, 08:22
Yes indeed, you can do it from the command line. Still working out a few buffer underflow messages, but I think that can be fixed. This should work fine for the time being. Many thanks, Prodater64

One thing to note for anyone else trying this,
These two lines must be in the [iofiles] section of the default.ini file

AudioFilename=D:\bits0001.ac3 or whatever your file names are
VideoFilename=D:\bits0001.mpv

Update: Was able to completely eliminate buffer underflow messages by using 64000 as the mux rate. Dunno if that's too high, but it seems to work.

Prodater64
10th November 2005, 09:18
Yes indeed, you can do it from the command line. Still working out a few buffer underflow messages, but I think that can be fixed. This should work fine for the time being. Many thanks, Prodater64

One thing to note for anyone else trying this,
These two lines must be in the [iofiles] section of the default.ini file

AudioFilename=D:\bits0001.ac3 or whatever your file names are
VideoFilename=D:\bits0001.mpv

Update: Was able to completely eliminate buffer underflow messages by using 64000 as the mux rate. Dunno if that's too high, but it seems to work.


It seems that you didn't read completely one of my previous post where i said set "forced mux rate" value = 0.

This would get rid of underflows.

Pookie
10th November 2005, 09:37
Ah, but I DID, Prodater. I appreciate all the work you did to write the instructions, so I read them :p . Maybe it was just a glitch with the particular files I was testing, but 0 produced around eight buffer underruns. I'll test it out on several more files and post the results.

Prodater64
10th November 2005, 18:27
Ah, but I DID, Prodater. I appreciate all the work you did to write the instructions, so I read them :p . Maybe it was just a glitch with the particular files I was testing, but 0 produced around eight buffer underruns. I'll test it out on several more files and post the results.


Sorry, then the cause is surely that i never muxed HD mpegs with this (neither another) tool.
Now i will wait your new feedback, thank you.

Do you do all by command line or are you writing a GUI for batch muxing?

FredThompson
11th November 2005, 08:27
Sorry, then the cause is surely that i never muxed HD mpegs with this (neither another) tool.
Now i will wait your new feedback, thank you.
That was irresponsible of you. The request was for specific help, not projection of what might, theoretically, you hope so you don't have to test, ideas. :angry:

Prodater64
11th November 2005, 08:47
That was irresponsible of you. The request was for specific help, not projection of what might, theoretically, you hope so you don't have to test, ideas. :angry:

:stupid: :stupid: :stupid: :stupid: :stupid: :stupid: :stupid: :stupid:

oh!! i sorry so much.

Did you read my first question?

What about bbmpeg?

FredThompson
11th November 2005, 09:41
Yes, I read it. You asked if Pookie had tried bbmpeg then gave instructions for a few posts and, only after that, did you mention you had never done this. Your posts read like definite instructions, not "I have an idea which might work."

Prodater64
11th November 2005, 10:35
Yes, I read it. You asked if Pookie had tried bbmpeg then gave instructions for a few posts and, only after that, did you mention you had never done this. Your posts read like definite instructions, not "I have an idea which might work."

OT
You come here after i solved the problem and begin to critic.
I did many times what i posted, but not for HD mpegs.
I am the only person that had helped our partner. After that, you come here and throw your critic.
IMHO, if i don't broke any rule, you can keep your mouth closed.
I sure you that not to many people know what i posted here.
So, please, don't botter with more of topic stuff, or i will have to report you to a mod.

Also i already gived you my apologies.

:stupid: :stupid: :stupid: :stupid: :stupid: :stupid:

I'm here with a really, big, stupid!

Sorry for my bad english, it is not my native language.
End OT

FredThompson
11th November 2005, 15:38
Your first reply to me showed it was obvious English is not your native language. I tried to explain to you how your choice of English words communicated something different than what you thought it communicated.
You come here after i solved the problem and begin to critic.You did not "solve" anything, you proposed an idea which did not work.

After that, You asked me a direct question now you complain about receiving an answer to that question.

My comments were about what you posted. You are attacking me, personally. Those are two very different things.

You have an attitude problem.

Pookie
11th November 2005, 19:37
BTW, buffer underflows at any setting. I tested on different sources. :( It averages around 20-30 errors per file. Not enough to make a big difference, though.

Anyway, it still is the best/only solution at the moment. I don't mind testing out this method, even if it was theoretical to begin with. There isn't any other way at the moment to mux HD from the command line.

FredThompson
12th November 2005, 00:34
Try mplex http://members.aon.at/johann.langhofer/mplex1.htm

It doesn't seem to like every source but you can give it a try.

Pookie
12th November 2005, 05:49
Thanks Fred. That was one of the many in my initial tests. I even searched the Japanese video processing sites (man, they have some good apps !) to no avail. Same with our friends "down unda".

Mencoder kinda has a muxer for certain file types, but I haven't made it work with Mpeg2 HD.

The Tivo modder folks actually modified the Mplex that comes with DVDAuthor to create muxed files that could be transfered and played TO tivo. I suspect the source code of Mplex could be modified to support HD, but having skipped my Pascal final in order to see the Who (who had promised THAT would be their LAST tour, yeah right), I'm way over my head on that one.

Regardless, I appreciate you and prodater64 for replying and suggesting some options.

Prodater64
12th November 2005, 11:52
... That was one of the many in my initial tests.

Did you take care of correct options?



FUNCTION LETTERS
-f|--format format_code
This command allows one of a number of convenient preset output formats or generic MPEG1 or MPEG2 output to be selected. For the generic formats other function letters can be used to control many aspects of the multiplexed stream. For VCD/SVCD/DVD compliant output the corresponding formats must be used as the standards require the multiplexer to enforce a variety of special constraints on the structure of the output stream.

0 - Generic MPEG1. A simple general-purpose MPEG1 format primarily suitable for software decoders. Buffer sizes and VBR must be specified. Bit-rate can be auto-detected.
1 - VCD. Standard VCD. Overrides other option settings.
2 - User VCD. VCD format but buffer size, bit rate and VBR can be set manually.
3 - Generic MPEG2. Like 0 except MPEG2.
4 - SVCD. Standard SVCD. Overrides other option settings.
5 - User-rate SVCD. SVCD format but buffer size bit rate and VBR can be set.
6 - VCD Stills stream (mixed mode with hi-res and standard-res image streams multiplexed are supported).
7 - SVCD Stills stream.
8 - DVD (with NAV sectors). Don't get too excited. This is really a
very minimal mux format. It includes empty versions of the peculiar
VOBU start sectors DVD VOB's include. This is enough to persuade some
hardware players to play the stream but is a long way from full DVD authoring.
9 - DVD. As above but without the empty VOBU sectors.


I think you need to use some of the red switches as they permits you to set the bitrate and another non standard options, but you need to read all doc file: Mplex_doc.zip (http://rapidshare.de/files/7518672/MPlex_doc.zip.html)

Pookie
12th November 2005, 12:45
Prodater - Nope, I get a "too many frame drops" message and it terminates after 5 seconds. Thanks, though.

Prodater64
12th November 2005, 15:58
Prodater - Nope, I get a "too many frame drops" message and it terminates after 5 seconds. Thanks, though.

The too many fram drops messages is due to a bad config as i said you in my previous post. You need to set it with switches i said more "-r xxxxxx" where xxxxxx is a number big enough to avoid frame drops (due to underflows i think), same when you selected 64000 for bbmpeg.

FredThompson
12th November 2005, 19:48
I've got quite a few HD apps that do "halfway" the things you really need. ProjectX, for example, can demux but not mux. HD-specific tools appear to be about as sophisticated as DVD backup tools were 3 or 4 years ago. TyTool works with most HD MPEG2 but it has to be a MPEG format, not elementary streams. IIWY, I'd check at the AVS Forum http://www.avsforum.com/avs-vb/index.php

Pookie
12th November 2005, 21:09
Prodater - I'll keep testing out some "-r " settings and I'll post the results.

Here's a short demuxed sample of HD material if you're interested in testing this as well. 21MB in size http://s5.ultrashare.net/hosting/fs/10bae24b81d33240/



Fred - Indeed. I have ProjectX running via command line to demux my transport streams, and it works flawlessly. I check out Avsforum frequently for their contributor's apps - Mpeg2Repair is top of the line for fixing bad TS files. They also host a command line TS demuxer called Xport which works well if the source is perfect.

Prodater64
12th November 2005, 22:22
Prodater - I'll keep testing out some "-r " settings and I'll post the results.

Here's a short demuxed sample of HD material if you're interested in testing this as well. 21MB in size http://s5.ultrashare.net/hosting/fs/10bae24b81d33240/


Downloading.
Do you have any bitrate restriction when streams are muxed.

Gabrielgoc
14th November 2005, 01:47
Dou need to Mux to HD Transport Stream (like DTV) or Program Stream (like DVD)?

Gabriel

Pookie
14th November 2005, 05:32
Either would be fine, but I'd prefer Program Stream.

Prodater64
27th November 2005, 01:53
Ah, but I DID, Prodater. I appreciate all the work you did to write the instructions, so I read them :p . Maybe it was just a glitch with the particular files I was testing, but 0 produced around eight buffer underruns. I'll test it out on several more files and post the results.


Sorry but you maybe miss interpreted me when i posted the first bbmpeg pic.
If you just put all settings as that pic, it was wrong as i only posted it to show you the "Forced mux rate" value and not all settings.

All settings must to be as in following pic. (i tested it with your files and not underruns at all).

http://img360.imageshack.us/img360/6585/screenshot5ex.png

http://imageshack.us/img/iss1.png (http://imageshack.us)

Here the Log.txt file (http://rapidshare.de/files/8213147/Log.txt.html)

I want to explain you it as my try with bbmpeg don't give me any underruns.