Shutter and Audio sync

Discuss encoding for devices and presets.
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
fwhite
Posts: 14
Joined: Tue May 01, 2007 12:35 am

Shutter and Audio sync

Post by fwhite »

Has anyone noticed when alot of action is on the screen it starts to slow down and the audio starts going out of sync? I'm using the default settings in Handbrake and watched a ripped DVD (The Incredibles: the cat in the tree scene). Initially, I thought it was the wireless G router. But I synced the movie to the internal harddrive of the AppleTV and it's still doing it. It's like the AppleTV isn't capable of playing alot of action on the screen. Or could it be the encoding? I read elsewhere that AppleTV tend to do this with anything over 2500 bps, which doesn't make sense since Apple stated it was capable of 5000 bps. I'm going to try setting it to 2300 bps, since The Incredibles was encoded at 2660 bps. I'll let everyone know how it went.
deckeda
Enlightened
Posts: 138
Joined: Thu Feb 22, 2007 8:38 am

Post by deckeda »

I just now played back that scene with Quicktime, but on my monitor enlarged the window to 1553 x 652 pixels. Looks incredible.

Don't know if this will help, but just last week I encoding this movie using the AppleTV preset + 2-pass. 2500kbps target bitrate. With anamorphic encoding this plays back as a 853 x 358 pixels file.
fwhite
Posts: 14
Joined: Tue May 01, 2007 12:35 am

Post by fwhite »

It sounds like you did the test on the computer and not the AppleTV. I tried everything from rebooting to isolating the type of software used. The current software I use are Mac the ripper and Handbrake. I did a direct copy from Handbrake and the 1 pass seemed to be ok but 2 pass had the same issue. I'm confused, I thought AppleTV supports 5kbps. If I can't do DVD at a good bit rate, what is going to happen when I transfer my HD-DV over. I hate to say it, but I may have to return my AppleTV until this is fixed by Apple. Any help from anyone would be greatly appreciated. I hate to get rid of my AppleTV.
deckeda
Enlightened
Posts: 138
Joined: Thu Feb 22, 2007 8:38 am

Post by deckeda »

Sorry, forgot to mention I didn't play back what I have on an AppleTV (I don't have one.) I realize that's potentially another variable.

Not sure why 2-pass would cause the issue for you, particularly since you specified a workable bitrate (assuming you meant kbps.)

You mentioned using HB's default settings. But on my copy that's 1000kbps and a regular MP4 file. At smaller bitrates, H.264 does a better job. I guess I'm not clear on just what you used.

Did you try the built-in AppleTV preset, or make a custom preset for AppleTV + 2 pass like I mentioned?

Don't get hung up on the AppleTV's upper total bitrate limit just now; you don't really need to encode that high anyway for good playback. 2500-3000 is plenty good for most DVDs if done right.
tgavin
Posts: 26
Joined: Fri May 04, 2007 3:20 pm

Post by tgavin »

I have been having problems as well.

I have been ripping tons of movies using visual hub's "Go Nuts" setting, which is usually around 4000kbps and have seen great results.

But after seeing HB's support for anamorphic and chapters I had to give it a try. So I encoded 4 different movies using the ATV preset and checking the 2-pass option. I then saw a thread about clicking the 2-pass option and needing a special command (secret sauce?), so I tried that too.

Well, even though HB had a smaller bitrate (and file size!), the visual hub files all played back smoothly and the HB files ran into stuttering and synching problems. I had to pause the movie and wait for it to "reset" the a/v sync.

Visual Hub is using ffmpeg - would that make a difference? I'm streaming from a G5 dual 2.0 using Airport Extreme G.
cbud
Bright Spark User
Posts: 181
Joined: Thu Feb 22, 2007 2:24 am

Post by cbud »

fwhite wrote:It sounds like you did the test on the computer and not the AppleTV. I tried everything from rebooting to isolating the type of software used. The current software I use are Mac the ripper and Handbrake. I did a direct copy from Handbrake and the 1 pass seemed to be ok but 2 pass had the same issue. I'm confused, I thought AppleTV supports 5kbps. If I can't do DVD at a good bit rate, what is going to happen when I transfer my HD-DV over. I hate to say it, but I may have to return my AppleTV until this is fixed by Apple. Any help from anyone would be greatly appreciated. I hate to get rid of my AppleTV.
You might have a scene/DVD specific issue, try a few movies before you return it. How does the rest of the movie play? For example, I regularly encode using these settings, bframes=3:ref=1:subme=5:me=umh:no-pre-skip=1:trellis=2, 2-pass, 3500 kbs, anamorphic. The videos play back fine streaming to the Apple TV. But every once and a while there will be a movie with one scene where I get stutter, usually a very involved or fast scene. I think the bitrate for these scenes just goes through the roof (even with 2-pass, set bitrate) and the Apple TV cannot cope. Lowering my bitrates down to 2500 kbs for these scenes did not help. These scenes last less than 2 minutes and are so rare I don't care about it.

Lastly, the Apple TV officially supports only CAVLAC. HB’s Main Profile encodes will use CABAC by default, which requires more processing power to decode. You could always turn CABAC off (B-frames too) if you are unable to get playable files at 2500 kbs.
cbud
Bright Spark User
Posts: 181
Joined: Thu Feb 22, 2007 2:24 am

Post by cbud »

tgavin wrote:I have been having problems as well.

I have been ripping tons of movies using visual hub's "Go Nuts" setting, which is usually around 4000kbps and have seen great results.

But after seeing HB's support for anamorphic and chapters I had to give it a try. So I encoded 4 different movies using the ATV preset and checking the 2-pass option. I then saw a thread about clicking the 2-pass option and needing a special command (secret sauce?), so I tried that too.

Well, even though HB had a smaller bitrate (and file size!), the visual hub files all played back smoothly and the HB files ran into stuttering and synching problems. I had to pause the movie and wait for it to "reset" the a/v sync.

Visual Hub is using ffmpeg - would that make a difference? I'm streaming from a G5 dual 2.0 using Airport Extreme G.
If you sync the HB file does it work better?

I have noticed that network speed (N vs G) is not the only determining factor in whether a file will stream properly. I think interference from other radio signals and physical obstructions (walls, cabinets) can impact stream-ability more.

I have no problems streaming a 3500 kbs x264 encode via an AirPort Express, but it is 10ft away from the Apple TV.
tgavin
Posts: 26
Joined: Fri May 04, 2007 3:20 pm

Post by tgavin »

No, I'm not synching, and I won't, either. I have waaay too many movies to even bother putting them on that puny HD.

The G5 and base station are only about 20ft. away and it's practically line of sight.

However, my visual hub files are playing properly - and they're almost twice as big - so it's not a streaming issue.
fwhite
Posts: 14
Joined: Tue May 01, 2007 12:35 am

Post by fwhite »

No, I don't sync either. I've tried that as well to see if it improved my situation. But this didn't help at all. I've tried every setting I could think of. The only solution is to lower the bit rate and possibly turn off 2 pass. Does anyone know if VisualHub has this problem. I've read that this one person set the bit rate at 3500 kbps without a problem. I couldn't imagine doing that on HB.
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Post by jbrjake »

tgavin wrote:Visual Hub is using ffmpeg - would that make a difference?
What exactly do you mean by this? That you're using ffmpeg's mpeg-4 part 2 encoder? Or that you're using x264 through ffmpeg? Because if it's the former...yes, that would make a huge difference.
cbud
Bright Spark User
Posts: 181
Joined: Thu Feb 22, 2007 2:24 am

Post by cbud »

fwhite wrote:...I've read that this one person set the bit rate at 3500 kbps without a problem. I couldn't imagine doing that on HB.
I do that every day.

You need to post your exact settings, then we might be able to help you. For example...

Source->Deja Vu (ripped to hard drive) (~130 min)
FPS->23.976
Codec->x264 Main Profile
Audio->DPLII, 48 khz, 160 kbs
Video->2-pass, 3500 kbs
Picture Settings->Anamorphic, Auto Crop
x264 options->bframes=3:ref=1:subme=5:me=umh:no-fast-pskip=1:trellis=2
other->chapter markers
final file size-> ~3.25 GB

I watched the above last night by streaming to my Apple TV. No playback issues. Looked amazing.
tgavin
Posts: 26
Joined: Fri May 04, 2007 3:20 pm

Post by tgavin »

jbrjake wrote:
tgavin wrote:Visual Hub is using ffmpeg - would that make a difference?
What exactly do you mean by this? That you're using ffmpeg's mpeg-4 part 2 encoder? Or that you're using x264 through ffmpeg? Because if it's the former...yes, that would make a huge difference.
I'm running a batch right now so I can't really get in and see what it is, but I'm almost positive it's the latter - H.264 through ffmpeg.
fwhite
Posts: 14
Joined: Tue May 01, 2007 12:35 am

Post by fwhite »

Here is my settings and situation.

Source->The Increadibles (ripped to Raid Firewire 800 hard drive) (~115 min) I've tried ripping straight from DVD, but still have issue.
FPS->Same as source (I've tried 23.976 with same problem)
Codec->x264 Main Profile
Audio->DPLII, 48 khz, 160 kbs
Video->2-pass, 2500 kbs (1500 kbs is best to fix the problem, but I want best quality)
Picture Settings->Anamorphic, Auto Crop
x264 options->bframes=3:ref=1:subme=5:me=umh:no-fast-pskip=1:no-dct-decimate=1:trellis=2
other->chapter markers
final file size-> ~2.15 GB

Now the scenes where I have the problem is the Disney Castle and the cat in the tree. There are probably more scenes, I just haven't watched it all the way through. There has to be alot of action on the screen to cause the slow down and audio sync problem. I've also noticed other DVD movies does the same. If you can try this and see if you have the same issue, that would be great. I just made several samples with Chapter one so it wouldn't take long to encode.

One other thing I noticed is when I turn off 2 pass and keep it at 2500 kbs (default "HB-AppleTV preset) this seems to help some. I would figure 2 pass would improve on it not make it worse.

Has anyone tried Visual Hub at a higher bitrate? Thanks again for all of your help.
fwhite
Posts: 14
Joined: Tue May 01, 2007 12:35 am

My final conclusion

Post by fwhite »

I just tested the same DVD file with Streamclip, Quicktime, and HandBrake. Here is my conclusion.

Handbrake- picture quality is good with slightly less saturated color. Anything over 1500 kbs and alot of fast motion on the screen will cause the movie to slow down and audio to go out of sync. I averaged 2200 for this test.

Streamclip- picture quality is good with slightly lesser saturation than Handbrake. There is no slowdown at 5000 kbs on fast motion. I averaged 5190 kbs for this test.

Quicktime- picture quality is terrible with lines in the movie, even less saturation than Streamclip. I averaged 2200 for this test. Used the export to AppleTV. For some reason, the clip didn't show up on the AppleTV. I had to load the clip to the AppleTV harddrive.

Not sure if the encoding has anything to do with color saturation. From my test, it shows that it doesn't. All encoding was done using H.264. I don't have VisualHub to give you any details. I will try and use the demo and save the scenes that I was testing. I hope this helps. If you want any more detail I will be glade to give it to you. I would post picture, but I'm not sure how to do that right at this moment.
SicMX
Novice
Posts: 66
Joined: Thu Mar 22, 2007 11:31 pm

Post by SicMX »

Is there anyway of knowing if a movie is 23.976fps, because i usually check from MPEG-Streamclip and they are always either 25fps or 29.97fps.
roundy

Post by roundy »

I have had this problem also. And with more movies than is possible to list here. Almost every movie will stutter, pause or go out of sync at some point.

Here are my hardware specs so you know I don't think it's a hardware problem:

AppleTV in N mode only. Movies streaming from Dual-2ghz G5, stored on a 3x300gb RAID 0 array. AppleTV hooked up to Samsung 6167 DLP TV in 1080i output mode.

I tried ripping 30 minutes of one movie (Letters From Iwo Jim) at 2000, 2100, 2200, 2300, 2400 and 2500kbps. They all "paused" at almost exactly the same spot.

All my movies are ripped using the AppleTV preset in the latest release version of HB.

Here are the tests I've done to isolate this problem:

1. Switch AppleTV/Airport to 5ghz N-only mode - no help
2. Switch AppleTV/Airport to 2.4ghz N-only mode - no help
3. Use Wired Ethernet - Better, but still some pausing/stuttering.
4. Switch AppleTV to output in 720p mode - This seems to help a lot!. My theory is that the AppleTV is a bit too underpowered to decode the H.264 and upscale it to 1080i output.

I only noticed this because I have 2 AppleTV's. 1 is hooked up to the Samsung and outputs at 1080i HD. The other is hooked up to a Vizio 42" LCD and outputs at 720p. The AppleTV hooked up to the Vizio almost never pauses or skips.

I haven't done extensive testing about my theory yet (that 720p output will "solve" this problem). I'm going to watch more movies tonight to see. But usually I can randomnly pick any movie and within the first 10 minutes I'll get some stutter/pause or sync issue. So far, I've watched a bit in 720p output and no issues.

However, this does bring up another question. My AppleTV is taking a 8xx by 4xx HB encoded h.264 file and upscaling it for 720p output. My TV then takes this 720p input and upscales it to 1080p (native resolution of the screen). What does this do the picture quality. I am very impressed with the PQ from the HB encodes (very, very little compression artifacts). And based on what little I've watched so far, the PQ seems acceptable with the 720p output. But I just wanted to put it out there and see what you guys think.

For anyone having pause/stutter/sync issues, I suggest you try this solution. I would very much like to know everyone elses experience with this problem/solution.

Or, if anyone has better ideas/solutions, I'd love to hear about them.

Thanks!

Roundy.

P.S. For whatever reason, movies encoded with the AppleTV preset will not stream to an Xbox360 using Connect360. It actually crashes the Mac it's streaming from. Wrong thread, I know, just thought I'd mention it. iPod preset encoded videos play fine.
fwhite
Posts: 14
Joined: Tue May 01, 2007 12:35 am

Post by fwhite »

I initially thought I was the only one. My output setting is 720p though and I have the issue. You must watch The Increadibles, it has the hesitation at the beginning castle scene and the cat in the tree scene. Again, I used HB at 2500kbs (default AppleTV setting). But what is really odd is when I encode using either MPEG Streamclip or VisualHub at 5000kbs, they don't hesitate at all. I was trying to get them to hesitate, that's why I tried 5000kbs (the highest spec on AppleTV). This tells me that it's the encoding process and not my hardware. It would be interesting to see if Steamclip or VisualHub at 5000kbs and AppleTV set at 1080i would cause it to hesitate. I'll try it at let you know.
SicMX
Novice
Posts: 66
Joined: Thu Mar 22, 2007 11:31 pm

Post by SicMX »

I actually get that too. Two different AppleTV cases:

1) The video stutters and the frame freezes but the audio continues. If i rewind or go back a chapter everything is fine.

2) All Office (UK) episodes show a black screen with normal audio at start, but if i restart the video everything is fine. Very wierd.
roundy

Post by roundy »

SicMX,

I've gotten the gamut of problems. Video stutters, pauses (some long enough to me to back out and resume), audio/video sync issues.

Here is another strange issue. The problems usually only happen when you start the movies, say sometime in the first 10 minutes or so. If I watch long enough, I notice that it doesn't have any problems after the first 30-60 mintues. That is, the last hour of the movie plays with no problems.

Here is another clue. These problems don't happen when using the iPod preset.

So, if it is an encoding problem, I don't think it's a problem with HB per se. It may be a problem with the advanced x264 options that occurs when you choose the AppleTV preset. I guess I'll run more test to see.

Roundy
roundy

Post by roundy »

More testing results.

I'm going to give up on this problem. I can't figure out anything that would help me get a handle on it.

We just watched:

Curious George (encoded with MediaFork, I think). 720x384 h.264, 2200kbps. no problems at all.

Raiders of the Lost Ark (encoded with HB latest version). 718x368 anamorphic h.264 2650kbps (AppleTV preset) no problems.

Beauty and the Beast (HB latest version) 706x460 anamorphic h.264 2671kbps. Froze right at opening scene right after the Walt Disney Present screen.

I'm out of guesses. There seems to be no pattern to which movies freeze and which doesn't.

My previous theory about the 720p versus 1080i doesn't seem to hold either as we watched Curious George in 720p then switched to 1080i to watch Raiders with no problems.

I tried encoding using the x264 iPod encoder, but that doesn't seem to allow you to set the Anamorphic flag so that's not going to work.

Anyway, I'm tired of all the tests and experiments. I'm just going to live with it for now. If anyone else has any ideas I'd love to hear them. I'll keep monitoring this thread for any new developments.

roundy
fwhite
Posts: 14
Joined: Tue May 01, 2007 12:35 am

Post by fwhite »

Try the Raiders of the Lost Ark at 5000kbs. I bet it will have the same problem as any movie encoded with Handbrake. No matter what movie I encode with Streamclip or VisualHub at 5000kbs, it will never have the problem. I believe it's a program issue with HB and I hope there is a fix here soon. I just love HB over the other programs, but I can't stand the slow down and audio sync.
cbud
Bright Spark User
Posts: 181
Joined: Thu Feb 22, 2007 2:24 am

Post by cbud »

fwhite wrote:Try the Raiders of the Lost Ark at 5000kbs. I bet it will have the same problem as any movie encoded with Handbrake. No matter what movie I encode with Streamclip or VisualHub at 5000kbs, it will never have the problem. I believe it's a program issue with HB and I hope there is a fix here soon. I just love HB over the other programs, but I can't stand the slow down and audio sync.
Are your MPEG Streamclip and VisualHub files encoded using CABAC? What codec are you using in MPEG Streamclip, Apple's? Have you tried turning CABAC off in Handbrake like I suggested awhile back? Handbrake produces far superior, processor hungry files.

One of the movies I get stutter in was encoded using MPEG StreamClip and an x264 codec at 3500 kbs, w/ B-Frames, and CABAC, there was no audio sync problems, just stutter and it was due to the particulars in this one scene, lots of little confetti fluttering around.

There will be no fix soon; there is nothing wrong with HB. But, I have Incredibles in my queue, I will watch it tonight. That scene you are talking about is perfect for stutter, all those leaves shaking about.
SicMX
Novice
Posts: 66
Joined: Thu Mar 22, 2007 11:31 pm

Post by SicMX »

I noticed some stuttering in a 12 Monkeys rip i did. The audio goes out of sync and the video stutters. Always happens in the same place...wierd
roundy

Post by roundy »

Ok,

Did a couple of other small test before calling it a night yesterday. I thought that perhaps one of the special x.264 settings in the AppleTV preset was causing the problem, but it turned out not to be the case.

Encoded first 6 chapters of Beauty and the Beast at a straight 2500kbps using the Main Profile (did NOT use AppleTV preset). Still paused at the same spot (right after the Walt Disney Pictures Presents).

I really want to try encoding anything at 5000kbps for a couple of reasons

1). At that bitrate file sizes would be huge and one of the main reasons I want to use h.264 encoding is to maintain small-ish file sizes. Before MediaFork, I was using HB 0.71 and encoding in standard mpeg-4 mode. Some quick testing showed that for 640x480 videos for iPod play, 2000kbps mpeg-4 about equaled 1500kbps h.264 in terms of picture quality. So, if I did reencode at anything >2500kbps, I might as well use mpeg-4 and save myself all this headache.

2) At least in HB, using h.264 allows neat things like the chapter embedding and anamorphic mode. Not sure if this holds true for a mpeg-4 encoding.

Anyway, the most frustrating part of this is that the problem is nto consistent. I can watch the same move over and over again on the same or different days and I may or may not see any problems.

I'll try Streamclip and VisualHub, but they don't produce as good a picture as HB does, IMO. Also, they don't have options like chapters, anamorphic or Dolby Pro Logic II encoding. btw, VisualHub couldn't encode Beauty and the Beast straight from the DVD.

Enough for now,

roundy
cbud
Bright Spark User
Posts: 181
Joined: Thu Feb 22, 2007 2:24 am

Post by cbud »

Watched an hour of The Incredibles (x264, 3500 kbs) last night. I had stutter at the Cat in Tree scene, but the audio never stopped or went of sync, the scene was only 10 sec and the ATV recovered gracefully and kept on playing. It happened with a synced or a steamed file and is consistently there. Also, while streaming the video, it would pause for a second at some chapter breaks while the audio would continue, but the video would quickly jump ahead and resync with the audio. The synched file did not have this problem. In my opinion, the video was still watchable and I won't be re-encoding it.

I am hopeful that the ATV will only become better at playing video and these issues won't be around for ever.
Post Reply