?
Solved

MPEG-2 Multiplexer needed

Posted on 2010-01-11
23
Medium Priority
?
706 Views
Last Modified: 2012-05-08
Here's my scenario:

- I have a bunch of .m2v (video) and .wav (audio) files (about 1000). I would like to put each pair together and create MPEG-2 files out of them. Is there any tool out there that does that?

- If there is such a tool, does it have a command line in which one can submit jobs to it?
0
Comment
Question by:alateos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 8
  • 5
23 Comments
 
LVL 3

Accepted Solution

by:
danlein earned 1600 total points
ID: 26289731
mkvmerge works wonderfully, and has the option to show you the command line so you can edit and replace filenames at your convenience.  This is located under the "muxing" menu, and "show command line"

download it here:
http://www.bunkus.org/videotools/mkvtoolnix/downloads.html#windows
0
 

Author Comment

by:alateos
ID: 26289743
I already have mkvmerge... but how can i use it to make the mpeg-2 file?
0
 
LVL 3

Expert Comment

by:danlein
ID: 26289766
oh.  in that case, use mkvtovob and then just rename to mpg.
0
Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

 

Author Comment

by:alateos
ID: 26289784
is that part of the same set of tools? if so, i'll try it tomorrow
0
 
LVL 3

Expert Comment

by:danlein
ID: 26289841
nah, its mkv2vob, a completely separate install.  download link is below.  From what i remember, it basically rewrites the mkv header to make it a compatible mpg stream for applications like ps3 streaming, etc, but doesn't encode if your source is compliant.  It has an option to convert an entire directory, which should make your life easier.  Let me know how it goes.

http://www.3r1c.eu/mkv2vob/mkv2vob.exe
0
 

Author Comment

by:alateos
ID: 26289852
will do tx for the advice
0
 

Author Comment

by:alateos
ID: 26292598
it says "Unsupported video codec: MPEG2"
0
 
LVL 3

Expert Comment

by:danlein
ID: 26292776
k.. let's not use that then.

can you test one one file just renaming the mkv extension to mpg.  can i ask what your main goal is?
0
 

Author Comment

by:alateos
ID: 26292905
My main goal is to have a bunch of video (.m2v) and audio (.wav) muxed then encoded as an AVI or MPEG-2 file.
0
 
LVL 3

Expert Comment

by:danlein
ID: 26293763
ok.  i just tried this.. and it works for me.  download ffmpeg from here:

http://www.videohelp.com/download/ffmpeg-0.5.7z

extract the files, then from a command line, browse to the folder you just extracted and run the following:

ffmpeg -i c:\input.mkv -target ntsc-dvd -b 2000k c:\outfile.mpg

obviously, replace input.mkv and outfile.mpg with the correct name.
0
 

Author Comment

by:alateos
ID: 26294349
tx danlein.. is there any way to do TRUE constant bitrate with ffmpeg? I already tried setting the -minrate and -maxrate to the same as -b rate.... but the file still looks as a vbr file.
0
 
LVL 3

Expert Comment

by:trick6612
ID: 26295234
Alateos,

If you are looking to change the bit rate, you would need to re-encode the MPEG-2 files.  This will result in a loss of image quality.  SImply muxing the MPEG-2 file with the WAV file will not result in re-encoding the MPEG-2 video.

TMPGEnc is a good tool for the kinds of things you are trying to do.

http://www.tmpgenc.net/en/index.html

Rick
0
 
LVL 3

Expert Comment

by:danlein
ID: 26295375
Trick6612:

I agree TMPGEnc is a good tool, however, loading all those files into it is painstaking.  Trying to avoid it based on OP with 1000 files.  ffmpeg is a very versatile tool

alateos:

as far as i know, it is not possible for TRUE constant bitrate.  for mpeg2, this usually isnt the case, because vbr allows for smaller file size (better compression) with a comparable image quality.  If this is not acceptable, I could try to hunt down something else.
0
 

Author Comment

by:alateos
ID: 26295979
danlein... I would really appreciate it if you could find something that would produce files with CBR, through a command line (as ffmpeg), and in which you could encode several files at the same time.
0
 
LVL 3

Expert Comment

by:trick6612
ID: 26296174
Alateos,

I am still curious about your interest in CBR...  why do you want to reduce the quality of your videos while making the file size larger at the same time?

Rick
0
 

Author Comment

by:alateos
ID: 26296204
Rick... I have a program that would read the file much faster if it were CBR. I could save half the time of re-encoding... hence my need for CBR.
0
 
LVL 3

Expert Comment

by:danlein
ID: 26296543

You can try using mpeg2enc, but you'll have to download the source and compile it yourself.  I believe it has an option to force CBR.

you can also try out mencoder.  I have used this briefly, and does a very good job as well.
0
 
LVL 3

Expert Comment

by:trick6612
ID: 26296721
Alateos,

I am still confused.  The original files are in MPEG2 format (.m2v files), right?  And the original files are VBR, right?  So you want to spend hours and hours re-encoding the files using some tool that will re-encode the VBR files into larger, lower quality CBR files, so that you use them in another program that reads CBR files faster than VBR files.  Is that right?  What does this other program do?  Is it just a video player or something?  Maybe if you can explain what you are really trying to accomplish, I can provide a better answer.

Keep in mind that the only way to change between VBR and CBR is to completely re-encode/re-render the MPEG files into new files.  Re-encoding MPEG files ALWAYS results in some loss in quality.  

Rick
0
 

Author Comment

by:alateos
ID: 26297264
Rick,

You have it correct. The final application is a proprietary editing software.
0
 
LVL 3

Assisted Solution

by:trick6612
trick6612 earned 400 total points
ID: 26297590
Alateos,

OK, then you are looking to do more than just mux the MPEG files with the WAV files.  You are also looking to re-encode the files from VBR to CBR so that you can use them in some unspecified proprietary editing software that wants CBR files over VBR files.  

TMPGEnc can re-encode your files.  Other video editing applications like Sony Vegas can also do the job.  With Vegas, for example, you could combine your audio files with the video and simultaneously re-encode them in new CBR MPEG files.  With Vegas' scripting and batch processing features, I would imagine you could set up a batch process to do this for all of your 1000 individual files.

Rick
0
 

Author Comment

by:alateos
ID: 26297611
Rick... are TMPGEnc and Vegas considered freeware with a command line option? I'm a programmer and can streamline the process.
0
 
LVL 3

Expert Comment

by:trick6612
ID: 26297705
Alateos,

No, these are both applications you are legally supposed to pay for.  I believe you could probably get away with downloading a trial version of Sony Vegas and using it to do what you want to do, as long as you can finish within the trial period.

Rick
0
 
LVL 3

Expert Comment

by:danlein
ID: 26298035
alateos,

that's the best i've got for freeware command-line stuff.. rick is correct if you can go with the trial of Vegas, you can tweak out a script to bang out all your files at CBR.  Good luck and thx!
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Keep your audience engaged and get the most out of your next presentation with these quick Prezi tips.
In this article, I'll explain how to setup a Plex Media Server (https://plex.tv/) on a Redhat (Centos) 7 based NAS with screenshots to help those looking for assistance.  What is Plex? If you aren't familiar with Plex, it’s a DLNA media serv…
This video teaches viewers how to process images for a time-lapse video. Programs required: Adobe Lightroom, Adobe After Effects, Video Editing Program. In Adobe Lightroom: Import sequence image files into Adobe Lightroom: Develop settings of an I…
Viewers will learn how to use LFOs to modulate the sound of their Sampler instruments. Click the Modulation tab in Sampler: Choose one (or more) of the three available LFOs, and click the respective button to turn it on: Select a waveform, an LF…
Suggested Courses
Course of the Month9 days, 11 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question