The Halo Forum > Halo 3 Discussion > Halo 3 Videos
Reply
 
Display Modes Thread Tools
making apple pie
bjorn_248's Avatar
Join Date: Jul 2008
Location: THF IRC
Posts: 4,404
Subtract from bjorn_248's ReputationAdd to bjorn_248's Reputation bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin'
Send a message via AIM to bjorn_248 Send a message via Skype™ to bjorn_248
#1
07-02-2010
Default The best way to encode x264 on a mac

Prerequisites: Xcode and Macports, if you do not have these refer to this thread and follow the first two steps.

Programs Needed: FFMPEG, x264, mkvtoolnix

Installation: To install ffmpeg type sudo port install ffmpeg into terminal and press enter. To install x264 type sudo port install x264 into terminal and press enter. To install mkvtoolnix download it from here.


Encoding:

Step 1: Render the video and audio out of your editing program uncompressed. Render them separately. If you are not familiar with uncompressed audio it's PCM wav so just use that. Render uncompressed avi for the video.


Step 2: Use ffmpeg to convert the uncompressed audio to aac. 256k is plenty for aac in my opinion, but you can use whatever (more or less) you want. The command is
Code:
ffmpeg -i INPUT.wav -acodec libfaac -ab 256k -vn OUTPUT.aac



In order to convert to y4m, you need to use avi as source. Mov doesn't work for creating proper y4m files.

Step 3: Use ffmpeg to convert the uncompressed video to yuv4mpeg. The command is below.
Code:
ffmpeg -threads 0 -i INPUT.avi -f yuv4mpegpipe -an -pix_fmt yuv420p OUTPUT.y4m


Step 4: Use x264 to encode the yuv4mpeg file you just created with the following command.
Code:
x264 --level 4.1 --bluray-compat --crf 20.0 --keyint 24 --open-gop --ref 4 --weightp 0 --slices 4 --vbv-bufsize 30000 --vbv-maxrate 40000 --pic-struct --colorprim bt709 --transfer bt709 --colormatrix bt709 --keyint 24 --threads auto --output OUTPUT.mkv INPUT.y4m
Step 5: Use mkvtoolnix to mux the two tracks (the mkv file and the aac file) together. It's pretty easy at this point, just add the two tracks and hit mux. Now you have an[/SIZE] mkv file with both x264 video and aac audio.

Script that I wrote that does all these steps for you: http://www.mediafire.com/?m5ptad6sltr157g
Just make sure not to have any spaces in the input file name.

After rendering cloud's montage I realized that ffmpeg is NOT the ideal way to render x264 on a mac. I stayed up all night, played around with x264 in terminal, and amazingly, it worked. This is basically the equivalent of using fragtality's preset for megui on windows, which was my goal with ffmpeg for cloud's montage, but failed to accomplish. This works though and is definitely my recommendation. This has been tested and is reliable. Enjoy.

Last edited by bjorn_248; 08-08-2011 at 04:17 AM.
Administrator
FraGTaLiTy's Avatar
Join Date: Oct 2005
Location: Limbo
Posts: 7,627
Subtract from FraGTaLiTy's ReputationAdd to FraGTaLiTy's Reputation FraGTaLiTy IS PURE EVIL FraGTaLiTy IS PURE EVIL FraGTaLiTy IS PURE EVIL FraGTaLiTy IS PURE EVIL FraGTaLiTy IS PURE EVIL FraGTaLiTy IS PURE EVIL FraGTaLiTy IS PURE EVIL FraGTaLiTy IS PURE EVIL FraGTaLiTy IS PURE EVIL FraGTaLiTy IS PURE EVIL FraGTaLiTy IS PURE EVIL
#2
07-02-2010
Default

All MAC users need to read this.
Level 34
Join Date: Mar 2006
Location: USA
Posts: 2,857
Subtract from Wananay's ReputationAdd to Wananay's Reputation Wananay is a novice
Send a message via AIM to Wananay
#3
07-02-2010
Default

Thank you bjorn. This will come in handy tonight =]
Level 33
Fuzon's Avatar
Join Date: May 2008
Posts: 2,601
Subtract from Fuzon's ReputationAdd to Fuzon's Reputation Fuzon is on the rise to fame Fuzon is on the rise to fame Fuzon is on the rise to fame
Send a message via AIM to Fuzon
#4
07-02-2010
Default

Finally some stuff I can relate to

thanks so much





AIM: ninjaflameboy7 | http://www.youtube.com/user/lolitsmatt | I create videos
Level 31
IzuesII's Avatar
Join Date: May 2008
Location: H2F....
Posts: 2,215
Subtract from IzuesII's ReputationAdd to IzuesII's Reputation IzuesII is on the rise to fame IzuesII is on the rise to fame IzuesII is on the rise to fame
Send a message via AIM to IzuesII
#5
07-10-2010
Default

thanks so much man
lel
Stagga's Avatar
Join Date: Jan 2009
Location: /mu/
Posts: 7,498
Subtract from Stagga's ReputationAdd to Stagga's Reputation Stagga finally popped his Bubble Shield Stagga finally popped his Bubble Shield Stagga finally popped his Bubble Shield Stagga finally popped his Bubble Shield Stagga finally popped his Bubble Shield Stagga finally popped his Bubble Shield
Send a message via AIM to Stagga
#6
07-11-2010
Default

ffmpeg -i INPUT -vcodec rawvideo -an OUTPUT

^ converts to uncompressed avi
making apple pie
bjorn_248's Avatar
Join Date: Jul 2008
Location: THF IRC
Posts: 4,404
Subtract from bjorn_248's ReputationAdd to bjorn_248's Reputation bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin'
Send a message via AIM to bjorn_248 Send a message via Skype™ to bjorn_248
#7
07-16-2010
Default

First real encoding success! Tizoxic was encoded on wanny's mac using these settings. If you want proof that this works, refer to that video .
Errare humanum est

Atiemark <3

Mac Encoding

Render Farm

IRC Server

ENCODING PROGRAM
Level 19
GD Studios's Avatar
Join Date: Jun 2007
Location: THE f..kING ZONE
Posts: 488
Subtract from GD Studios's ReputationAdd to GD Studios's Reputation GD Studios has made a few good posts GD Studios has made a few good posts
Send a message via AIM to GD Studios
#8
07-20-2010
Default

where do the files get exported to, and how does it know where to find the exported video?

Thats the only issue im having right now when im trying to convert the raw files


That's right, I may actually finish it.
Level 33
Fuzon's Avatar
Join Date: May 2008
Posts: 2,601
Subtract from Fuzon's ReputationAdd to Fuzon's Reputation Fuzon is on the rise to fame Fuzon is on the rise to fame Fuzon is on the rise to fame
Send a message via AIM to Fuzon
#9
08-15-2010
Default

I wish it could encode 3 files into one, but thanks this is a really great program.

I was using isquint before xD





AIM: ninjaflameboy7 | http://www.youtube.com/user/lolitsmatt | I create videos
making apple pie
bjorn_248's Avatar
Join Date: Jul 2008
Location: THF IRC
Posts: 4,404
Subtract from bjorn_248's ReputationAdd to bjorn_248's Reputation bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin' bjorn_248 is osageballin'
Send a message via AIM to bjorn_248 Send a message via Skype™ to bjorn_248
#10
08-15-2010
Default

Quote:
Originally Posted by GD Studios View Post
where do the files get exported to, and how does it know where to find the exported video?

Thats the only issue im having right now when im trying to convert the raw files
Oh, sorry for the delayed response. The output path is specified in OUTPUT.y4m so your desktop would be /Users/(your username here)/Desktop/yuvfile.y4m
Errare humanum est

Atiemark <3

Mac Encoding

Render Farm

IRC Server

ENCODING PROGRAM
Reply

Bookmarks

Thread Tools
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 On
Trackbacks are On
Pingbacks are On
Refbacks are On