OS X - video formats.... again :(

I’ve finally produced something resembling a complete animation (a little over a minute) and despite a few weird artifacts it’s quite acceptable.

I rendered to PNG files, then re-rendered to Quicktime from the Sequencer. I took this video into HyperEngine AV to combine with the audio track and output to MOV again. This leaves me with a 70Mb file and this is where things get depressing (again - I knew it would happen)

None of the available options in HyperEngine seem to solve the filesize dilemma satisfactorily. The inbulit AVI output option insists on a standard image ratio which might be okay except I rendered a tall thin video, not a short wide one :frowning:

I’ve tried a variety of compression options using Quicktime output but can’t get the file below 29Mb even on low quality (There a re more to try but it’s getting frustrating now). I’ve reduced the image size to 180x320px but it’s still too big.

I have a copy of ffmpegx (OS X GUI for ffmpeg) but quite frankly, it just doesn’t work. I either get a video file with no audio track or the encoding fails for any of a host of reasons, none of which mean anything to an ignoramus like me. The whole interface and barely explained variety of options leaves me feeling somewhat inadequate. (The “simply drop a file, choose a format then press go” thing never works - ever.)

I really could use some pointers on producing an acceptable, sharable output of modest size on anything that will work reliably and relatively easily in OSX Panther (10.3.9). I just want to get my Blender output combined with audio then output to an acceptable size.

Help…?

I don’t know much about OS X, but I do know that quicktime is not the best program for transcoding video.
Try opening your video in the blender sequencer, then re-render in AVI codec.

I really could use some pointers on producing an acceptable, sharable output of modest size on anything that will work reliably and relatively easily in OSX Panther (10.3.9). I just want to get my Blender output combined with audio then output to an acceptable size.

The Xvid codec sounds like what you need. It’s open source, many binaries available. decent compresson.

After you re-encode with blender, you can use any video processor to add your audio, just remember to select “direct stream copy” for the video track so it doesn’t try to recode your video.

Hello there,

FFMPegX is a strange program that doesn’t like me. If you want to use FFMpeg the best way is to go from the command line.

I’ve found that there are, really, only two truly plausible solutions.

  1. Use the latest version of VLC to transcode. (0.84+ on mac has the transcoding wizard – it’s not bad, but it has its quirks).

  2. Buy quicktime pro.

Outside of 3ivx and Quicktime’s H.264 (whose encoder is riddled with bugs) you won’t really find a better compressor for a low price. There are higher-end encoding programs like Combustion, but for the most part it’s best to jerry-rig something through QuickTime pro or VLC if you can.

As far as settings go:

  • turn off streaming (unless you want streaming)
  • kill off “limit data rate”
  • set the resolution to half of whatever you rendered
  • sound settings: AAC or MP3 at 128 KBPS, mono if you can

Good luck.

I’ll agree with Charles: what you need is QuickTime Pro. It’s not expensive, and it does a great job of this kind of work.

Render to PNG sequence, then using QuickTime Pro open the Image Sequence: set the frame rate when it asks you, then voila: perfect quality import. Now you can export to the encoder of your choice.

As for audio, take your original audio into QuickTime Pro, “Select All” then “Copy” then (making sure your play head is rewound all the way to the beginning) “Add to Movie” on your finished piece and it’ll be a new audio track.

Let me know if you have any questions,

Rendering as sequence is silly since you can render to Quicktime PNG. I have a Mac and would suggest MP4 (still in quicktime) or H264 (Tiger) Don’t need to mess with anything other than quicktime pro for this.

Okay all, thanks for the tips. It’s looking like QT-Pro is the most viable answer.

Rocketman: As far as I know (looking at Xvid site) Xvid is not for Mac and AVI codec is not an option in Blendermac. Even if it was, I’d still have to post-process to add the audio and would be where I’m at now. Thanks anyway.

kattkieru Yes, I’ve read so many amazing things about ffmpegx but to date I’ve found it completely useless for anything at all. It’s very buggy with some features (add audio) just not working. I looked for VLC transcoder but all i find is VLC Player. Is the transcoder a GUI app or command line? Any link for it?

Bischofftep I want to read a bit more about using QT Pro though it’s looking like the best solution. Does it allow any manipulation of the audio, like shifting it around for sync? Can multiple video tracks be added and can any effects be added (fade in/out, cross-fade etc)?

masterhoshi Rendering to images is actually recommended for a host of reasons for bigger animations. The major one being that if the system or Blender crashes halfway through the three hour render (and that’s not a big render in the scheme of things), you don’t lose everything. If you render direct to video (I do for tests and short anims) then if something crashes on the very last frame, you lose the whole render. With images you just restart, render one image and there you have it. The sequencer recompiles into video in a matter of minutes so you can play with a range of format outputs working with original quality images as the starting point every time (actually, I might even try that tomorrow!). Is still need to be able to add the audio track then re-output so it’s gonna be QT-Pro or something.

Thanks again, I’ll have to go shopping I guess :slight_smile:

I agree that Quicktime is a very handy tool to have. There are free tools that let you encode so you don’t have to buy it such as QTCoffee and QTamateur, which just do a similar thing to Blender and call the free built-in Quicktime libraries.

http://www.3am.pair.com/QTCoffee.html
http://www.mikeash.com/software/qtamateur/

I think Quicktime is still better though as it gives you a lot of tools and info about the movie.

What I would say is don’t reduce the resolution of your movie. What you need to do is adjust the bitrate of your video. I load a PNG image sequence directly into Quicktime and export as a Quicktime movie using either H264, mpeg-4 or Mjpeg/photo-jpeg. Mjpeg is more an offline format and it is similar to dv as it doesn’t use inter-frame dependency so you can scrub through the movie forward and back very quickly.

For online formats, I recently prefer H264 because of the quality/file size ratio. For dvd quality, 768kbps is the generally accepted cut off point for loss in quality with mpeg-4. I used that on the elephants dream trailer to get it down to 7MB and it was just over a minute long and around 640x360. When you do this in Quicktime, don’t set the bitrate manually though because this seems to use constant bitrate encoding (CBR). Use the slider instead as this looks like it uses variable bitrate encoding (VBR), which gives better quality - I’m not 100% sure if that’s the reason but the slider gives noticeably better quality. The setting High correpsonds to 768k video. If it’s 320x240 video then you might get away with medium setting.

I sometimes like ffmpegX but it has a nuisance feature that only lets you use video with a resolution that is a multiple of 16 plus it screws with the aspect ratio sometimes. The GUI is not very intuitive at all.

I do sometimes use it to make an mpeg though. I actually still prefer mpeg over the newer formats based on compatibility. As long as you have a resolution that is divisible by 16 like any of the standard resolutions, you can output to mpeg video. I think you can load in an audio track separate but if you export from Quicktime in a format that ffmpegX supports (preferrably a high quality one like mjpeg or dv on best quality, which are lossless) then you can have video and audio in the same movie and ffmpegx will do both at once.

If you have problems with that, you can actually encode mpeg video and audio separate and then multiplex them together. The best mpeg tool around is mpeg streamclip.

Hm… you can definitely set in and out points for sync of audio, though it is not very user-friendly (imagine having to paste… listen… undo… move playhead… paste… listen… etc.). Multiple tracks is easy, and includes multiple tracks of different types (video, audio, text, etc.), but effects I am not familiar with. I use Final Cut Pro for real editing work, but that’s in a different class than just QTPro.

My recommendation would be (to keep it lowest cost, anyway) to use Blender’s internal sequence editor to do your fades between scenes, render to PNG, and import that into QuickTime Pro as an image sequence. Then import your audio there and use the Export… function to render it out to an internet-appropriate, self-contained movie.

I agree that H.264 is the best out there by far right now, but be aware that it isn’t broadly accepted yet (if you don’t have QT7 you don’t have that codec). If you want to hit maximum audience your best bet is Sorensen 3 (good, but getting a little long in the tooth) or MPEG4.

Good luck!

Download the player itself. There’s a “Wizard” thingo under one of the menus. It was in the windows version for a while, but only 0.84 of the VLC Player on Mac has it.

Okay, thanks for all the responses. I should be able to find a workable solution among this lot. I’ll start with VLC since I have a bookmark for them and work my way through the other suggestions as needs be. I don’t greatly object to buying QT-Pro (as Mac stuff goes, it’s pretty affordable) but it’s difficult to get hold of stuff where I live and without a credit card, buying online isn’t an option. But I’ll drop in the Mac Shop next time I pass by.

For the record, all I’m trying to do at this stage is make something I can post here in the critique of finished forums and say to all of you “Hey, look what I did”. So I’m only after good web quality - at this stage. When I truly get the hang of Blender and come up with a suitable, original, story to tell, I might need better quality.

I will mess with the bitrate settings in the software I currently have (I really don’t understand any of that side of things and could do with a simpleton’s tutorial on audio formats if there is one) and see if that solves the current problem of not being able to compress below 20MB.

Thanks again,

Edit: Downloaded new VLC but it gives lots of errors too. “Cannot find…, cannot create…, cannot…, something about ffmpeg…, and so on…” I’ve managed some output but my choices are limited to those formats that work.

I’ve played around with the bitrates in HyperEngine’s export and progressed a little. I’ve now managed an 11Mb file of reasonable quality at 240x320px.

I’ve renamed my hard-disk to remove the default space (“Macintosh HD”) and the folder in which ffmpeg resided to see if this makes ffmpegx behave any better (apparently it doesn’t like spaces in directory names :o )

I’ll keep going :-?

Edit2: Managed some good output from ffmpegx but it had no audio track. Had to force it to add the track separately (don’t know why it ignored the embedded track?) by entering the full directory address of the audio file in the “add audio” text box. I’ll post something to Elysiun focused critique very soon.

I know this topic is about 2 months out of date, but I have had similar problems with losing sound and so forth when trying to get into a DivX/XviD format.

Anyway, I seem to have come up with a solution that I’ve not seen posted here. Of course, when one searches, one comes up with six hundred+ posts, so it could be lost in the spam. If not, or if someone comes after me, here is what you might try.

  1. DO NOT USE .MOV FORMAT. Do not save to .mov format or try to directly convert to XviD/DivX from QT or whatever. Audio goes bye-bye. And if you try to convert from .mov to XviD/DivX in the ffmegx program, audio also will go bye-bye.

  2. Save to a .dv file from your favorite program once you have audio, video, whatever mixed to how you like it. Yes, the file will be an absolute pig for size, but this is only an inbetween bit.
    *Note: Why .dv? Searching around through google, I found a note tucked away on the bottom of a webpage that the channels in the .mov format go all wonky for the XviD/DivX conversion. .dv was the format suggested instead by the page author. There may be other formats that will work too (or better), but I wasn’t going to try to reinvent the wheel…my brain already hurt at this point.

  3. Open up your ffmpegx program, drag/select your .dv file, and choose the DivX 3 [.AVI] (ffmpeg) option.

  4. Fiddle around with all the options/tabs/whatever within the format to get everything how you want it. Then, the most important part, go to the “Options” tab and check Decode with QT. Encode.
    *Note: While you may find other formats and such that work, I found out that my audio and video were absolutely not syncing. Opening in QT showed that audio and video tracks had become different sizes. With the Decode with QT checked (could not find it under other DivX/XviD’s), then things sync up how they should.

There. That’s it. While there may be many other ways to get that pesky movie into DivX/XviD format on a Mac, this is the procedure I managed to come up with.

Hey:

The .dv format is a lossy compression: you will lose some of your detail.

I’d suggest using something non-lossy such as Animation, or if you have it QuickTime Uncompressed.

Everything else looks groovy.

I seem to recall reading somewhere that AVI files require audio to0 be encoded at 48000Hz whereas the “standard” frequency seems to be 44100Hz and I wonder if this is where the problem lies?

Since posting the original question I discovered MpegStreamClip which is freeware and works pretty well. It doesn’t support all the formats that ffmpegx supports but since I never got anything useful out of ffmpegx (nor any answers from the user forum) the number of codecs it supports was a moot point - for me.

One “major” breakthrough came as a result of osxrules’ post above where he mentioned frame rate. Prior to this I’d left that setting alone, not knowing what it did, and tried to use the compression settings alone to reduce file size. Now I try a fairly low frame rate setting, render and check the quality. I’m amazed how small a file can get and still be or a reasonable quality for web-based download and viewing. Since the frame rate is explicit, it over-rides any compression setting so I don’t bother changing that any more.

As far as ffmpegx goes, as I mentioned before I did mangage to get an AV file out of it but to do so required forcing a separate audio track into it via “Add Audio” with a specified path (the drag and drop or add-menu methods don’t work at all). This way, the embedded track was ignored and replaced by the added track. This requires having an audio track cut and cued to match the video - which was another matter altogether since my composite had been cut, synced and output in HyperEngine.

Hopefully most of this will be irrelevant when the Blender Sequencer is upgraded to Orange spec.

Rocketman:

I don’t know much about OS X, but I do know that quicktime is not the best program for transcoding video.

What? QT is THE format of choice for video porfessionals! QT has across the board compatibility with just about any video device made, from 3G mobile to full-on 24p HD and everything else in between. It is the yard stick by which all others try to measure themselves. I’m not a big fan of Apple, but this is one area where they totally outclass and outshine ALL OTHERS!!!

Get QT7 Pro. Choose the H.264 codec. Choose your keyframe interval (longer intervals = smaller file sizes). Choose limit datarate to… (ex. 56 KB/sec for dial-up users - warning: a datarate this low looks extremely crapy). Save your movie. Done. You’ll get tiny file sizes with this method.

If you are woried about syncing up the audio, this can easily be done in Adobe’s GoLive. If you really have serious problems with paying for it, then you can download a cracked version from Morpheus - though this is not really recomended - but is easy to do. You can also apply wired sprites (rollover play buttons, etc…) and custom skins (including video skins - and yes, I’ve made these too) for your movies in GoLive. You could also try Totally Hipp’s “Live Strage Pro”. But, easiest of all would be to just sync your audio strip in Blender’s own sequence editor. Just go to the sequence editor and choose ADD>Audio in the timeline, then move the strip untill the audio matches your video.

Whoa! I seem to have (re)started something here!

Anyway, the purpose of posting the quick very-few-step process in the first place is for people (like me) who just want simple directions. Some of the major themes I found when I was searching for my answer of “How do I encode into XviD / DivX?” was
(1) Is there a simple way (on a Mac)?
(2) Is there a simple way that doesn’t require I spend my tuition/rent/mortgage/weekly food money to do so?
(3) Help me! Where’d my audio tracks go?

For my personal research, I started with a quick 4 second blender animation. That animation I imported into iMovie and to it I slapped in a 2 second sound effect, then saved as .dv. iMovie comes with the Mac OS, so there is not even a need to upgrade to QTPro for those of a chronically money-challenged nature. Please note that the merits of using X program for mixing sound/video over Y was not my purpose.

Concerning ffmpegX: it is not exactly intuitive, I admit, and the “multiple of 16” thing can be annoying, but for people like me who are just looking for a simple way to do things, the standard 3:2, 4:3, and so on sizes work just fine. On the plus side, it is very cheap (or, if you don’t mind the menu reminders and so forth, free) and the homepage has simple, step-by-step instructions to put it on your computer.

For those who don’t really want to play around with all the buttons, just “make it work, damnit,” the codec selection I suggested and “Decode with QT” are about all you need, it seems. My original test clip went from 14.3 MB to 256 kb. I’m sure fiddling with the buttons can bring it down even more, but I pretty much just settled on the defaults.

As Bischofftep noted, there are, of course, many variations upon the theme. I only chose .dv because .mov was not working and because of what I read on the bottom of a webpage. For the things I do, some detail loss is not a problem. Those who really need that last bit of photorealism can explore all the do-dads and whistles and compressions.

I’d really love to see an encoding tutorial, with examples of: if you do X, your result is this blocky monstrosity; and if you do Y, your resulting file size is slightly larger, but you get a 10x increase in detail.

And for you, AndyD, I found no need to use the “Add Audio” feature. In fact, I never touched it. Also, after reading your post, I purposefully returned to the clip in iMovie and saved test file three time, changing the sound option each time: 48, 44.1, and 32. Then, when I went to ffmpegX, I converted all the test files to 24 (.mp3 setting with VBR, nothing else changed from default settings). Seemed to work fine. Of course, I was only using a short 2 second sound effect, so, as the hair dye package says, your results may vary. :slight_smile:

What format did you originally output from Blender and what software did you use to produce the original dv file that you imported into iMovie?

For my encoding test -

  1. Blender output file: 100 frames in .mov (most options default)
    Probably could have exported in about anything, as long as iMovie (in this case) could see it.

2a. iMovie: imported the Test.mov
2b. iMovie: imported 2 second sound effect (.aiff)
2c. Test.mov and sound clip put together on the iMovie edit bar (sound in the middle of the clip somewhere…not trying anything fancy here)

  1. Export to .dv format from iMovie (Found under “Export”, with “To QuickTime” and “Export Settings” selected…brings up a new export menu with lots of options to play with) // Most default options used for export

  2. Continue to ffmpegX as per earlier post

That answer your question?

2a. iMovie: imported the Test.mov

Damn! When did that feature arrive? Last time I tried to use iMovie it would only import dv files!!! That’s why I asked the question.

Oh well, I might have to see if I can learn how to use it now (I always found it a bit unintuitive).

I once tried to drag a bunch of images in to iMovie to composite them (instead of using sequencer) but despite being numbered sequentially, they came in all over the place (they open that way in Photoshop too - just another strange OS X behaviour).

iMovie’s gotten a lot better. I actually use it as an intermediary for syncing sound as well, as I compile Blender without OpenAL and FMod. I haven’t tried the '06 version yet, but the '05 version is very useable.

I notice that some people mention not converting to DV because it’s lossy, but I will say that you pretty much have to convert to DV if you’re going to use iMovie, and for the most part the loss in quality is acceptable. (I think that, aside from DV, it will accept mp4s but it gets strange on you with anything but DV.) One of my projects went from QT:Animation codec -> DV for iMovie editing and sound sync -> H.264 output. Worked very well.

So if you’re going to render to a movie format, the Animation codec at the highest quality settings is best. I’ve also found that rendering direct to DV causes issues. Basically if I’m rendering to QT from a program that’s not made by Apple it’s always either QT:Animation or PNG’s.

Note that I have yet to experiment with iMovie HD’s HD features. I’m actually very curious to see how it holds up when confronted with that much data.