Activity › Forums › Compression Techniques › Compressing for YouTube
-
Compressing for YouTube
Posted by Lulu Malmgren on April 7, 2008 at 10:44 amI have been trying to find the right compression settings in Compressor to upload 10 min videos to youtube. I have tried their customs (H.264 for webcasting/ H.264 for iPod/ SD Quicktime H.264); I have tried using youtube’s single up-loader with file size under 100MB; I have tried using the multi up-loader with compressed files of 1GB. I have used a custom made compression setting (I really thought this would be the winner) from Brian Gary:
Name: YouTube
Description: Upload settiings for 4:3 material
File Extension: mov
Estimated file size: unknown
Audio Encoder
AAC, Mono, 44.100 kHz
Video Encoder
Format: QT
Width: 425
Height: 318
Pixel aspect ratio: Square
Crop: None
Padding: None
Frame rate: 30
Frame Controls On:
Retiming: (Fast) Nearest Frame
Resize Filter: Linear Filter
Deinterlace Filter: Better (Motion Adaptive)
Adaptive Details: Off
Antialias: 0
Detail Level: 0
Field Output: Progressive
Codec Type: Photo – JPEG
Multi-pass: Off, frame reorder: Off
Pixel depth: 24
Spatial quality: 50
Min. Spatial quality: 50
Key frame interval: 15
Temporal quality: 50
Min. temporal quality: 50
Sharpen Edge
Amount: 10.000But they are all utterly blobby. In all honesty the best uploaded version is the H.264 ipod (640×480) setting.
I just want to find out if I’m missing something. I’ve edited the footage on FCP6 – I have a 10 yr old Sony mini dv tape handycam – and am operating on a 10.4 Mac OSX.
I just find it strange that when I re-compressed the film to give it more info (i.e. a higher file size) for the multi-up-loader, the final flv on youtube was even worse. So strange.
If someone could shed some light – perhaps I have missed a trick…
Thanks
Daniel Low replied 17 years, 4 months ago 8 Members · 19 Replies -
19 Replies
-
Daniel Low
April 7, 2008 at 2:34 pmWithout hacks, most youtube content looks terrible.
Check this page to see if you’re missing anything
__________________________________________________________________
Please post back saying what solved your problem. It could help others, and saying ‘thanks’ is free! -
Craig Seeman
April 7, 2008 at 4:18 pmI’d prefer compressing to H264 over Photo JPEG. I like having the control over the data rate/file size. It looks like Brian is using the “new” file size of YouTube. At the now permissible 1GB for for up to a 10 minute duration, you can really push the data rate very high.
Is this the Brian Gary article you refer to?
https://www.kenstone.net/fcp_homepage/youtube_compressor_gary.htmlIf you’re doing a viral campaign YouTube does generate quite a bit of hits since it ranks high in the Google search engines (since it’s owned by them).
If you want better quality for showing off work, embedding a Flash video link in your site, Vimeo is many times better than YouTube. They allow 720p30 HD and use the On2VP6 codec to compress.
-
Len Reston
April 7, 2008 at 8:01 pmTo see YT’s h.264 aac version they are testing, append &fmt=18 to the URL.
canon hv20 demo example:
https://www.youtube.com/watch?v=WcaYgZoVIOE&fmt=18I’m using vegas platinum and x264vfw codec, intel version of h.264. My basic settings (by no means optimal) for uploading to YT are: 480×360 (same as their player) square pixels, x264 codec is set to “single pass – bitrate-based (ABR)” 4Mbps, other codec settings as default. platinum render settings: frame rate same as source, deinterlace, audio interleave every 250ms, either 320Kbps mp3 joint stereo (FhG from wmp11) or 44.1K 2ch PCM.
-
Lulu Malmgren
April 9, 2008 at 9:43 amThanks for responding – what kind of hacks? Also, there was no link to the page you suggested.
-
Lulu Malmgren
April 9, 2008 at 9:49 amHi – thanks for responding. Vimeo – looks good. Someone has also suggested blip. Will look at those once i’ve sorted this youtube thing – for the exact reason you suggested above. Plus I really want to get a grasp of what I’m dealing with before I edit more video. I agree H.264 looks better than JPEG. Yes it was that article – I think it was written last year, so some of it might be out of date.
-
Lulu Malmgren
April 9, 2008 at 10:27 amHi – the &fmt=18 really works. This is the video which i’ve uploaded 10 times (obviously the last 9 are private – until I find the perfect compression settings): https://uk.youtube.com/watch?v=YeofQsfydj4
when I add the &fmt=18 it really does change it. Also, I noticed a text appear under the video: Watch this video in lower quality for faster playback.
Is there any way to permanently append it to the URL. I can only add it to the address bar – can’t click into any of the URL boxes next to the video…I can see it’s permanently on your https://www.youtube.com/watch?v=WcaYgZoVIOE&fmt=18
Also, I tried compressing straight from FCP into Quicktime with the following settings:
Compression type: H.264
Frame Rate: Current fps
Key Frames: Every 24 frames
Frame Reordering: Ticked box
Data Rate: (default was automatic) there is an option to select restrict to ? kbits/sec
Compressor quality: High
Encoding:Fast encode (Single-pass)
Size: 480×360
Dinterlace Source Video: Ticked boxSound: AAC format
Rate: 48.000 kHz
Render Settings: Normal Quality
MPEG AAC LC Encoder settings:
Encoding strategy:Average bit rate
Target bit rate: 320 kbpsThe file size (with 8 mins of video) turned out to be 283MB. I uploaded it last night and this is the link: https://uk.youtube.com/watch?v=Z0ZZReFjzEo
Not much difference to the first upload, which was 99MB: (H.264 for iPod video and iPhone 640×480 @ 1500 kbps, progressive, multi-pass. Audio is 44.1 kHz, stereo, m4v, Pixel aspect ratio: Square, Frame rate: 100% of source, Maximum data rate: 4 Mbps, Audio Encoder: Format: MPEG4, 44.100kHz, Bits Per Sample: 16, AAC encoder quality: high, Data rate: 128 Kbps).
I’m now going to try to use your suggested settings with an FCP Export to Quicktime Movie (instead of export using QT compression – which is what I did above).
Looking at it now, this way doesn’t have as many options as the “export using QT conversion” – I can set the frame size, pixel aspect ratio, field dominance, editing timebase, timecode rate; can select H.264 codec, and can shift the quality up to Best (in this advanced tab I can change the fps, key frame every ? frames, and limit date rate to ? kbytes/sec; Audio settings are rate (48kHz), depth 16 bit, config, channel grouped.
But if I can find a way to append the &fmt=18, i’ll just upload smaller sized videos to regain some much needed time – having spent almost 10 days trying to figure this out.
Long post – but am determined to gain a solution.
Thanks again x
-
Len Reston
April 9, 2008 at 10:34 pmYeah this also a long post but mostly summarizes what I know about it from reading various forums and tinkering.
For now they seem to be using the &fmt=6 as their HQ, which is their so-called big flv 480×360 with 96Kbps mono audio – sometimes you see the HQ link for this format under the player, or is selected depending on client bandwidth/user settings. Their &fmt=12 is the old 320×240 flv, both h.263. These extensions are for YT’s testing and was discovered I think in early Feb 08 but don’t know for sure.
I’ve seen something called a greasemonkey script for firefox to either put the =18 link in the page or auto-append it. There are other methods out there – haven’t used them though. Despite all this there’s really no knowing what YT will settle with. IMO the =18 with stereo is the most pleasing even though audio goes thru a “compressor” and makes everything very loud. Background sounds are elevated.
It looks like all the settings should be OK. Wouldn’t use too few frames per keyframe. As an experiment I tried 1 frame/keyframe. It severly reduces compresson, caused the bit rate to climb to the limit set at 4Mbps and looked very poor, as in running out of bits. It was backed off to 15 per keyframe. 24 probably results in a lower average bit rate. I think you can reduce bit rate until you see lower quality. 4Mbps is arbitrary because with YT’s 1GB limit, you can upload a 10 minute vid with over 13Mbps total rate. Perhaps maxing out with 720p is good idea if you believe YT will survive well into several upgrades later when HD may be the norm on a global scale.
I forgot to mention that on this one
https://www.youtube.com/watch?v=BO5c_Ktpdf8&fmt=18
I used QT PRO because I realized the demos are QT files anyway (duh). It is 16Mbps 1920x1080i 29.97fps H.264, 44.1KHz 2ch PCM. It was uploaded as 15 frames per keyframe, single pass, frame reordering checked,no filters, h.264 480×360 restrict to 4Mbps, sound 320Kbps aac lc abr best. No deinterlace since can’t tell difference when source is 1080 high resized to 270.
From watching the Mustique11, I see it’s very sharp and full frame. There’s a lot of motion at times. From MediaInfo it’s at 29.97fps. (Was that your cam frame rate? YT uses source frame rate though can’t be sure in every case.) This puts a heavy load on the codec (more blocking). The Canon consumer demos are very conservative with motion as their cam codecs don’t handle motion very well. Their vids look good on YT’s h.264 with 16:9 letterbox even if left sharp. When there’s lots of motion I either soften (don’t have motion blur) slightly overall, and/or add black frames (or virtually “no activity frames” same properties, frame rate size etc) to the end of the video, like 2/3 to 1x the length of the vid or even more if it’s a short clip (too much and it may buffer in the player). This causes the codec to shift more bits to the active video portion – the avg bit rate is about the same. The no activity period is kinda annoying but it benefits all three YT versions if the vid itself isn’t too long. It benefits uploaded flv’s the most when you can adjust bit rate of the actual file that will be loaded into the player, IMO. You never know when YT might squash file padding, as they have with the hex edited flv.
There’s also the option of dropping the frame rate to 25, 24 or 20 resulting in some judder if different from your camera rate – it might be a better tradeoff than the erratic blocking of the codec. YT may be interested in encoding speed at the expense of some quality. Someone wondered what could be google’s power bill as they encode all the videos on their servers to the new versions. And some have observed repeated re-encoding of their videos – even as far back as early 06.
-
Lulu Malmgren
April 10, 2008 at 1:14 pmHi Len, thanks for the response…
[I’ve seen something called a greasemonkey script for firefox to either put the =18 link in the page or auto-append it.] I’m more interested in other people seeing the quality version: i.e. prospective employers. I have attached a note in the description next to the vid – following your page; see original Mustique film:
https://uk.youtube.com/watch?v=YeofQsfydj4&feature=related
[It looks like all the settings should be OK.] I will upload one more version (Mustique12) with the following settings: do you think it matters if I export to QT movie, or export using QT compression? Someone suggested export straight to QT instead of using the Final Cut Studio program compressor – I could also full export to QT (file size is 1.98GB), then compress in QTP. What do you reckon?
Compression type: H.264
Frame Rate: Current fps
Key Frames: Every 15 frames
Frame Reordering: Ticked box
Data Rate: 720 kbits/sec
Compressor quality: High
Encoding: Fast encode (Single-pass)
Size: 640×480
Dinterlace Source Video: Un-ticked boxSound: AAC format
Rate: 48.000 kHz
Render Settings: Normal Quality
MPEG AAC LC Encoder settings:
Encoding strategy: Average bit rate
Target bit rate: 320 kbps[4Mbps is arbitrary because with YT’s 1GB limit, you can upload a 10 minute vid with over 13Mbps total rate. Perhaps maxing out with 720p is good idea if you believe YT will survive well into several upgrades later when HD may be the norm on a global scale.]
I’m guessing 720p is the kbps data rate. I havn’t yet seen an option where you can select 4mbps – only kbits/sec comes up in the custom options – even in compressor.
[Was that your cam frame rate?] How can you find out? It’s an old camera – handed down to me 7 yrs ago. One thing I thought of – hadn’t crossed my mind until you mentioned the results of too much motion for YT…I remembered that I always add a digital effect on my camera (“flash”) when filming; it was style trick I picked up off a veteran filmer; I always preferred the look of the footage with a slight movement quality, instead of the sharp normal handycam look. I only apply one nodule of the effect, and the footage looks completely fine on a tv screen/dvd etc. Perhaps I have to take this into consideration when thinking about all the motion in my videos.
[When there’s lots of motion I either soften (don’t have motion blur) slightly overall] Is this in the compression (filter) settings – do you add soften filter, or do you add this in the editing process?
Thanks for all of your help, really appreciate it – I feel like I am gaining a bit of ground. Plus it is crazy to think of what I have learnt in the last 10 days.
-
Daniel Low
April 10, 2008 at 1:26 pmYour key frame rate is way too high, I suggest every 250 frames if you stick to transcoding at 25fps – general rule of thumb is the keyframe setting should be 10x your frame rate.
You should deinterlace unless your source was shot progressive.
You should perform a multi pass (slower) transcode if you want the best looking output.
Your audio target bitrate is IMO excessive. I’d suggest 192kb/s max.
720p usually refers to 1280x720p – an HD format – ‘p’ stands for progressive, rather than ‘i’ which is interlaced
Lastly, compressor will do better job of this than simply going straight out of Quicktime Pro. Compressor in a dedicated transcoding application with high quality scaling and deinterlacing etc. Quicktime Pro is a ‘player’ with some basic export tools.
__________________________________________________________________
Please post back saying what solved your problem. It could help others, and saying ‘thanks’ is free! -
Lulu Malmgren
April 11, 2008 at 11:02 amGreat – thanks for that.
Sticking with compressor – plus uploaded a new version with the info above and it works well. Still feel like i might be missing something. My footage looks more blocky than normal.
Have made my own custom compressor setting:
Format: QT movie
H.264
Frame Rate: 29.97 fps
Key Frames: 290
Frame Reordering ticked (this was defaulted?…)
Data rate: 3906 kbits/sec
Quality: High
Encoding: Best quality (Multi-pass)
Audio: AAC, Stereo, 48.000 kHz, 192kbps, best quality render setting
Frame Controls –
Resize filter: Better linear filter (defaulted)
OUtput fields: Progressive
Dinterlaced: Best (Motion Compensated)
Retiming control: Best (High Quality motion compensated)
Filters: Sharpen (10.0), Deinterlaced (sharp)
Frame size: 640×480
Pixel Aspect: NTSC CCIR 601/DV 16:9
Padding: CustomIt’s compressing now – am going to upload and see if there is a difference. Trial and error mode.
Am picking up what works best; would love to know what some of the options above mean. Learning completely off-the-cuff here.
Thanks for your post!
Poppie
Reply to this Discussion! Login or Sign Up