Tutorial: how to encode videos for the new video engine in Cubase 5.5 / Nuendo 5 | Part 2
I finally found the time to write part 2 of this tutorial. Part 2 was actually not planned but I got some feedback from people who had problems to import their videos into Avidemux. Apparently it still doesn’t support most of the input formats. So this tutorial will be about Handbrake, another converter but solely focused on exporting to H264 (mp4 and mkv).
Download and installation
First go to the download page of Handbrake and chose from the downloads what fits you best. There are Windows, Mac and Linux builds. The Installation process should be self-explanatory. Now launch Handbrake. You will get a message that the built-in presets have to be updated. That’s fine, click okay.
Loading a video
Now we are ready to load the video file. Click on Source at the very upper left (1. in the screenshot). You will notice that you can chose between Video File and DVD/VIDEO_TS Folder. That’s pretty amazing in case you get a DVD from your client. You can either copy the VIDEO_TS folder to your hard disk (much faster for converting) or convert directly from DVD. Although, keep in mind that Handbrake can only handle unprotected DVDs.
When you have loaded your movie you will get a popup message telling you to specify a default path for the output files. You don’t have to do so, since you can always specify the filename including the path in the main screen of the GUI (2. in the screenshot). But in case you want to setup a folder where all your converted videos should go by default, follow the screen instructions to set the path.
Video and audio settings
In Output Settings, right below Destination (2. in the screenshot), make sure that the container format is set to mp4. Next, we take care of the video quality (3. in the screenshot). The Video Codec should be set to H.264 (x264), if not, do so. There are different strategies for the Quality setting. If you don’t care about file size and just need quick results, go for the Constant Quality option and set the quality level accordingly. The other two options (Target Size and Avg Bitrate) will give you the ability to enable 2-Pass encoding. This will result in smaller file sizes, since the whole footage is analyzed regarding its complexity and the encoder decides upon a logfile which scenes will need a lower or higher bitrate. You could compare this with the variable bitrate setting of the mp3 encoder. If you go for Target Size you can enter a desired size for the video, for example 2000MB or you chose Avg Bitrate and enter the desired average bitrate the encoder should use. Note, that the file size might still be a little lower or higher than 2000MB (maybe +/- 100 MB) since this is only an approximate value.
You should also take a look at the tab Picture. There you can change settings like resolution (in case you got a HD video and need to resize it for your DAW), or crop black borders.
That’s it for video. Let’s click on the Audio tab (4. in the screenshot). Here you can select the audio bitrate, samplerate, etc… In general, there should be at least one audio track visible (unless the video has no audio) in the track list. If your client delivers a DVD with more than one language you might have more than one audio track. However, you can remove the tracks you don’t need by clicking on Remove. Select the audio track in the track list, chose AAC as Audio Codec and change the settings for Mixdown, Samplerate and Bitrate according your needs.
Disabling B- and P-frames
What we want to do now is turn off B- and P-frames. Therefore, click on the Advanced tab (5. in the screenshot) and disregard anything you see there and head directly to the command-line like input filed at the very bottom (6. in the screenshot). Delete its content and paste the following line:
mixed-refs=0:ref=0:bframes=0:weightb=0:keyint=1:min-keyint=1
Saving preset
To simplify things in the future, let’s save a preset with all the options we just set up. Go the presets section at the very right. Save your settings by clicking on the Add button (7. in the screenshot) on the lower right and give your preset a name like “Cubase H264″, “Nuendo H264″, or “Cubendo H264″, etc…
Converting
Finally, fill in a file name for your video (Destination, 2. in the screenshot) and press the Start button (8. in the screenshot) to get the converting rolling.
All you have to do now is wait until the encoder finished its work and you are done. Import into Cubendo and start composing!
If you encounter any problems while importing the video into Cubendo, (in Handbrake) go to Tools -> Options and uncheck “Always use iPod/iTunes friendly extensions (.m4v) for MP4″. Thanks to Jack for pointing this out!
Hope this tutorial solves some of the problems you guys had. Happy converting!
Hi Stephan.
First if all thenk you for this tutorial.
Although i followed the steps and converted a video file to mp4 h264, cubase doesn’t recognize the file(invalid file).Do you know why this happens ?
Thanks
Hey,
that’s strange. I tried the conversion according my walkthru and had no problems. Can you maybe upload the source video?
I’ll encode it myself to check what’s wrong.
Best,
Stephan
Stephan thank you for replying. I will send you a short video by email.Thanks
Hi Stephan!
Handbrake doesn’t support Mac OS X 10.4 – is it worth upgrading to 10.5 or are there other converters out there?
Thanks!
Emek
Yep definitely worth it. Most apps are only compatible to 10.5 nowadays.
Thanks for the tutorial! I’ve been using handbrake for quite some time (I keep having projects handed to me on DVD). Somehow I always missed the I-Frame concept even though I understood it from DVD encoding.
Thanks
Ken
By the way, I really dig the site design. If I may ask, did you build this? If not, who did?
You are welcome Ken!
Ah, completely overlooked your question, sorry. It’s a Wordpress template I customized
Hi there.
Before I try to do this, I wanted to know if you recommend this technique if you are using Cubase 5? If not, what do you suggest.
By the way, you mentioned in your last article that DV didn’t really work for you. I wondered if you could explain why?
Yes, this also works with Cubase 5/Nuendo 4. Well DV worked but it wasn’t possible to fast forward and rewind without
CPU spikes. Also, the image was stuttering while playing back. But maybe DV works better for you. I would give it a try.
Cheers,
Stevie
Thanks stevie
iv been following your threads all night trying to find a way to get video workin well with cubase 5.5 and its finaly worked! can i just ad that if you havent used handbrake as intensively before, there is a tick box in the tools>general menu named ‘always use ipod/itunes freindly extensions (.mkv) for mp4). With my machine it was ticked as default. before i unticked it cubase didnt like anyfile handbrake was producing, since iv unticked its working without a hitch.
thank you again
Jack
listn.to/kinkybootbeasts
Hey Jack!
Glad the article was helpful for you and it’s working for you! Thanks for pointing out the iPod option. I indeed
overlooked this one! I should add this to the article
Cheers,
Stevie
OK, so here’s the update (finally!): Mpeg Streamclip probably would have worked if the original file wasn’t an AVI. Since it was – the Streamclip forums led me right to Ffmpegx which was a bit complicated to download but did the work. Not the most elegant solution, but sometimes you just gotta get there, right? Thanks mountains for your excellent advice.
Emek
Hey Emek,
glad it worked out for you! So essentially, what did you do?
Encode the movie with FFmpeg first and then in MPEG Streamclip?
Cheers,
Stevie
That was exactly my intention! However, once I was done with the FFmpeg encoding it loaded perfectly, so I didn’t have to go any further. I used the default settings and chose Mpeg4 – I thought I’d have to re-encode to Quicktime but Cubase read it right off the bat. The hard part was installing it: FFmepg doesn’t find its own Progress.app – I had to go inside the application package, find Progress and launch it.
I see!
Thanks Stephen. Excellent tutorial. Worked great for me and just what I needed to be able to work on this film project opportunity that suddenly came up. Some other solutions I tried didn’t work, but so far, this one is smooth and causing now crashes.
Hey Peter,
that’s great to hear!
Best,
Stephan
Hi Stephen great article it is much appreciated. I have an ongoing problem with handbrake using all of your settings where it outputs only the first half of my video file. Any suggestions? Thanks
Mike
Hey Mike,
hmm, this problem never occurred to me, yet. Have you checked with another movie?
It *could* be that the movie is causing problems.
Best,
Stephan
You’ve saved my day !
I couldnt figure out why none of my videos were working in cubase 5. And with Handbrake and your fantastic tutorial I can really enjoy working with videos. I love the smoothness of the video when scrubbing, It is finally how i wanted it to be several years ago. So many thanks !
Lex
Hey Lex,
you’re welcome! I was looking for the right settings for years as well
Glad it’s working out for you.
Cheers,
Stephan
Hi Stephan! I don’t know how you figured all this stuff out but, excellent job! Using your process definitely gave me the best results of anything I’ve tried. I actually have another problem however and I was wondering what your take was on it. I can work in Cubase 6 with the video imported, etc…..however, when I try to close the project, Cubase crashes and tells me a “serious error has occurred”. The only way I’ve found to get around it is to remove the video file from the media pool before I close cubase. Nobody else has had a clue on this one…..any ideas?
Thanks!
Seth