Muxing to mp4 (x264 + Vorbis or LC-AAC)

Discuss about generic usage of MediaCoder.

Moderator: HuggiL

Post Reply
Meelis
Amateur
Amateur
Posts: 12
Joined: Sat Dec 13, 2008 11:18 pm
Location: Earth

Muxing to mp4 (x264 + Vorbis or LC-AAC)

Post by Meelis » Tue Apr 26, 2011 6:21 pm

Hi

Muxing to mp4 (x264 + Vorbis or LC-AAC)
is it not possible, because MediaCoder can't do that?

Audio is encoded with MediaCoder
Video is encoded with MediaCoder or VirtualDub x264vfw or RipBot264.

Copy audio + copy video - mux to mp4 container.
x264 is better than XviD

Meelis
Amateur
Amateur
Posts: 12
Joined: Sat Dec 13, 2008 11:18 pm
Location: Earth

Re: Muxing to mp4 (x264 + Vorbis or LC-AAC)

Post by Meelis » Wed Apr 27, 2011 3:51 pm

32bit MediaCoder2011-R3-5135 and not only that version it goes months and months back.
Vista 64 bit. i have K lite mega codec pack 32 and 64 bit.

1280x720 30fps x264
Video file sources are
1) RipBot264v1.16.5 made mp4 or mkv container x264 encode
2) VirtualDub 1.9.11 32bit (x264vfw 114r1913bm 5fd3dce) avi x264 encode
3) mkvtoolnix-unicode-4.7.0 mkv container of some video encode from point 1) or 2)

Problem is it can't mux, it muxes to mp4 file only video part, even if i selected copy audio external file.
If i do encode in MediaCoder it does it and when it starts mux it files.

Why i need MediCoder is because RipBot doesn't have 500 kbits LC-AAC, but only 128kbits AAC for mp4.
I know mkv is much better but Vimeo and YouTube use mp4, i figured there must be some good in mp4.

In one case mediacoder demuxed from mkv merge mkv container video, an file that was 20 MB smaller than original mp4 file from ripbot (70 mb vs 87mb).
Ofcorse video was broken. But MKV merge had problems with that file in 1st place when muxing mp4 video and flac audio to mkv.

The mp4 from ripbot x264 encode displayed error in MKV merge gui:

Code: Select all

frames) references to other frames. The timecodes for such frames will be out-of-order,
and the 'CTTS' atom is needed for getting the timecodes right. As it is missing the timecodes for
this track might be wrong. You should watch the resulting file and make sure that it looks like you expected it to.
Can it be relevant that YouTube wasn't able to decode x264 video with some settings :?:

YouTube decoded only some intra frames from such video:

Code: Select all

Format                           : AVI
Format/Info                      : Audio Video Interleave
File size                        : 137 MiB
Duration                         : 4mn 53s
Overall bit rate                 : 3 915 Kbps
Writing application              : Lavf52.102.0
Writing library                  : VirtualDub build 32842/release

Video
ID                               : 0
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L4.1
Format settings, CABAC           : Yes
Format settings, ReFrames        : 8 frames
Codec ID                         : H264
Duration                         : 4mn 53s
Bit rate                         : 2 500 Kbps
Width                            : 1 280 pixels
Height                           : 720 pixels
Display aspect ratio             : 16:9
Frame rate                       : 30.000 fps
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.090
Stream size                      : 87.0 MiB (64%)
Writing library                  : x264 core 114 r1913bm 5fd3dce
Encoding settings                : cabac=1 / ref=8 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=9 / psy=1 /
 psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 /
 fast_pskip=1 / chroma_qp_offset=-2 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 /
 bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 /
 keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=2pass / mbtree=1 / bitrate=2500 / ratetol=1.0 /
 qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00
And there was no video (solid gray) at all but only sound with this settings

Code: Select all

Format                           : Matroska
File size                        : 120 MiB
Duration                         : 4mn 53s
Overall bit rate                 : 3 435 Kbps
Movie name                       : Best Movies Ever Known To Humankind 720p
Encoded date                     : UTC 2011-04-23 05:26:28
Writing application              : mkvmerge v4.4.0 ('Die Wiederkehr') built on Oct 31 2010 21:52:48
Writing library                  : libebml v1.0.0 + libmatroska v1.0.0

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L4.1
Format settings, CABAC           : Yes
Format settings, ReFrames        : 8 frames
Muxing mode                      : Header stripping
Codec ID                         : V_MPEG4/ISO/AVC
Duration                         : 4mn 53s
Nominal bit rate                 : 2 500 Kbps
Width                            : 1 280 pixels
Height                           : 720 pixels
Display aspect ratio             : 16:9
Frame rate                       : 30.000 fps
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.090
Writing library                  : x264 core 114 r1924 08d04a4
Encoding settings                : cabac=1 / ref=9 / deblock=1:0:0 / analyse=0x3:0x133 / me=tesa / subme=10 / psy=1 /
 psy_rd=1.00:0.00 / mixed_ref=1 / me_range=40 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 /
 fast_pskip=1 / chroma_qp_offset=-2 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 /
 bframes=16 / b_pyramid=1 / b_adapt=2 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=300 /
 keyint_min=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=2pass / mbtree=1 / bitrate=2500 / ratetol=1.0 /
 qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=50000 / vbv_bufsize=50000 /
 nal_hrd=none / ip_ratio=1.40 / aq=1:1.00
x264 is better than XviD

Meelis
Amateur
Amateur
Posts: 12
Joined: Sat Dec 13, 2008 11:18 pm
Location: Earth

Re: Muxing to mp4 (x264 + Vorbis or LC-AAC)

Post by Meelis » Thu Apr 28, 2011 1:04 am

Oo too bad mp4 container doesn't support vorbis audio.
And AAC is not mentioned atleast the LC-AAC

I figured mp4 is relatively new container but it's ages older than Ogg Vorbis and LC-AAC.

Perhaps i muxed AC3 audio and remembered wrong it beeing AAC.
Anyways LC-AAC 500 kbits is much better quality than AC3 576 kbits.

:P Thank good for mkv
x264 is better than XviD

Meelis
Amateur
Amateur
Posts: 12
Joined: Sat Dec 13, 2008 11:18 pm
Location: Earth

Re: Muxing to mp4 (x264 + Vorbis or LC-AAC)

Post by Meelis » Thu Apr 28, 2011 3:29 pm

mixer wrote:Have you tried Handbrake?
No, but i can pretty much everything done with Virtualdub MediaCoder and mkvmerge GUI.

Afterall even YouTube can decode the file if i use:
* fast decode
* zero latency

I think this 2 options above will turn on this settings:
No cabac
no b-frames
weightp=0
rc=cqp
mbtree=0
x264 is better than XviD

Post Reply