Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
How To Reencode Mkv To Mp4 ?
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
MhXDigital
  Posted: Feb 27 2011, 10:20 AM


Member


Group: Members
Posts: 25
Member No.: 29325
Joined: 13-December 10



Hi there,
I've got an MKV file (x264 Video + MP3 Audio) that I'm trying to reencode to MP4 (x264 Video + AAC+ Audio) through the external encoder feature in VirtualDub, Here are the commands I'm using :

x264
CODE
--level 5.1 --bitrate 464 --no-deblock --min-keyint 12 --open-gop none --bframes 2 --b-adapt 2 --b-pyramid strict --scenecut 36 --ref 2 --qpmin 8 --qpmax 31 --qpstep 8 --aq-mode 0 --ipratio 1.4 --pbratio 1.3 --ratetol 0.01 --no-mbtree --no-fast-pskip --cqm "jvt" --me umh --merange 24 --direct spatial --subme 6 --partitions all --trellis 0 --psy-rd 0.08:0 --demuxer raw --input-csp i420 --input-res %(width)x%(height) --fps %(fpsnum)/%(fpsden) -o "tempvideofile" -

(video.264 as output filename)

AAC+ (Nero)
CODE
-if - -of "tempaudiofile" -cbr 48000 -hev2

(audio.mp4 as output filename, Audio input format is set to WAV file and the audio compression dialog in VirtualDub is set to PCM)

Muxer (MP4Box)
CODE
-add "video.264" -add "audio.mp4" -fps %(fps) "%(outputname)"

I keep on getting an error message about audio encoding process, I've tried extracting the audio from the MKV to a WAV file, feeding it once again to VirtualDub through the External Audio File feature doesn't solve the problem. So, is there a way to convert that MKV file to an MP4 in VirtualDub, or if this is impossible, is there a work around that will help me do so, maybe encode the video using VirtualDub and mux it with the audio encoded with another app.

Please help, and thanks in advance smile.gif
 
     Top
phaeron
Posted: Feb 27 2011, 11:00 PM


Virtualdub Developer


Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02



I don't have the Nero AAC encoder installed on this machine at the moment, but I think you need to pass it a command-line parameter to tell it to ignore the size fields in the WAV stream.
 
    Top
DarrellS
Posted: Feb 28 2011, 12:40 AM


Advanced Member


Group: Members
Posts: 567
Member No.: 1061
Joined: 28-November 02



Virtualdub is not the tool you need for this. The x264 video does not need to be re-encoded.

Use mkvextractgui to demux the elementary streams. Convert the mp3 audio to aac. Use mp4boxgui or yamb to mux the files into an mp4 container.

You can use foobar 2000, dBpoweramp or Nero Wave Editor to convert the mp3 to aac.

 
     Top
DarrellS
Posted: Feb 28 2011, 12:57 AM


Advanced Member


Group: Members
Posts: 567
Member No.: 1061
Joined: 28-November 02



For mp4box.exe, I have...

-add "%(tempvideofile)" -add "%(tempaudiofile)" "%(outputname)" -fps %(fps)

Important: "Delete output file before starting" must be enabled in the encoder profile


For neroaacencode, I have...

-q 0.35 -ignorelength -if - -of "%(tempaudiofile)"
%(outputname).aac

under audio, wav and bypass compression ticked.

 
     Top
davexnet
Posted: Feb 28 2011, 11:40 PM


Member


Group: Members
Posts: 16
Member No.: 25734
Joined: 25-June 09



An alternative method is to use Avidemux.
Leave video on"copy"
Set audio to your desired type.

Set container to mp4. Save the file.
 
     Top
MhXDigital
  Posted: Mar 1 2011, 12:47 PM


Member


Group: Members
Posts: 25
Member No.: 29325
Joined: 13-December 10



Thank you all for your help, I really appreciate it.
I figured out how to do it smile.gif
 
     Top
evropej
Posted: Mar 7 2011, 05:23 PM


Advanced Member


Group: Members
Posts: 514
Member No.: 26523
Joined: 28-November 09



For media conversion, I have found another program which does a great job.
xMediRecode
biggrin.gif
 
     Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
6 replies since Feb 27 2011, 10:20 AM Track this topic | Email this topic | Print this topic

<< Back to Advanced Video Processing