I also had problems with the widely described rebuffering issues during playback or seek in the 51+ minute range, typically 23.97 mp4 generated by handbrake + ffmpeg.
Solution A: Ensure audio sync with a final clean-up pass:
[[ $MIN -gt 50 || $FPS -eq 23.97 ]] &&\
ffmpeg -i $SOURCE.mp4 -acodec copy -vcodec copy $TARGET.$$ &&\
mv $TARGET.$$ $SOURCE.mp4
Also tried MP4box interleave which worked in some but not all cases. Reference:
http://forums.roku.com/viewtopic.php?f=34&t=24725&p=210908#p210908Solution B: Verify frame rate using a pre-encode scan at +10 minutes:
SCAN=`mplayer -endpos 1 -ss 600 -vo null -ao null dvd://$TITLE -dvd-device $SOURCE 2>&1 |\
awk '/^demux/{ LOC=index($2,"fps"); if(LOC!=""){print substr($2,1,LOC-1) };}'`
[ "$SCAN" != "" ] && FPS=`echo "scale=2;$SCAN" | bc -q`
Most tools seem to not sample at a sufficient depth or duration to accurately determine frame rate, esp. for NTSC film source.
Since integrating A and B, zero rebuffers (even the 2001 KOYAANISQATSI DVD made it :), and both are many times faster than encode itself.