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 20th November 2009, 09:40   #1  |  Link
bassgoonist
Registered User
 
Join Date: Sep 2004
Posts: 73
Muxing m2v and wav?

I have a 1920x1080 m2v that I want to mux with a 44.1/16 wav, how would I go about doing that?
bassgoonist is offline   Reply With Quote
Old 20th November 2009, 14:17   #2  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
You can use ffmpeg

Code:
ffmpeg.exe -i video.m2v -vcodec copy -i audio.wav -acodec copy muxfile.mpg


Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 20th November 2009, 16:08   #3  |  Link
bassgoonist
Registered User
 
Join Date: Sep 2004
Posts: 73
I get this error a bunch of times:
[mpeg @ 0x625030]buffer underflow i=1 bufi=3534 size=4096
[mpeg @ 0x625030]packet too large, ignoring buffer limits to mux it

Let me explain the whole thing here. I started by trying to make a simple slide show of jpegs for a wav file in premiere but all it would do when I did export media is give me the audio and the video separately. If anyone knows how to make premiere work right...let me know.
bassgoonist is offline   Reply With Quote
Old 23rd November 2009, 10:10   #4  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,769
Premiere (even the "light" Elements) is an overkill for doing this job, and depending on your pictures it might not even be the best to do this kind of job.

I'm sure that in the printed manual that comes with every legal copy this issue is mentioned. I have an old version so it might be of no help for the new ones. Mine is in Export submenu. Which version do you have?
Ghitulescu is offline   Reply With Quote
Old 23rd November 2009, 22:23   #5  |  Link
bassgoonist
Registered User
 
Join Date: Sep 2004
Posts: 73
I got it through the school, and I didn't get a manual, and I had made this work once before so i dunno...I was just getting really frustrated trying to read the help. I have CS4.
bassgoonist is offline   Reply With Quote
Old 26th November 2009, 03:34   #6  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,988
Try IFOEdit's "Author new DVD" mode. It's very easy, and simple

~MiSfit
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 26th November 2009, 13:23   #7  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,769
I think 44k1 is out of specs if you indend to use it for anything else than a PC. You may need to convert it to 48k for standalones (use SSRC, sox, audition or [almost] any commercial audio editor).
Ghitulescu is offline   Reply With Quote
Old 28th November 2009, 19:50   #8  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Quote:
Originally Posted by bassgoonist View Post
I get this error a bunch of times:
[mpeg @ 0x625030]buffer underflow i=1 bufi=3534 size=4096
[mpeg @ 0x625030]packet too large, ignoring buffer limits to mux it
I got the same error using ffmpeg with the command line provided by MrC. My source was a 720x480 m2v and a 16/48 wav file. Resulting mpg file totally unusable.

After a lot of testing I found that mencoder would mux my elementary streams just fine. I used this command:
Code:
mencoder -oac copy -ovc copy -of mpeg -mpegopts format=dvd:tsaf -o output.mpg input.m2v input.wav
For non-DVD compliant output you should probably delete the -mpegopts format=dvd:tsaf parameter from the command line.

Additional finding: With this command even a raw PCM audio file will be muxed correctly without the need to convert it to WAV first.

Cheers
manolito

Last edited by manolito; 28th November 2009 at 20:29.
manolito is offline   Reply With Quote
Old 29th November 2009, 06:30   #9  |  Link
netmask
Registered User
 
netmask's Avatar
 
Join Date: Jan 2005
Location: Sydney Australia
Posts: 260
The demo of Womble will do it. You might have to rename the M2V to MPV.
__________________
SONY 75" Full array 200Hz LED TV
Yamaha A1070 amp
Zidoo UHD3000, Popcorn Hour A-500
BeyonWiz PVR T3 & V2 (Enigma2 clone)
Chromecast
Pioneer Bluray BDP-150-K
Windows 7 Ultimate
QNAP NAS TS851
netmask is offline   Reply With Quote
Old 1st December 2009, 13:57   #10  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
@manolito

if the streams are dvd compliant then the ffmpeg command line should be:

Code:
ffmpeg.exe -i video.m2v -vcodec copy -i audio.wav -acodec copy -f vob muxfile.mpg
There is also Imago-MPEG Muxer that has a GUI.



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 1st December 2009, 14:11   #11  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,769
How can a 1920x1080 stream be DVD compliant?
Ghitulescu is offline   Reply With Quote
Old 1st December 2009, 21:56   #12  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Quote:
Originally Posted by MrC View Post
@manolito

if the streams are dvd compliant then the ffmpeg command line should be:

Code:
ffmpeg.exe -i video.m2v -vcodec copy -i audio.wav -acodec copy -f vob muxfile.mpg
There is also Imago-MPEG Muxer that has a GUI.



Bye
Sorry, no success. The -f vob parameter makes no difference, I get the same errors.
Code:
[vob @ 0x2150810]buffer underflow i=1 bufi=3698 size=4096
[vob @ 0x2150810]buffer underflow i=1 bufi=3645 size=4096
[vob @ 0x2150810]packet too large, ignoring buffer limits to mux it
I am using the following version of ffmpeg:
Code:
FFmpeg version SVN-r18709, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --enable-memalign-hack --prefix=/mingw --cross-prefix=i686-ming
w32- --cc=ccache-i686-mingw32-gcc --target-os=mingw32 --arch=i686 --cpu=i686 --e
nable-avisynth --enable-gpl --enable-zlib --enable-bzlib --enable-libgsm --enabl
e-libfaac --enable-libfaad --enable-pthreads --enable-libvorbis --enable-libtheo
ra --enable-libspeex --enable-libmp3lame --enable-libopenjpeg --enable-libxvid -
-enable-libschroedinger --enable-libx264
  libavutil     50. 3. 0 / 50. 3. 0
  libavcodec    52.27. 0 / 52.27. 0
  libavformat   52.32. 0 / 52.32. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0. 7. 1 /  0. 7. 1
  built on Apr 28 2009 04:04:42, gcc: 4.2.4
This is the version which comes with the latest WinFF 1.1.

And the Imago muxer (just like mplex) does not accept WAV files for audio.

Cheers
manolito
manolito is offline   Reply With Quote
Old 3rd December 2009, 14:08   #13  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
@manolito

Yes you are right, even with a more recent build (r19159), output mpeg file has audio with a wrong samplerate and playback is completely messed up.

We could have found a mpeg2 muxing releated bug in FFmpeg, but only with WAV format. I will report it to the developers team.

Quite interesting that using matroska container (-f matroska), output file playback is fine.



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 2nd March 2011, 21:15   #14  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Hard to believe that this thread is already more than one year old...

Recently I needed to do just that (muxing m2v and wav), and this time I decided to tackle this issue once and for all (using only free or low cost software).


Results first. Here is what works:
Womble MPEG Video Wizard DVD, Mplex, MuxMan, MPEG StreamClip, and to some degree also VOB2MPG.

Stuff which does not work:
Imago (as expected),
FFMPEG, MenCoder, TMPGEnc Plus, IfoEdit and Rejig.


Here come the details:

FFMPEG:
See previous posts. Always buffer problems, I tried at least 4 different versions, modified the command line, no luck.

MenCoder:
The command line from my previous post seems to work at first glance. But the resulting file only plays in MPC(HC), other players (WMP, VLC) have no audio. MediaInfo does not detect any audio stream in the file.

TMPGEnc:
Contrary to what was mentioned in some previous posts TMPGEnc does NOT support WAV audio.

IfoEdit and Rejig:
The authoring part of these two apps seem to be based on the same code, the results are identical. Both cannot create a muxed MPG file, they create a DVD structure in one step. Playing this DVD structure in any software player results in just very loud audio noise.

______________________________________________________________


Mplex:
Mplex cannot directly mux WAV files, they must be converted to LPCM first. This can be done with eac3to:
eac3to.exe input.wav output.lpcm

(Note: The extension has to be .lpcm, .pcm will not work with Mplex)

The command line for muxing should look like this:
Mplex.exe -f 8 -o output.mpg input.m2v input.lpcm


Womble MPEG Wizard DVD:
Works, but the option is a little hard to find. Under 'Tools' there is the 'MPEG Multiplexer', and this is what I naturally tried first. No luck here, only MPEG audio is supported.

To make it work you have to import the video and audio streams into the time line, then click on 'Export'. But now the 'Details' window tells you that audio will be converted to MP2. The reason is that the default templates are set up this way. You could now alter the templates, but the easier way is to click the 'Export' button in the top right corner toolbar. Here you will find an 'Audio' tab where you can specify 'LPCM' as your audio format.

MuxMan:
State of the art muxing engine. Creates a DVD structure only, no muxed MPG file is available.

MPEG StreamClip:
My favorite. Comes from the Apple world, needs QuickTime plus the MPEG2 decoding plugin. Can create muxed MPG files from a VTS, but also muxes elementary streams directly. Catch: The audio file must be in the AIFF format, WAV is not supported. But any decent Wave Editor can convert a WAV file to AIFF, and I even found a small app called WAV2AIFF which does just that.

VOB2MPG:
Creates MPG files from a VTS. If you used MuxMan to create a DVD structure from your elementary streams, you can use VOB2MPG to convert it to an MPG file.

VOB2MPG has two different modes, one is called VOBSET mode, the other one IFO mode. In VOBSET mode the conversion seems to go well, but the resulting file plays with loud audio noise (like IfoEdit and Rejig). In IFO mode everything works well, but (at least in the free version) this mode is painfully slow.


My tests consisted of doing the conversions with different tools and playing the resulting files through some software players and one standalone DVD player. This does not tell you anything about the quality of the muxing engines of those apps. To test this you would have to use some professional DVD compliance checking software (Sir Didymus, can you hear me?...)

Anyways, IMO MuxMan and MPEG StreamClip really stand out from all the rest.


Cheers
manolito

Last edited by manolito; 5th March 2011 at 11:44. Reason: Correction for mplex and Womble
manolito is offline   Reply With Quote
Old 3rd March 2011, 02:36   #15  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,480
Quote:
Originally Posted by manolito View Post
...

Stuff which does not work:
Mplex and Imago (as expected),
mplex requires LPCM audio,
and IMHO it's not that difficult to convert .WAV to .LPCM
Midzuki is offline   Reply With Quote
Old 3rd March 2011, 21:17   #16  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
@Midzuki,

thanks for the correction, I edited my post...

Cheers
manolito
manolito is offline   Reply With Quote
Old 4th March 2011, 23:25   #17  |  Link
netmask
Registered User
 
netmask's Avatar
 
Join Date: Jan 2005
Location: Sydney Australia
Posts: 260
Just a comment on Womble - I have done this quite often ie rename m2v to mpv and select linear pcm under the audio tab.
Code:
General
Complete name                    : C:\Users\Netmask\Desktop\Untitle.mpg
Format                           : MPEG-PS
File size                        : 2.92 GiB
Duration                         : 59mn 5s
Overall bit rate                 : 7 080 Kbps
Writing library                  : (c) 1998-2008 Womble Multimedia, Inc. / MPEG Video Wizard (08/2008) / Dec 31 2008

Video
ID                               : 224 (0xE0)
Format                           : MPEG Video
Format version                   : Version 2
Format profile                   : Main@Main
Format settings, BVOP            : Yes
Format settings, Matrix          : Default
Format settings, GOP             : M=3, N=12
Duration                         : 59mn 5s
Bit rate mode                    : Variable
Bit rate                         : 5 403 Kbps
Nominal bit rate                 : 6 642 Kbps
Width                            : 720 pixels
Height                           : 576 pixels
Display aspect ratio             : 16:9
Frame rate                       : 25.000 fps
Standard                         : PAL
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Interlaced
Scan order                       : Top Field First
Compression mode                 : Lossy
Bits/(Pixel*Frame)               : 0.521
Stream size                      : 2.23 GiB (76%)
Writing library                  : (c) 1998-2008 Womble Multimedia, Inc. / MPEG Video Wizard (08/2008) / Dec 31 2008

Audio
ID                               : 160 (0xA0)
Format                           : PCM
Format settings, Endianness      : Big
Format settings, Sign            : Signed
Muxing mode                      : DVD-Video
Duration                         : 59mn 5s
Bit rate mode                    : Constant
Bit rate                         : 1 536 Kbps
Channel(s)                       : 2 channels
Channel positions                : Front: L R
Sampling rate                    : 48.0 KHz
Bit depth                        : 16 bits
Stream size                      : 649 MiB (22%)

Menu
__________________
SONY 75" Full array 200Hz LED TV
Yamaha A1070 amp
Zidoo UHD3000, Popcorn Hour A-500
BeyonWiz PVR T3 & V2 (Enigma2 clone)
Chromecast
Pioneer Bluray BDP-150-K
Windows 7 Ultimate
QNAP NAS TS851

Last edited by netmask; 4th March 2011 at 23:33.
netmask is offline   Reply With Quote
Old 5th March 2011, 11:51   #18  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
@netmask,

thanks for setting me straight on this issue. Womble does indeed work, but only after some experimentation plus reading the help file. The natural way to do multiplexing with Womble is to use the MPEG Multiplexer tool, but this tool does not support WAV or LPCM audio. You have to import the elementary streams into the time line first and then export them.

Corrected my post...

Cheers
manolito
manolito is offline   Reply With Quote
Old 31st July 2012, 18:15   #19  |  Link
LouAnne
Registered User
 
Join Date: Jul 2012
Posts: 1
@manolito
Thanks for researching the problem and for posting your results. I had the same issues as the OP, only my files were dvd compliant, and this thread helped me find a solution.

I originally tried MPEG StreamClip, but it crashed just after opening the m2v file. I tried a few things but never figured out why.

I then tried Womble MPEG Video Wizard DVD. I like Womble because it produces an mpeg file and it seems to do a straight multiplex without any reencoding. The resulting mpeg looks good on YouTube, so I'm happy.

@netmask
Thanks for such crucial information such as to rename the m2v file to mpv and also, how to locate the lpcm audio option.
LouAnne is offline   Reply With Quote
Reply

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 00:06.


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