oh, video, why do you vex me so

Dear Lazyweb, what good are you? Seriously.

Someone please tell me how to convert this file into any other video format, using a Mac. Quicktime grays out "Export", and no matter what I've tried with ffmpegX 0.0.9w-r5, it croaks when trying to convert the audio ("qdm2").

You're really disappointing me here, Lazyweb. I'm totally losing faith in you.

Previously, previously.

Tags: , , , ,

44 Responses:

  1. frandroid says:

    Dump it into Toaster, make it into a DVD, and then rip that off? Pretty convoluted and lossy, I admit.

    • jwz says:

      What in the world would lead you to believe that Toast is able to convert this file to a DVD? iMovie won't even load it.

  2. kfringe says:

    VLC does the job. No fuss, no muss.

    • inqueery says:

      Yup seconded. Did a nice job although with fewer encoding options.

      • dominobutter says:

        looks like we've got a quorum.

        i was able to transcode to mpeg4 using the streaming/export wizard of vlc 0.8.6-svn on mac intel.

        i tried mpeg2 first but the video didn't encode. then vlc crashed. then it worked.

        • jwz says:

          I think I've gotten VLC to do it, but that insane "open" dialog box with ("save" hidden three levels deep!) make me hurt real bad inside. Is there some command-line way to make VLC do this?

          Is VLC not built on top of ffmpeg and mencoder like everything else in the world seems to be?

          • jaydubbee says:

            vlc -I dummy emerge_skinversion_300.mov --sout='#transcode{vcodec=mp4v,vb=4096,acodec=mp2a,ab=192,scale=1,channels=2,deinterlace,audio-sync}:std{access=file, mux=ps,url="emerge.mpeg"}' vlc:quit

            Adapted from my .history, adapted in turn from the videolan wiki.

  3. pnendick says:

    I suspect it uses the same mencoder calibre crap as ffmpegx and whatnot but VisualHub still manages to consistently work for me. Drop your DivX/Sorenson/Whatever-you-can-stuff-in-an-avi crap onto VisualHub, convert to MP4 (don't bother with any options) and then use the resultant file in DVD Studio Pro or iMovie.

    As a member of your lazyweb I must report the wages suck.

    • jwz says:

      Did you try it?

      • pnendick says:

        Maybe. Where's my cheque from last time?

        OK, I tried it and have now experienced my first VisualHub failure. It's also stumped MPEG Streamclip (no surprise there really). If you're nice to me I might go find my backup of Sorenson Squeeze and see if I can convert this into a grown-up format for you.

        Incidentally I would accept payment in the form of complimentary beverages and introduction to fit young ones at your club should it come to that.

        • jwz says:

          And, having given me the answer I always get, you probably still wonder why I always ask, "have you tried it".

          I already paid you in the form of birdborg, sex doll rafting, and cock-crushing appliances. If that's not enough, feel free to renegotiate with HR.

          • pnendick says:

            Be nice or I'll convert this to RealMedia and push it to your Webtop.

            Since it now seems VLC has you covered I won't bother with the commercial apps here - for the record, they're no better. The QT DRM bit is a hassle.

  4. jcheshire says:

    What format do you want?

    Or, to put it another way, is it this particular video you want, or are you simply trying to modify QuickTime files? If it's this video, I repeat the original question.

    • jwz says:

      I frequently encounter files that suffer the problem that this file has: when I drag the file into iTunes, I cannot edit the metadata (e.g., song and artist name) because it has the "don't save" bit set in the Quicktime header. I have dozens of these.

      Nobody has told me how to turn off that bit, so the next best thing is to re-encode it.

      But I don't know how to do that either.

      • rapier1 says:

        what does a quick time header look like? If you have that information you should be able to just edit the file directly with a hex editor - xemacs has a hex edit mode doesn't it?

        • jwz says:

          Gosh, yes, that sounds so straightforward! Let me know when you've made it work.

          • rapier1 says:

            i guess that was a dumb suggestion.
            sorry about that dick.
            shit, I mean jamie.
            I get your name mixed up all the time.

            • luserspaz says:

              Heaven forbid the man is rude to you in the comments section of his own livejournal! Maybe next you can be snarky to him after he doesn't like your suggestion to rebuild his kernel or change distros!

              • rapier1 says:

                Oh shut the hell up. If Jamie doesn't know I'm fucking around then he's not the guy I've known for some 12 or so years.

        • edouardp says:

          Several problems stop that working as well as you'd expect.

          Firstly the movie has a compressed header ('cmvd'). Well OK - I can copy that out of the file with 0xED (a mac hex editor) and paste in into a new file. Then write a few lines of C that calls zlib's uncompress() function on it, and write that, in turn, to another output file.

          It's now easy to delete the "Do Not Save" atom ('nsav') from the user data section ('udta'). The wrapper atoms all need patching for the delete, but that's sinmple.

          I can then delete the compressed header from the original file and replace it with the uncompressed one, but now of course the chunk offsets ('stco') for each track are wrong (from removing the nsav and cmvd atoms, and of course decompressing the real header.

          The simplest solution to that would be to write a new movie header that references the first file's track data, but then Jamie would have two files that needed to be kept together, and I'm sure he'd dislike that.

          So the only real solution would be to patch the chunk offset tables for the new header.

          Which actually wouldn't be hard, but that would take 3 or 4 hours of my day, rather than 20 minutes with a C compiler and a hex editor.

          I'm not going to do it because Jamie is always posting pictures of scary clowns, and that makes me feel bad. You, on the other hand, may like scary clowns. Get coding!

          • omni_ferret says:

            Ah. I'd had this simplistic notion that just replacing the compressed header with the decompressed one would do the trick. Instead, iterating through the atoms is necessary. Right. This is very helpful. Thanks, Quicktime guru.

          • babbage says:

            Can't you just change the nsav to a free to avoid patching the parents and updating the chunk offsets?

            • edouardp says:

              If the header wasn't zlib compressed, yes. Then you could just use Dumpster on it.

              Actually I think you can set the value in the atom to zero rather than one, and you've effectivly cleared the flag in-place. But not in a compressed header. Which is probably one of the reasons why people compress them in the first place.

              • rapier1 says:

                I actually have some code based on the get3id code base that does the whole 'rip out the header and replace the nsav data'. Unfortunately, it just dumps out a new header into a new file. I started looking at it more and then I thought about the clowns and stopped.

              • rapier1 says:

                But not in a compressed header. Which is probably one of the reasons why people compress them in the first place.

                from what I read, exactly right.

  5. I've had success with iSquint (you don't have to choose the iPod quality).

  6. jakenelson says:

    jwz: "(Thing X) doesn't do what every reasonably sane and rational (thing of same type as X) does. Anyone have something that it does work with?"
    random person: "Try (FancyNeatoProgramY), it always works for me!"
    jwz: "Have you tried it?"
    random: "Huh, it doesn't work with (Thing X). Weird."
    jwz: "That would be the point..."

    Rinse and repeat.

  7. evan says:

    Whenever you post these I'm always tempted to respond with "Oh, I bet that foo bar would work if you recompile your kernel" in a lame attempt at being funny. But then others do it for me and I see that it mostly just annoys you.

    Here's something halfway between those extremes. Hopefully it won't annoy you too much.

    I'm hardly media-conversion savvy, but I often use gstreamer for these sorts of problems because I think it has a sensible interface. From their docs it looks like it runs on OS X, and I managed to convert your video with this command.

    gst-launch-0.10 filesrc location=emerge_skinversion_300.mov ! qtdemux name=qt avimux name=avi ! filesink location=foo qt. ! queue ! decodebin ! xvidenc ! avi. qt. ! queue ! decodebin ! lame ! avi.

    I put in double-spaces that make it easier to read but HTML eats them; maybe if you read this in a mail client it'll be more sensible.

    In gst-speak, the bits separated with a ! are "pipelines". I have four of them here, separated by double spaces.
    1) filesrc to a quicktime demuxer named "qt"
    2) pipe an avi muxer named "avi" into a filesink
    3) pipe qt's output into a decoder, then an xvid encoder, then into avi
    4) pipe qt's output into a decoder, then an mp3 endocder, then into avi

    gstreamer is apparently clever enough to figure out that in (3) and (4) there's a video an audio component involved and so it hooks up the video and audio inputs and outputs from the muxer/demuxer accordingly.

    (The "queue" bits in the pipelines mean "use buffering" so that the video and audio pipelines don't interfere with each other.)

  8. hermeticseal says:

    mencoder -oac pcm -ovc lavc -lavcopts vcodec=mpeg4:vhq:v4mv:trell:mbd=2:vbitrate=800 -o emerge_skinversion_300.avi emerge_skinversion_300.mov

    off the top of my head i cant remember the args to create mp3 audio. this cmdline gives raw pcm audio, and mpeg4 video in an avi wrapper.

    seriously... don't mess around with ffmpeg or even VLC. mencoder almost never fails. the only thing i use ffmpegX for is transcoding to PSP-compatible video, mainly because there are so many stupid steps required to get the PSP to grok the file.

    • jwz says:

      When I do that, I get an .avi that crashes Quicktime Player. So far VLC is the only thing that has worked at all.

      • hermeticseal says:

        whoops. probably need -ffourcc DIVX and the divx codec installed on your mac. of course it didnt crash quicktime player for me without it, it just wouldnt play the video. with -ffourcc DIVX it played fine. my intel mac is at work, and i am running 10.3 on this G5, so that might have something to do with it.

        quicktime is a POS. i just don't use it at all. of course it sounds like you are trying to use iTunes as your video repository so you are stuck with it. the main problem with QT, at least as far as i'm concerned, is that it doesnt handle .avi too well, and doesnt respect aspect ratio information in the .avi header.

        VLC is fine i suppose, but i was always put off by the GUI and its baroqueness as you complained about above.

  9. dranon says:

    I hacked together a program that sets the nsav flag to zero in QuickTime files, both with uncompressed and zlib compressed headers. It hasn't mangled any QuickTime files that I've tried it on, but since I don't have QuickTime Pro I can't actually check to see whether or not it enables the save and export features.