VideoHelp Forum
+ Reply to Thread
Results 1 to 16 of 16
Thread
  1. Member
    Join Date: May 2007
    Location: United States
    Search Comp PM
    Hi,

    I've been backing up my DVDs for years, and never have I seen such excellent results as with ffmpegX's "H264 [.MP4] (mencoder)" preset. Thanks!

    I have an A/V sync problem which has been duplicated in other forum posts, but never seemed to be resolved. When I use ffmpegX to encode NTSC film (23.97 fps) to h.264/aac .mp4's, audio ends up lagging by about 1 second by the end of the film. I am aware that when mencoder encodes duplicate frames into the h.264 video stream, this problem occurs, but I hoped there was a way to fix it, besides using QuickTime Pro to cut and paste. 8) Prior to encode, I use MacTheRipper's (version 3.0 R14d) "Title - Chapter Extraction" feature to rip & merge the contents of my DVD to a single .vob file.

    Thanks,
    -Jabroni5
    System specs: Mac Pro, 2 x 2.66 GHz Dual-Core Intel Xeon, 2 GB 667 MHz DDR2 FB-DIMM
    "Grab my arm. ...the other arm. ....MY other arm!" -Rex Kwon Do, Napoleon Dynamite
    Quote Quote  
  2. Member
    Join Date: Aug 2005
    Location: Palo Alto, California USA
    Search Comp PM
    I'm hoping that others will describe a simple solution. Barring that, what I've done to take care of this is to process the audio through Audacity, using the "Change Tempo" tool to stretch the audio as needed. Of course, this only solves the problem if the sync drifts at a constant rate. If the drift deviates significantly from a constant rate behavior, there will still be potentially annoying sync errors at various points.
    Quote Quote  
  3. Member
    Join Date: May 2007
    Location: United States
    Search Comp PM
    tomlee59:
    Audacity IS a keen program. You may wanna' try Quicktime Pro's "Add to Selection & Scale" feature, as well. Like you said, however, this technique requires that the audio sync drifts at a near constant rate, and only seems to be a solution for me in a minority of cases.

    I would drop this thread on other forums as well, but I don't know of any other mencoder h.264 encoder GUIs for OS X besides ffmpegX.

    Does anyone reading this thread care to recommend a starter guide for encoding with mencoder from the OS X Terminal prompt, or is such an undertaking too ambitious for a non-programmer (albeit technically savvy) type?
    System specs: Mac Pro, 2 x 2.66 GHz Dual-Core Intel Xeon, 2 GB 667 MHz DDR2 FB-DIMM
    "Grab my arm. ...the other arm. ....MY other arm!" -Rex Kwon Do, Napoleon Dynamite
    Quote Quote  
  4. Member
    Join Date: Aug 2005
    Location: Palo Alto, California USA
    Search Comp PM
    Yes, QT Pro is a good choice, too. I tend to cite freeware/shareware first when giving advice, because when I don't, the inevitable followup question is "Is there a free way to do this?"

    Good luck on finding a clean solution to your problem. I'm very interested in it myself!
    Quote Quote  
  5. Member
    Join Date: May 2007
    Location: Sweden
    Search Comp PM
    How do rip and merge to a single file vob in mactheripper i have version 2.6 ?

    Tx

    Fegge
    Quote Quote  
  6. Explorer Case's Avatar
    Join Date: Feb 2004
    Location: Middle Earth
    Search Comp PM
    Originally Posted by fegge
    How do rip and merge to a single file vob in mactheripper i have version 2.6 ?
    See topic #328390.
    Quote Quote  
  7. Member
    Join Date: May 2007
    Location: Sweden
    Search Comp PM
    Tx case .-)

    But if you already have a video ts mapp on your drive and want to make a single wob file how do you make that?




    Fegge
    Quote Quote  
  8. Member
    Join Date: May 2007
    Location: United States
    Search Comp PM
    Update to my original issue...

    OK, given my prior situation (23.97 fps NTSC film, encode via. ffmpegX's mencoder preset to h.264 AVC, audio to video sync drifts to approx. 1 sec. behind by end of film), i tried a new tack.

    Instead of loading a single, concatenated .VOB into ffmpegX, I tried loading an elementary MPEG-2 stream file, an .m2v ripped from the same DVD by MacTheRipper 3.0 R14d. But first, since it's film (24 fps, not 30 progressive NTSC), I used ffmpegX's "Select .m2v file in NTSC FILM format to add 3:2 pulldown flags to it" function on it. This seemed to work fine. Next, I loaded the newly flagged .m2v into ffmpegX, and ran the "H264 [.MP4] (mencoder)" preset. Then I waited for the encode...

    I'd love to tell you that when it was finished, I opened up Quicktime Pro, muxed my new mencoder video .mp4, and a previously decoded .AC3-->.aac soundtrack, and that the A/V sync was spot on, but I didn't get that far. Instead, ffmpegX's "Process Information" reported that it could not add the new h.264 video, that it had just successfully created, to an .mp4 container, because, "error: movie contains no audio tracks!"

    Yah. So what am I missing here? QuickTime can export JUST .aac audio, or JUST h.264 video to an .mp4 container, so why can't ffmpegX? Mencoder completes its h.264 video encode task just fine, but ffmpegX's process seems to require an audio track (which, of course, an .m2v does not contain), before it can write the video to an .mp4 container. Argh. I should also mention that I DID un-check the "Encode audio" checkbox, on the "Audio" tab in ffmpegX, before starting the encode. I should have thought that would bypass the audio stream requirement...

    It should also be noted that I CAN open & play the intermediate video file created by the encode process (w/ extension ".264"), using Video Lan Client -- which confirms that the video encode was a success -- but QuickTime, of course, will not open it because it's not in a recognizable format.

    So, that's my status. Is there any way to encode an .m2v elementary MPEG-2 video stream, using ffmpegX's "H264 [.MP4] (mencoder)" preset, to a video-only .mp4 container, or does ffmpegX absoLUTELY require an audio stream as well, for .mp4 encapsulation, and if so, is there a work-around?

    YET ANOTHER NOTE: I DID attempt to open the soundtrack file (first as a Dolby .AC3, then as an .aiff) using the "Add audio" button on the "Audio" tab, in ffmpegX before starting the encode, but in each case I received the same error message as without.

    Yes, programs like HandBrake or MPEG Streamclip DO work just fine in many cases, just not all.

    Yes, I've resisted installing Unix/Linux or Windows on my Mac Pro -- maybe it's time.

    Thanks to any, and all, who can help!

    Cheers,
    -Jabroni5
    System specs: Mac Pro, 2 x 2.66 GHz Dual-Core Intel Xeon, 2 GB 667 MHz DDR2 FB-DIMM
    "Grab my arm. ...the other arm. ....MY other arm!" -Rex Kwon Do, Napoleon Dynamite
    Quote Quote  
  9. Member
    Join Date: May 2007
    Location: United States
    Search Comp PM
    Fegge:
    You can merge a set of ~1GB .VOB's from a VIDEO_TS folder into a single .VOB using a nifty program called DVDxDV. It's shareware, so you have to register after 30 days, but it seems to be fully functional until then.

    http://www.dvdxdv.com/
    Quote Quote  
  10. Member
    Join Date: May 2007
    Location: United States
    Search Comp PM
    Fegge:
    Option 2: MacTheRipper 2.66 reads mounted disc images in OS X. If you create a DVD image (.img file) out of your VIDEO_TS folder using the freeware, DVD Imager, you can mount that image, then re-rip its contents to a single .VOB file.

    Download DVD Imager from:
    http://www.versiontracker.com/dyn/moreinfo/macosx/19456
    Quote Quote  
  11. Member
    Join Date: May 2007
    Location: United States
    Search Comp PM
    Another update...

    (I realize that I'm dominating my own topic, but I remain optimistic that it will eventually click.)

    I discovered that if I use ffmpegX's "H264 [.MP4] (x264)" preset, instead of "H264 [.MP4] (mencoder)", that an .m2v video is encoded directly to an .mp4 container (openable in QuickTime), even if no audio file is provided.

    That being said, the h.264 video quality produced by x264 on this NTSC film MPEG-2 stream (and on ONE other similar stream that I tried as well, to check for consistency) is unsatisfactory. The resulting .mp4 has perceptibly choppy video, and the overall movie length is approx. 4 minutes less than the target length (measured by the length of the soundtrack file). It would seem that x264 isn't just deleting duplicate frames, but other frames as well, would be my guess -- as an aside, would this have something to do with the 3:2 pulldown flags that I added? VideoHelp.com's pop-up definition window states that it's more often appropriate to use 2:3 pulldown flags, instead of 3:2. Does ffmpegX add 2:3 pulldown flags to NTSC film automatically, while 3:2 should be used only as last ditch effort, and very infrequently at that? More guessing on my part... (THANK YOU, THANK YOU to anyone who has an answer to THIS question, specifically)

    During the x264 encode, ffmpegX's "Process Information" window reports first an error, then a correction repeatedly. Also, at different times throughout the encode, it reports two different errors:

    First error report:
    [mpeg2video @ 0x54340c]invalid mb type in P Frame at 44 29
    [mpeg2video @ 0x54340c]concealing 45 DC, 45 AC, 45 MV errors
    Second error report:
    [mpeg2video @ 0x54340c]ac-tex damaged at 44 29
    [mpeg2video @ 0x54340c]concealing 45 DC, 45 AC, 45 MV errors
    As before, ffmpegX's "H264 [.MP4] (mencoder)" preset on the same file(s) produces nearly length-accurate results without any perceptible choppiness, but I can't find a way to use an .m2v file (corrected by adding 3:2 pulldown flags to it) as a source file, since mencoder reports, at the end of its encode process, that it needs an audio stream to successfully output to an .mp4 container, and I need the .mp4 container for the file to be readable by QuickTime (see above post, May 19 @ 2:07 pm, for details).

    -Jabroni5
    Quote Quote  
  12. Member
    Join Date: May 2007
    Location: United States
    Search Comp PM
    OK, so much for a "clean" A/V sync -- I've relegated myself to scaling the audio to compensate for ~1 second misalignment for now *sigh* -- Thanks anyway to all those who read/contributed to this post.

    Cheers,
    -Jabroni5
    System specs: Mac Pro, 2 x 2.66 GHz Dual-Core Intel Xeon, 2 GB 667 MHz DDR2 FB-DIMM
    "Grab my arm. ...the other arm. ....MY other arm!" -Rex Kwon Do, Napoleon Dynamite
    Quote Quote  
  13. Explorer Case's Avatar
    Join Date: Feb 2004
    Location: Middle Earth
    Search Comp PM
    Originally Posted by jabroni5
    as an aside, would this have something to do with the 3:2 pulldown flags that I added? VideoHelp.com's pop-up definition window states that it's more often appropriate to use 2:3 pulldown flags, instead of 3:2. Does ffmpegX add 2:3 pulldown flags to NTSC film automatically, while 3:2 should be used only as last ditch effort, and very infrequently at that? More guessing on my part...
    As you are making an .mp4 file, there is no reason to add a pulldown to the MPEG video file. The only reason to add a pulldown is to make MPEG players handle progressive 23.976 fps NTSC Film content as if it were interlaced 29.97 fps NTSC content, so that tv sets can handle the signal better. It has no use in this conversion. Just convert from 23.976 fps to 23.976 fps.
    3:2 pulldown is the same as 2:3 pulldown, it just has a different starting point: AAABBCCCDD vs. EEFFFGGHHH. And often '3:2 pulldown' is said when it actually is '2:3 pulldown'. I would be very surprised if ffmpegX sometimes used one, sometimes the other.

    Your sync issues may be specific to your source file, without a generic solution. E.g. errors in the file that are not obvious on playback, but encoders have to convert everything and may trip over it.
    If you have the QT MPEG-2 Playback Component, you might try x264 with Decode with Quicktime, as it is yet another way to process your file, which may lead to different results. No guaranties, but QuickTime has been kind on the sync on some of my clips in the past.
    Quote Quote  
  14. Member
    Join Date: May 2007
    Location: United States
    Search Comp PM
    Thanks Case, I appreciate it.

    I did some more tests, and realized that most of the problems that I encountered using ffmpegX's mencoder are non-existent using x264, so x264 it is. Realistically, the improved quality that I initially observed when using mencoder vs. x264 to encode H.264 really is negligible, so be it. Thanks

    -Jabroni5
    System specs: Mac Pro, 2 x 2.66 GHz Dual-Core Intel Xeon, 2 GB 667 MHz DDR2 FB-DIMM
    "Grab my arm. ...the other arm. ....MY other arm!" -Rex Kwon Do, Napoleon Dynamite
    Quote Quote  
  15. Hi,

    May I suggest to use SimpleMovieX?
    It can resynchronize audio, not only by a constant rate, but you can divide the movie into segments and resynchronize each of them independently.

    How to do it? Use Audio Pane, move backwards and forwards with arrows. Divide your movies into chapters to resynchronize by segment.

    After that, you can save the result back to MPEG4 container. It also works with AVI container.

    http://www.aeroquartet.com/SimpleMovieX/
    Quote Quote  
  16. Member
    Join Date: May 2007
    Location: United States
    Search Comp PM
    true, true

    i DO like that program a lot. i tried it out and didn't consider that approach. i like SimpleMovieX's export to single VOB feature, too.
    Quote Quote  



Similar Threads