VideoHelp Forum
+ Reply to Thread
Results 1 to 18 of 18
Thread
  1. Member
    Join Date
    Jun 2005
    Location
    england
    Search Comp PM
    Hello,
    I could really do with some help. I'm trying to convert an avi file (divx avi mpeg4 / ac3) to dvd but can't get it right.

    The file plays perfectly in qt, but the framerate isn't constant (~23 fps to 24) When I drop the file in the summary window in ffmpeg it shows the rate to be 23.98 I encoded first time in ffmpeg like this...

    DVD mpeg2enc - NTSC 23.976 - AC3 - decode with quicktime - 3:2 pulldown

    This results in frame drops every second or so when watched in both apple dvd player (from the video ts file) and the burnt dvd on my home player (toshiba 210e). The picture itself is fantastic, but the audio from time to time is out of sync ever so slightly. These frame drops gave me a headache. After seeing a post in this forum about frame drops, I encoded like this...

    DVD mpeg2enc - NTSC 23.976 - AC3 - decode with mplayer / no frame drop - once with 3:2 pulldown enabled and once without

    Both results played perfect in apple dvdplayer - completely in sync with audio - but in my home player the video plays for a second then stalls, then plays then stalls while the audio carries on as if nothing is wrong! All of the ten minute test I did is like that. After searching thru almost every post in the ffmpeg and mac forums for clues I tried no end of combinations in ffmpeg, including constant bitrate, gop headers, closed gops, undo 3:2, interlace frame/field - but i get the same problems.

    import with qt = frame drops and audio slightly out of sync in both appledvd and the tosh
    import with mplayer = perfect in appledvd, but the video stalls and starts in my home player.

    I've tested with different media with the same results, used export in QT to try and stabilise the movie before I go to ffmpeg, even tried converting to PAL in JES deinterlacer (which looked blurry and gave me another headache) When I saw another post, I tried Divx doctor which prossessed it but couldn't find the movie!

    Is there something I can do to get this right? I love ffmpeg and want to use it to get this to DVD, so maybe there's someone out there who's got a solution to either fix it in ffmpeg, or to stabilise the movie at 23.967 before I encode it.

    Thanks!
    Quote Quote  
  2. Member
    Join Date
    May 2005
    Location
    El Paso, TX
    Search Comp PM
    I'm no expert with these tools either, but I do recognize the symptoms. The sequence that yields the best results is this:

    1) Drop the AVI file on ffmpegX or use its open button.

    2) Choose one of the DVD presets in the "To" box. Personally, I find best results using DVD ffmpeg.

    3) Click the video button and on that panel, change "Autosize" to DVD or DVD 16:9, whichever is appropriate for your avi file.

    4) Choose the correct media in the Bitrate calculator, e.g., 1 disc of DVD - showing a 4000MB disc size.

    5) Click the "Best" button in the bitrate calculator. It should drop the displayed Video Bitrate down below 2000, usually in the 1200~1900 range.

    6) Click the ENCODE button. Do not mess with the audio settings. If you know what you're doing, you may want to go to options first and check "High Quality," "Two-pass encoding," and "Trellis quantization." You may also check Decode with QT *IF* you can play the AVI without problems with quicktime. And the Letterbox may be checked if quicktime plays the AVI and the AVI is a 16:9 ratio.

    Even when following these steps, I still get a video that "halts" during scenes where each frame is extremely different from previous, like smoke and explosions. I have not yet found a solution to this problem, but I think QMin in options needs to be reduced.
    --R. Bear Helms, El Paso TX
    Quote Quote  
  3. Originally Posted by bearhelms
    Even when following these steps, I still get a video that "halts" during scenes where each frame is extremely different from previous, like smoke and explosions. I have not yet found a solution to this problem, but I think QMin in options needs to be reduced.
    Yours is the first comment I've read about this problem, bearhelms, so I wanted to comment. I've experienced the same stuttering "halts" during playback of an ffmpeg-encoded DVD when the scene changes dramatically. In my case, there was a long telephoto shot of someone standing at a crosswalk. When a bus passed in front, filling the screen, the video & audio started stuttering.
    Quote Quote  
  4. Member
    Join Date
    May 2005
    Location
    El Paso, TX
    Search Comp PM
    I think it safe to conclude that ffmpeg cannot cope well with any sequence of 3 or more frames significantly different from one another. I believe if we lower the Qmin to 1, it will simply "crudify" (make blocky) the offending frames, and since usually the sequence is only about 6 frames long until it can resynch, this means having occasional blurs in the product DVD that last only a split second, which considering how much data reduction is being involved, may be a small price to pay.

    Ideally, we'd like a 2-pass system that makes notes of its inability to maintain frame rate or bitrate constraints and automatically throttle whatever it needs to stay compliant.

    I can't make heads or tails out of the open source, and definitely lack the skills and knowledge to say what should be done to ffmpeg - I'm impressed with all that it can do today, just wish it were a bit handier for personal video transfer/translation projects (especially to DVD).
    --R. Bear Helms, El Paso TX
    Quote Quote  
  5. bearhelms, I don't understand the complexities of Qmin & Qmax enough to even comment. I don't watch many action sequences, so for my needs I still accept the trade-off between ffmpeg's rapid encoding times and the occasional stutters. Thanks for your comments!
    Quote Quote  
  6. Member
    Join Date
    May 2005
    Location
    El Paso, TX
    Search Comp PM
    The documentation for ffmpegX advises against dropping Qmin to a setting of 1. What I am doing is lowering Qmax alone and seeing how it affects the final DVD. It may be a solution for DVDs that come out with occasional playback pauses.

    Open source software is almost always undergoing refinements, so some extreme solutions (like me fitting 2:13:50 worth of AVI onto a single layer DVD) might be something they didn't plan for. However I am a bit surprised the 2-pass system still lets problem spots like this through. It seems as if certain problems are not communicated from pass 1 to pass 2 that maybe should be.

    Qmin and Qmax define the "blocky-ness" floor and ceiling for converting video. Basically, as the overall Q diminishes, more of the original video data becomes blurred or blocky. When you have a big spread like from 2~20 in these values, the encoder has freedom to encode the best quality frame it can between these lower and upper limits of detail, while striving to conform to a constant bitrate.

    When Qmin and Qmax are identical, it forces the encoder to vary the bitrate to achieve that end quality - maintaining a given FPS. I sincerely doubt most garden-variety DVD players cope with variable bitrate data.
    --R. Bear Helms, El Paso TX
    Quote Quote  
  7. Member
    Join Date
    Jun 2005
    Location
    england
    Search Comp PM
    Thanks very much for the reply, but alas, it didn't work. Exactly the same thing happened.
    I've read and read, tried and tried but the only solution was to encode with mplayer with no frame drop enabled, but that wouldn't play on my home player - I wonder why? There must be a small link in the chain I'm missing...
    I going to encode with mplayer again to get a stable file - it seems to work - then try to re-encode that file thru ffmpeg so I can get files that'll work in my home player.

    I don't know enough about video encoding or programming, but it would be great if the movie could be re-sequenced to include all frames at a standard frame rate and the audio automatically stretched to fit. Sounds easy but I'm sure it isn't! Maybe I've spent to long sequencing music, after the past few weeks it seems video's a whole other ball game.

    This movie has become an obsession and I'm going to solve this - I'm not gonna let it beat me!
    nnnnnarrrrrgh!!
    Unless of course someone else beats it for me.
    Quote Quote  
  8. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    Originally Posted by bearhelms
    I sincerely doubt most garden-variety DVD players cope with variable bitrate data.
    Please explain. It seems most commercial DVDs have a rather variable bitrate.

    Quote Quote  
  9. Member
    Join Date
    May 2005
    Location
    El Paso, TX
    Search Comp PM
    I have a $40 DVD player and when I use VBR on audio, I get dropouts in the sound regularly. The video content was CBR. Maybe I should attempt a DVD encoding using VBR everywhere and see how I fare.

    However, I'd say finding a particular spot in a VBR datastream (say, 5 minute jumps) cannot be calculated, whereas with CBR, finding a specific minuteecond is just a matter of multiplying the position by the bitrate and seeking forward to that spot in the VOB.
    --R. Bear Helms, El Paso TX
    Quote Quote  
  10. Originally Posted by bearhelms
    Qmin and Qmax define the "blocky-ness" floor and ceiling for converting video. Basically, as the overall Q diminishes, more of the original video data becomes blurred or blocky. When you have a big spread like from 2~20 in these values, the encoder has freedom to encode the best quality frame it can between these lower and upper limits of detail, while striving to conform to a constant bitrate.
    If I understand what you're saying, then for better quality I'd want to change Qmin to a higher value? I just re-read the "Options" tab description on Major's site <http://homepage.mac.com/major4/options.html> and it appears to imply the opposite, e.g.,

    "The quantizer is the compression level used to encode a frame."
    Qmin sets the minimum quantizer
    Qmax sets the maximum quantizer

    From this I'd surmised that greater Q values = greater compression = lower quality/more blockiness, although I've never touched the Q values. Whichever the case, this could help with the problem I'm seeing with blockiness in large areas of solid color like walls & doors.

    I wonder if the bitrate calculator considers this setting? Now I'm wondering if changing the Q value would have a bigger impact on my blocky walls than increasing the bitrate. Thanks for a thought-provoking post.
    Quote Quote  
  11. Member
    Join Date
    May 2005
    Location
    El Paso, TX
    Search Comp PM
    You may be right, especially based on the evidence I've gathered thus far. It seems I misinterpreted the information, but through trial and error, I can state that dropping Qmax didn't do much for me - which makes sense when Qmin was set to such a "high quality" value of 2.

    That said, I can't see how the bitrate calculator could accurately guess what BPS rate would apply to Qmin/Qmax spread without knowing aforehand just what the content of the video is over its entire playback range.

    It seems to me that bitrate takes into account a statistical mean BPS content for video given its dimensions, framerate, and audio content. I believe it's exactly because it is ignorant of problem spots in the video that it comes up with a figure that is inadequate in situations like several sequential frames being chiefly different from one another.

    I'm attempting to encode my video using a commercial product to see if it copes better with my problem spots.

    My next experiment therefore should be raising Qmax to 25 or even 31, to give the encoder the maximum leeway in coping with extremely difficult frames.
    --R. Bear Helms, El Paso TX
    Quote Quote  
  12. Originally Posted by bearhelms
    That said, I can't see how the bitrate calculator could accurately guess what BPS rate would apply to Qmin/Qmax spread without knowing aforehand just what the content of the video is over its entire playback range.

    It seems to me that bitrate takes into account a statistical mean BPS content for video given its dimensions, framerate, and audio content.
    Those are my thoughts, too. If lower Q values improve quality, changing Qmin from 2 to 1 shouldn't make a big difference in file size.

    I'd be very interested to hear your results increasing Qmax.
    Quote Quote  
  13. Member
    Join Date
    May 2005
    Location
    El Paso, TX
    Search Comp PM
    I have an update regarding using commercial software (I define commercial as try and buy in excess of $20 fee). Xray after chewing for 5+ hours on the same AVI file that ffmpegX can convert to DVD in about 4 hours STILL wasn't ready to do anything. It kept spinning the Mac beachball (I have a Mac Mini 1gb RAM, 1.5Ghz CPU). I don't find it very professional to create delays that long without letting the user see a progress bar, so Xray is not recommended for Mac DVD video processing.

    I've tried iMovie but it tends to import video like this same file and take upwards of 10 hours to be ready. Then you have to send it to iDVD which is more delay, and by the time you're ready to burn a DVD, you have 20gb in temp files remaining open until you finish. So despite what snags we're seeing in these open source based tools, we actually are using some of the better performing software out there regardless of price.
    --R. Bear Helms, El Paso TX
    Quote Quote  
  14. Thanks for the info, bearhelms. It helps curb my lusting for more expensive stuff.
    Quote Quote  
  15. Member
    Join Date
    Jun 2005
    Location
    england
    Search Comp PM
    Erm, for anybody who might be interested in the frame drop problem I think I might have found a solution.

    It's more of a compromise, but anyway, I went back to JES De-interlacer and chose custom stadards conversion, progressive in and out (it's a sharper image) and coverted the shoddy ntsc to pal, which meant all frames were reproduced and none were dropped. The only drawback was that there was a very slight blurring in movement - the pal conversion mixes some of the frames (I don't know the proper term) but I find that much less objectionable than dropped frames.
    To be honest, it smoothed out the movie and I think the results are better than the original avi because of that.

    This made encoding with ffmpeg easy. There's no need to worry about pulldown or anything. There were no warnings about nstc/pal framerate confusions and it spun thru the movie like a dream and the audio is completely in sync.

    I haven't exactly beaten the problem, but I think it's a draw.
    I'll keep an eye on this thread to see if someone comes up with anything better...

    Thaks for all the info
    Quote Quote  
  16. Member
    Join Date
    May 2005
    Location
    El Paso, TX
    Search Comp PM
    My AVI is already 3:2 pulled-down from film, now in an NTSC 23.976 FPS format. Raising the Qmax from 16 (or 20) to 25 didn't help - I got an output product with stuttering soundtrack. I am running out of ideas as to what else may help.
    --R. Bear Helms, El Paso TX
    Quote Quote  
  17. Sorry I have no advice for you, mahimahi. The original AVI may have been poorly authored, and if so then work-arounds like yours may be the only solution.

    bearhelms: I went the opposite route & lowered Qmin from 2 to 1, then threw 50% more bps at the problem by raising the bitrate from 4000k to 6000k. There were two noticeable results. First, overall picture quality improved and solid colored surfaces like walls were much less blocky. Second, I didn't see any stutters, but I wasn't encoding the same problematic scene but rather a close-up of a hand dropping confetti-like paper against a churning white boat propeller wake. I have a number of videos queued for processing now, and don't know if I'll try reprocessing the problem scene. More likely I'll look for similar scenes in my current output & watch for the stutters.

    I haven't watched the entire MPEG to see if setting Qmin = 1 had other detrimental effects, but I spot-checked it in VLC by dragging the scrubber to different parts to check for audio/video sync and found no problems. I'll be pretty tied up this weekend, so I probably won't have much to report.
    Quote Quote  
  18. Member
    Join Date
    May 2005
    Location
    El Paso, TX
    Search Comp PM
    My resultant AVIs always play very nicely on a computer, but when burned to DVD and stuck inside a $40 player, I've had lots of problems. Changing Qmin to 1 didn't help the stop-and-go video playback, but I kept the bitrate at what BEST computed.

    I'm currently converting to MOV format and changing the audio from AC3 to AAC. That intermediate result I'm going to use as a test for encoding to DVD using Quicktime to decode instead of ffmpegX or Mplayer.
    --R. Bear Helms, El Paso TX
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!