Log in

View Full Version : convert aac audio in a .mkv container


six13
17th March 2012, 04:54
Hi all, I have a recent problem with a .mkv file. I am trying to convert it to mpeg2 with procoder 3 but it won't take a .mkv container so I am trying to convert it to a quicktime .mov then process with Porocer 3 to mpeg2 DVD complaint filder. The video converts very nicely but the audio is all garbled and it sounds like it is at a different speed. I have also tried to go with a .avi container with .mp3 audio or ac3 but I get a video but no audio. Any solution to convert this file to .mov and have the audio play properly? Below is the container information:

General
Unique ID : Complete name : M:\file.mkv
Format : Matroska
File size : 566 MiB
Duration : 2h 38mn
Overall bit rate : 500 Kbps
Encoded date : UTC 2012-03-03 06:38:34
Writing application : mkvmerge v5.2.0 Dec 18 2011 18:12:03
Writing library : libebml v1.2.3 + libmatroska v1.3.0

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.0
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Muxing mode : Header stripping
Codec ID : V_MPEG4/ISO/AVC
Duration : 2h 38mn
Nominal bit rate : 435 Kbps
Width : 720 pixels
Height : 304 pixels
Display aspect ratio : 2.35:1
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.083
Title :
Writing library : x264 core 120 r2164 da19765
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=22 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=16 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=435 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=2:1.00

Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : HE-AAC / LC
Codec ID : A_AAC
Duration : 2h 38mn
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz / 24.0 KHz
Compression mode : Lossy
Title :

Text
ID : 3
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Title :
Language : English

smok3
17th March 2012, 12:52
write an avisynth script using ffmpegsource and stick that into procoder.

like:
LoadPlugin("t:\utility\avisynth\ffmpegsource\FFMS2.dll")
video = FFVideoSource("M:\file.mkv")
audio = FFAudioSource("M:\file.mkv")
AudioDub(video, audio)

#resizing and pading here, for pal wide could be
LanczosResize(720,432) # (modw16,modh16)
# (human DAR: narrower than: old cinemascope, 2.35, diff=-0.02)
AddBorders(0,72,0,72,0) # pad height 576

#assuming fps and resampling audio could be here (in pal case at least)
AssumeFPS(25, 1, true)
ssrc(48000)

six13
17th March 2012, 18:35
thank you for the reply, however I don't know how to add the script to Procoder 3. My output needs to be NTSC and since my source was 23.97 fps I was selecting 23.97 with 2-3 pulldown to 29.97i in Procoder settings.

I have never loaded a script into procoder, how is it done?

smok3
18th March 2012, 23:58
basically:

1. install avisynth
2. fire you favorite text editor
3. write something (as my example)
4. save as something.avs
5. open that avs as any media file in procoder (or some other encoder that supports avisynth)

p.s. dunno much about ntsc and pulldown...

six13
19th March 2012, 00:28
thanks I will give it a try. I did find my problem though, I was changing the fps to 23.97 from 25 fps so the audio was garbled when encoding the .mov file. I left it at 25 fps and let Procoder do the 29.97 fps conversion while authoring mpeg2 NTSC DVD material and the audio was fine.