converting from photo-JPEG to MP4 or H.264 looks awful

Discussion in 'Digital Video' started by thagomizer, Jun 2, 2007.

  1. thagomizer macrumors 6502

    Joined:
    May 26, 2005
    Location:
    USA
    #1
    My digital camera records movies in a Quicktime codec called JPEG-photo. I think it's just a bunch of still JPEGs at 30fps. These videos play very smoothly and are crisp (at 640x480), but they're huge.... hundreds of MB each.

    I've tried converting them to MPEG-4 using iTunes 7.2's "Export to AppleTV" option, or converting to MPEG-4 (with or without H.264) using iSquint. Either way, they look horrible, even using the highest encoding quality in iSquint. The playback of the resulting files is choppy, and there's a noticeable loss in image quality. However, the files are about 10-20% of the original size, which is great.

    Is this the best I can expect from MPEG-4, or is there a way to get better picture quality? Do I need to pony up for Quicktime Pro? I'm willing to accept having the files being a little bigger. The file size is not much of an issue, I just want them to play on my AppleTV.
     
  2. fistful macrumors 6502a

    fistful

    Joined:
    Mar 29, 2004
    Location:
    Socan
    #2
    I'm not familiar with this video format you speak of but does your camera have a setting to record the video directly to MP4?
     
  3. lostless macrumors 6502

    Joined:
    Oct 22, 2005
    #3
    MPeg4 and h.264 are lossy codecs. Each frame in either format is dependent on frames around it and so often has a keyframe, thats a full fame. Motion jpeg is a lossy/lossless format. The video frames are lossy (jpeg) but the video motion is not compress. Every frame is independent. Mpeg4/H.264 has lossy motion. Full frames (or keyframes), as i said, come every 15 frames or so to help with teh motion prediction. In mpeg 4, you will see textures drifting. Looks kinda like a solid blob of color moving. Thats just the format using previous/future frames to predict motion. Its not perfect, but looks very good at proper viewing distance of your display. (dont sit too close to your tv/monitor when watching, both formats assume you are viewing at proper distance) H.264 is a very good codec, and im supprised that its giving you issues. Sure , it wont look as good as the original, but pretty damn close. try using 2 pass encoding to improve the motion prediction.
     
  4. thagomizer thread starter macrumors 6502

    Joined:
    May 26, 2005
    Location:
    USA
    #4
    My camera only records in the Photo-JPEG format. It's a Panasonic Lumix FZ-30. These videos still look good when blown up on a home theater screen, even though they're only 640x480.

    I was hoping there would be some compression level at which the H.264 still looks good, but I can tell the difference after only a few seconds of watching, especially on a big screen. It could just be Apple's implementation of it. Or maybe it's because I'm not using Quicktime Pro? Does Apple limit the quality produced by the free version of the Quicktime codec?

    Does anyone know if iSquint uses its own codec, or the one supplied by Quicktime?
     
  5. lostless macrumors 6502

    Joined:
    Oct 22, 2005
    #5
    Apples h.264 encoder isnt the best. Isquint uses FFMPEG. (which uses the GPL h.264 encoder, x.264) In my experience, produces files pretty damn close to the orignal. As i said, it wont be perfect. Mpeg 4 on the other hand is just poor. Espescially if viewing on a very large screen. back to what I said about viewing distance.

    Anothe thibg that comes to mind, is that motion Jpeg is very noisey due to the jpeg compression. (i have a camera that shoots in the same format) Looks kinda like film grain, and makes gives teh illusion of the video being sharp. Mpeg 4 and h.264 dont do well with film noise and will smooth it out for the sake of simplifiing textures. H.264 does fare better thogh. You will still not get the original quality.
     
  6. thagomizer thread starter macrumors 6502

    Joined:
    May 26, 2005
    Location:
    USA
    #6
    Thanks. This is what I wanted to know. I may give iSquint a shot again and play around with the options some more.

    The codec I have is actually Photo-JPEG, not motion-JPEG (see http://flow.la-va.org/archive/motion-jpeg-vs-photo-jpeg/. As I shot in high light, there was no grain, and it looks pretty good. I may just keep my source material, at least, in this format and archive it.

     
  7. huntercr macrumors 65816

    Joined:
    Jun 6, 2006
    #7
    You might also try this: In quicktime export to MJPEG first. Verify that there is no loss of quality, then load in the new file into quicktime then export to H.264 , 30fps, frame reordering, keyframes=every 120 frames, 3000 kbit/sec, multipass encoding.

    You can also try this skipping the mjpeg conversion, but I was thinking maybe this is a quicktime bug.


    The resulting file should still be substantially smaller than the original ( though maybe only by a factor of 2-3 since we picked such a high datarate ) but it shuld play nicely on your AppleTV.
     
  8. banjomamo macrumors regular

    Joined:
    May 9, 2006
    Location:
    USA
    #8
    Also make sure you do a multi-pass encode. It takes longer but the quality is much better.
     

Share This Page