VideoHelp Forum




+ Reply to Thread
Page 6 of 40
FirstFirst ... 4 5 6 7 8 16 ... LastLast
Results 151 to 180 of 1190
  1. Member JNavas's Avatar
    Join Date
    May 2005
    Location
    San Francisco Bay Area
    Search Comp PM
    Originally Posted by Chris K
    FFmpeg isn't able to handle multi-channel sources. You can disable "video" and copy (demux) the audio to a separate stream. Then FFmpeg leaves the channels untouched.
    You then can load the "mux" template and remux the demuxed audio and re-encoded video back into a mpg container.
    That's a lot of work and hassle. What's your objection to simply selecting the desired channels in AviSynth (as I've suggested)?
    ~John
    Quote Quote  
  2. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by JNavas
    Originally Posted by Chris K
    FFmpeg isn't able to handle multi-channel sources. You can disable "video" and copy (demux) the audio to a separate stream. Then FFmpeg leaves the channels untouched.
    You then can load the "mux" template and remux the demuxed audio and re-encoded video back into a mpg container.
    That's a lot of work and hassle. What's your objection to simply selecting the desired channels in AviSynth (as I've suggested)?
    ~John
    Yes you're right! I was working on a better solution with Avanti according to your suggestions.

    Here it is...

    1. Make your video settings including the subtitle option.
    2. make your audio settings (probably ac3, bitrate 448, 2 channels for Kevin).
    3. Set the Avisynth mode to USER and go to the editor.
    4. Copy the Avanti AUTO script to the editor (choose with variables).
    5. Add the Avisynth audio mapping to the script (test it with preview).
    6. Disable the subtitle option at the subtitle page.
    7. Go to the main page and start process.
    8. (optional) save the setup in a template for later reference.

    The script including additions would look like:

    V=DirectShowSource("@source1_path")
    A=V
    V=TextSub(V, "path to your subtitle", 0 )
    A=GetChannel(A, 1, 3) # gets front left and right ac3 channels.
    V=AudioDub(V,A)
    @preview V=ConvertToRGB(V)
    V # output

    Note that Avanti uses the A and V variables where the Avisynth examples use Audio and Video.

    Also note that... V=TextSub(V, "path to your subtitle", 0 ) in the next Avanti version can be
    given as... V=TextSub(V, "@subtitle_path", 0 ) which will refer to the path at the subtitle page.

    This will make the script "template proof".
    Quote Quote  
  3. Member JNavas's Avatar
    Join Date
    May 2005
    Location
    San Francisco Bay Area
    Search Comp PM
    Originally Posted by Chris K
    The script including additions would look like:
    Code:
    V=DirectShowSource("@source1_path")
    A = V
    V=TextSub(V, "path to your subtitle", 0 )
    A =GetChannel(A, 1, 3) # gets front left and right ac3 channels.
    V = AudioDub(V,A)
    @preview V=ConvertToRGB(V)
    V # output
    Note that Avanti uses the A and V variables where the Avisynth examples use Audio and Video.
    Good.
    FYI, Avanti requirements aside, AudioDub is not necessary (likewise variables) -- just GetChannel; i.e.,

    Code:
    DirectShowSource("@source1_path")
    GetChannel(1, 3) # gets front left and right ac3 channels
    TextSub("path to your subtitle")
    John
    Quote Quote  
  4. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by JNavas
    FYI, Avanti requirements aside, AudioDub is not necessary (likewise variables) -- just GetChannel; i.e.,
    Yes, there still can be a lot of typing saved

    My example then would become...

    4. Copy the Avanti AUTO script to the editor (choose without variables).

    Code:
    DirectShowSource("@source1_path")
    TextSub("path to your subtitle", 0 )
    GetChannels(1, 3) 
    @preview ConvertToRGB()
    Thanks,
    Chris.
    Quote Quote  
  5. Member KevinSartori's Avatar
    Join Date
    Feb 2009
    Location
    United States
    Search Comp PM
    Hey, Chris and John.

    I was finally able to get my video converted with burned in subs, maintaining the proper 5.1 sound. In case you're curious how I did it, here's the method I used:

    1. Used MKVExtractGUI to extract the AC3 sound and SRT subtitles. [7m]
    2. Used Avanti to convert the video to mpeg2 M2V with burned in subtitles. [62m]
    3. Because the TiVo HD can only handle AC3 sound up to 448kbps, I used BeSweet to transcode the 640kbps 5.1 AC3 sound to 448kbps 5.1 AC3 sound. [15m]
    4. Finally, I used Avanti's mux template to join the M2V and AC3 files into an MPG container. [6m]

    I ran steps two and three at the same time, so it took about an hour and fifteen minutes to convert a two-hour MKV with soft subs to an MPG with hard subs for playback on my TiVo HD. Not bad!

    Thanks again for the help guys, I never would have figured out the more subtle features of Avati without it! It really is a useful bit of programming!
    Quote Quote  
  6. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by KevinSartori
    I ran steps two and three at the same time, so it took about an hour and fifteen minutes to convert a two-hour MKV with soft subs to an MPG with hard subs for playback on my TiVo HD. Not bad
    Nice workflow to retain all 5.1 channels and fast indeed.
    Would take me at least 4-5 hours on my old single core Athlon.

    Cheers,
    Chris.
    Quote Quote  
  7. Suggestions:
    * If user clear the checkbox "Enable" in audio & video settings group, the fields inside group should be disabled(grayed) and vice versa.
    * Almost same as above, If user choose choose "Copy Audio/Video" from combobox "Codec", the some fields should be disabled. If you don't understand what I mean, you can look at SUPER by checking "Stream Copy" and "Disable Audio/Video".
    * Add hint tooltips.
    * Add support for MEncoder.

    In "Audio Settings" group, why there is no value "Source" in the combobox "Bitrate", "Sample Frequency", and "Channels"?

    KUTGW (Keep up the good work).
    Quote Quote  
  8. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Hi ohboy888,

    Thanks for your suggestions.

    * If user clear the checkbox "Enable" in audio & video settings group, the fields inside group should be disabled(grayed) and vice versa.
    * Almost same as above, If user choose choose "Copy Audio/Video" from combobox "Codec", the some fields should be disabled. If you don't understand what I mean, you can look at SUPER by checking "Stream Copy" and "Disable Audio/Video".
    I would do that if there wasn't a restriction in the language interpreter Avanti runs on. Gray-out works for textin fields but not for combo boxes. They only lock when disabled. Perhaps I'll find another way to indicate the whole section is disabled. I'll think about it.

    * Add hint tooltips.
    I have chosen for context sensitive help which allows me to give much more info on the subject. Put the cursor at the field you want details on and press <F1>. The sub-pages and all other windows that are open like preferences, framesize calculator, mpeg/avi tools, audio/video preview etc. also have context links to the chm help under <F1>.

    Add support for MEncoder.
    Perhaps a separate MEncoder Avanti in the (far) future. Avanti controls FFmpeg more then most other guis and the difference in command line syntax and console feedback between FFmpeg and MEncoder makes it hard to combine this in one gui.

    In "Audio Settings" group, why there is no value "Source" in the combobox "Bitrate", "Sample Frequency", and "Channels"?
    Setting "Soure" at the video settings actually omits the related commands so FFmpeg decides.
    For audio bitrate, FFmpeg always uses a default of 64 kbit/sec which is not what you expect when you set it to "Source" (tried it on mp3, ac3 and aac).
    Audio sample frequency and channels would work but it would give a FFmpeg error when your source is ac3/aac 5.1 and you set the audio codec e.g. to mp2/mp3 which only support two channels. I can add it but it would have limited use.

    Chris.
    Quote Quote  
  9. I would do that if there wasn't a restriction in the language interpreter Avanti runs on.
    Hmm, I never heard about Gui4Cli before, I thought you made avanti in C/C++.

    KUTGW.
    Quote Quote  
  10. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by ohboy888
    Hmm, I never heard about Gui4Cli before, I thought you made avanti in C/C++.
    The two included dll's which do the background stuff are wriiten (by me) in C and C++.
    Quote Quote  
  11. Member KevinSartori's Avatar
    Join Date
    Feb 2009
    Location
    United States
    Search Comp PM
    Hey, I just wanted to mention that the method I posted above to convert MKV to MPG with burned-in subs does have one small annoying problem. And it's a deal breaker. By the end of the encode, the audio goes out of sync by about a second. I have no idea why this is. I understand that with modern encoders, the framerate is actually slightly variable. I believe that FFMPEG is the culprit here and not BeSweet, but I can't be sure. Although the quality is a bit lower, I've gone back to using Nic's WMEnc w/Avisynth to convert movies with subs to WMV. I'll just have to go back to watching subtitled movies on my Xbox 360, instead of my TiVo HD. I've spent a lot of time on this and I just can't get it to work. No matter what I do, I either end up with audio that runs out of sync or has its channels swapped.

    Thanks again for the help, guys!
    Quote Quote  
  12. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by KevinSartori
    No matter what I do, I either end up with audio that runs out of sync or has its channels swapped.
    About step 4 of your workflow (muxing). Did you load the mux template for it? There is a difference in setting "Copy Video" and "Mux Video" in that Avanti will add a -fflags genpts command at the start of the command line. This is essential for keeping audio in sync.

    About the swapping of ac3 channnels. I tested this after you mentioned it in your earlier post. I took a clip with ac3 5.1 and converted to ac3 (6 channels) with a lower bitrate. Then I extracted both original and converted streams to 6 separate wave files. Then I loaded the source and converted wave files "channel by channel" in Audacity to compare them both audibly and visibly, and I saw no difference. I have no surround system to check it out so perhaps I overlook something.

    EDIT:
    After "extensive research" , I found that it's not the FFmpeg ac3 codec that swaps the center and right channel but the FFmpeg/Avisynth interface. IMO you don't need Avisynth to do your conversions. Set codec to ac3 and bitrate to 448 and let FFmpeg do the bitrate conversion.

    I used this script in the Avanti/Avisynth user mode to check things out;
    Code:
    Audio=DirectShowSource("@source1_path")
    
    fl = getChannel(Audio,1)
    fc = getChannel(Audio,2)
    fr = getChannel(Audio,3)
    rl = getChannel(Audio,4)
    rr = getChannel(Audio,5)
    lfe = getChannel(Audio,6)
    
    # mergeChannels(fl,fc,fr,rl,rr,lfe) # same order, FFmpeg swaps
    mergeChannels(fl,fr,fc,rl,rr,lfe) # swapped to correct order
    It also appears that the FFmpeg/Avisynth interface lowers the volume. For that reason I used -vol 512 on the audio command line of which I assume it increases volume with about +6dB (256 = 0dB).
    Quote Quote  
  13. Member KevinSartori's Avatar
    Join Date
    Feb 2009
    Location
    United States
    Search Comp PM
    That makes sense, Chris K. What I've discovered is that the audio channels stay mapped correctly if you do the audio separately. As soon as you try to convert audio and video together, the channels go screwy. It's weird that Avisynth causes problems with FFmpeg because the channels are fine if I use Avisynth to convert the same files to WMV with Nic's WMEnc...

    Good news, though. I've solved the problem with the audio slowly going slightly out of sync. Believe it or not, the problem was converting the video to M2V format instead of direct to MPG!

    I can't tell you how much time I've spent trying to solve this problem, so I just kept trying different things. I understand that the "correct" way to mux video and audio into an MPG container is to start with M2V video and AC3 audio, but this was causing the audio drift problem. So I tried converting the video direct to MPG without audio and then using the MUX template (which I was using before) to put the transcoded AC3 and MPG together.

    I'm still using BeSweet to convert the 5.1 AC3 audio from 640kbps to 448kbps because it uses AZID to normalize the audio level first before it transcodes it. I tried using Avanti to convert just the AC3 audio and it seems to work fine. So here's the slightly revised workflow:

    1. Used MKVExtractGUI to extract the AC3 sound and SRT subtitles.
    2. Used Avanti to convert the video to mpeg2 MPG with burned in subtitles.
    3. Because the TiVo HD can only handle AC3 sound up to 448kbps, I used BeSweet to transcode the 640kbps 5.1 AC3 sound to 448kbps 5.1 AC3 sound.
    4. Finally, I used Avanti's MUX template to join the MPG and AC3 files into an MPG container.

    The audio stays perfectly synced this way and plays just fine on the TiVo HD!

    If you're curious to check out BeSweet, it's pretty simple to use. Here's a sample command line that I use to convert an AC3 file to 448kbps and normalize it so that it peaks at 0db, this way you're not taking any chances with possibly creating a clipped audio file:

    Code:
    BeSweet.exe -core( -input "D:\TiVo\movie.ac3" -output "D:\TiVo\movie-448.ac3" ) -azid( -L -3db --maximize ) -ac3enc( -b 448 -6ch )
    Thanks again for all the help!
    Quote Quote  
  14. Originally Posted by dark_guard
    Hi everyone. I apologize if this is in the wrong place, but I have some questions.

    First, what is the best video scale algorithm for downsizing videos? Second, is there a tutorial for using the VBR feature? What are the best values to enter there in order to optimize the file size, say for a 5 minute video at 750 kb/s?

    Also, is Avanti still being developed?
    video enhancer

    The best to me no doubt but the downside is it give to me a non standard frame rate for a given vid.
    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  
  15. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by KevinSartori
    It's weird that Avisynth causes problems with FFmpeg because the channels are fine if I use Avisynth to convert the same files to WMV with Nic's WMEnc...
    It's not Avisynth but the build-in FFmpeg interface for Avisynth. I suppose WMEnc has its own interface.

    Good news, though. I've solved the problem with the audio slowly going slightly out of sync. Believe it or not, the problem was converting the video to M2V format instead of direct to MPG!
    Yeah! FFmpeg is known for problematic muxing. I should have mentioned that some versions fail "without" the -fflags genpts command while others fail "with" it.

    I'm still using BeSweet to convert the 5.1 AC3 audio from 640kbps to 448kbps because it uses AZID to normalize the audio level first before it transcodes it.
    I know BeSweet. It's just fine for this kind of conversions. I only prefer Avisynth when it comes to framerate conversions because it can do pitch correction. Musicians hate the pitch change of speed up/down audio tracks.

    Aside from the normalize BeSweet does, it still would be nice to do it all in one go with Avanti and I tested the following setup with success.

    1. Select the Avisynth AUTO mode.
    2. Do the video and subtitle setup (same like you already do to mpg).
    3. Set audio to ac3, 448 kbps, 6 channels.
    4. Load the source clip on both "Source 1" and "Source 2".
    5. Set the "TS offset" field to 0.0001 (a trick to fool Avanti a bit).
    6. Press the "Start Process" button.

    Now when you look at the graph on the log window you'll see that Avanti inserted Avisynth between "Source 1" and FFmpeg to do the subtitling but sends the audio taken from "Source 2" directly to FFmpeg (so no channel swapping).

    If the audio needs some amplification, click on the [ User VIDEO option > ] button to call up the "Audio" command line. You there can add the "-vol xxx" command (values somewhere between 500-1500). This is not the same as normalize so you have to take care not to clip the audio with too high values. Avisynth can also normalize audio but then we're back at the same swapping problem.

    Currently Avanti only allows to load the same file on "Source 1" and "Source 2" when the "TS offset" option is activated and the 0.0001 setting suggests it is, while the value practically has no effect.

    Note that with this setup, Avanti expects the video in your source file at stream 0 and the audio at stream 1. If your source file contains more streams, you may need to add some user mapping to the command line. You can check this by calling up the "Source properties" on the main menu.

    If the BeSweet normalize isn't a big deal, you could give this setup a try.
    Quote Quote  
  16. Member KevinSartori's Avatar
    Join Date
    Feb 2009
    Location
    United States
    Search Comp PM
    Chris K, you're the man.

    Your "TS offset" trick to get Avanti to feed the audio directly to FFmpeg while the video is routed through Avisynth first is genius. Plus, it even works! What's nice about this method versus mine, aside from less steps and being much easier, is that this also works with MKV files that have DTS instead of AC3 audio. Totally excellent!

    Honestly, the benefits of normalizing the audio are so slight that they're not even worth the extra steps/effort. I mean, heck, I can just turn my receiver up...

    That's a good tip about stream 0 and stream 1. I have seen an MKV file before where the audio was the first stream, so it can happen. MKVMerge GUI is a good tool to rearrange and/or remove streams in an MKV container.

    I really appreciate the time you've put into helping me out here and I plan to use this information to post a tutorial over at the pyTivo forums!

    Thanks again!
    Quote Quote  
  17. Member KevinSartori's Avatar
    Join Date
    Feb 2009
    Location
    United States
    Search Comp PM
    I meant to mention in my last post that I got thirteen of the following error messages using your new method during the encode. The new file seems to play back fine.

    [vob @ 06FB2010]buffer underflow i=1 bufi=1639 size=1792

    Is this important?
    Quote Quote  
  18. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by KevinSartori
    I meant to mention in my last post that I got thirteen of the following error messages using your new method during the encode. The new file seems to play back fine.

    [vob @ 06FB2010]buffer underflow i=1 bufi=1639 size=1792

    Is this important?
    Yes, it is important. It could cause some chopping when played on the Tivo.
    I think you need to increase the VBV buffer size somewhat untill these messages don't show up anymore.
    Quote Quote  
  19. Member KevinSartori's Avatar
    Join Date
    Feb 2009
    Location
    United States
    Search Comp PM
    Currently, I keep the VBV buffer size at 4096. Is there any disadvantage to going overboard here, like, say, 16384? Are there negative side effects to having the VBV buffer size too high? Is there such a thing as too high with VBV buffer?
    Quote Quote  
  20. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by KevinSartori
    Currently, I keep the VBV buffer size at 4096. Is there any disadvantage to going overboard here, like, say, 16384? Are there negative side effects to having the VBV buffer size too high? Is there such a thing as too high with VBV buffer?
    Yes, you can set it too high. I see in your first post these settings;

    Bitrate: 16384
    Max rate: 30000
    VBV buffer size: 4096

    Did you get these settings from somewhere (Tivo perhaps)?. I have no experience with HD but for DVD players there are specs that say how much the firmware has to reserve for the VBV buffer (1835 kbit, I believe). If the given buffer size exceeds this, you'll get playback problems or the player will give an error.

    I think it's better to keep the buffer size "as is" and to lower the "Max rate" a bit. It should also work and it's probably more safe where it concerns the Tivo VBV buffer size requirements.

    EDIT: I found this at a doom9 forum thread...

    "HDTV in the US is limited to an overall bitrate (audio and video) to 20000 kbps, so I would suggest a maximum video bitrate of 20000 - (audio bitrate)."

    http://forum.doom9.org/archive/index.php/t-121998.html
    https://forum.videohelp.com/topic356432.html

    I don't think you need to lower "Max rate" that much because the Tivo seems to be quite tolerant.
    Quote Quote  
  21. Member KevinSartori's Avatar
    Join Date
    Feb 2009
    Location
    United States
    Search Comp PM
    30000kbps is the max bitrate that the TiVo HD can handle. I went with 16384 as a bitrate only because that's the default setting with pyTivo. Although, as I'm sure you know, bitrate with FFmpeg is more of a suggestion than anything else. Most movies I convert seem to end up anywhere from 5000-12000kbps. FFmpeg seems to do a pretty good job on its own deciding how much data it should devote. One time, as a test, I had a movie that encoded with an average of 5500kbps. That was with the bitrate set to 8500. I tried two more encodes, one at 16384 and one at 30000. As I suspected, the resulting average bitrate/file size was nearly identical on all three encodes. That's when I realized that FFmpeg is gonna do what's it's gonna do, just as long as you don't limit it with too low a bitrate setting. That's why I'm not so sure that the new bitrate calculator in Avanti is terribly useful, unless FFmpeg's bitrate control acts differently with MPEG4 or the other formats it can encode with.

    This is what the pyTivo guys have to say about -bufsize (default is 4096k):

    Allows you to set the buffer size used by ffmpeg. Increasing this setting will allow higher bitrates during transcoding (see video_br setting), especially when transcoding to HD resolutions. But it may result in pixelation or audio sync issues with some sources. 1024k is fine for the resolutions used by S2 tivos. But 2048k or 4096k is preferred for HD tivos. Leave this setting blank unless you are experiencing audio/video sync issues and wish to test a different value.
    I've just tested some encodes with the buffer at 2048, but I end up with weird jerky artifacts. Not jerky in the motion, but kind of a jerky compression grain in the background images. But at 2048, I don't get any buffer underflow errors. If I go back to 4096, the annoying jerkiness goes away, but it can throw a few buffer underflow errors. I tried 8192 and I got lots of buffer underflow errors.

    What I've done is noted at what point these errors occur and then checked these spots after the encode is complete, but there don't seem to be any actual problems with playback on my PC or the TiVo HD. In the end, I don't like seeing these errors and I don't doubt that there are errors, but fortunately these errors don't seem to translate to actual playback problems.. I can't come up with a VBV buffer adjustment that doesn't either lower the quality of the image (2048) or cause a lot more buffer underflow errors (8192), so I guess I'll follow your advice and leave it where it is (4096) and call it a day.

    Again, I appreciate your assistance and certainly enjoy the ongoing dialogue!
    Quote Quote  
  22. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by KevinSartori
    Most movies I convert seem to end up anywhere from 5000-12000kbps. FFmpeg seems to do a pretty good job on its own deciding how much data it should devote.
    If the thirteen underflows were over a full length movie you can call it marginal. What happens when one occurs is that FFmpeg shortly needs to use a very high bitrate to keep up the desired quality. This then seems to be in conflict with the combination of the "VBV buffersize" and "maxrate" setting. Also note that it is source dependent. Some sources (e.g. with grain) need more bitrate then others.

    That's why I'm not so sure that the new bitrate calculator in Avanti is terribly useful, unless FFmpeg's bitrate control acts differently with MPEG4 or the other formats it can encode with.
    There's already a message on it that says results are only reliable with CBR encoding. For a xvid with the standard settings it's quite accurate. You can not calculate VBR with the standard formulas because bitrate entirely depends on the source contents.

    What I've done is noted at what point these errors occur and then checked these spots after the encode is complete, but there don't seem to be any actual problems with playback on my PC or the TiVo HD. In the end, I don't like seeing these errors and I don't doubt that there are errors, but fortunately these errors don't seem to translate to actual playback problems..
    Since the underflows are partly also source dependent, playing around a bit with the "maxrate" should allow you to avoid them without introducing other playback problems.

    certainly enjoy the ongoing dialogue!
    Normally Avanti support must be limited to the usage of the program. Actually tweaking encoder settings of all the by FFmpeg supported codecs is not my speciality (there are just to many of them). The channel swapping was interesting to figure out and mpeg2 enconding is my main use of FFmpeg.
    Quote Quote  
  23. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Latest FFmpeg builds seems to revert the syntax change -b to -vb for video bitrate.
    Because it's still in the docs and Avanti can only check it there, it now assumes the version
    supports -vb which it doesn't.

    Result; when using the latest FFmpeg builds with Avanti, FFmpeg will throw an error but continues.
    Code:
    [NULL @ 0x3f4de0]Unknown option 'vb'
    
    [swscaler @ 0x3f5d70]Unknown option 'vb'
    I'm trying to keep Avanti compatible with FFmpeg syntax changes but didn't foresee
    that the change -b to -vb which seems quite logical to me considering that audio bitrate
    for a long time already is expressed by the -ab command, would be reverted.

    For now you can still use new builds if you change a stored setting in the "AVANTI.ini" file.
    You can edit the file in e.g. notepad or wordpad.

    At the group [SYSTEM] settings, change ffmp_b=-vb back to ffmp_b=-b

    EDIT:
    Code:
    Unknown encoder 'libfaac'
    Just as happened with AMR audio a while ago, libfaac is no longer included in the
    latest FFmpeg builds because of a license issue.

    Chris K
    Quote Quote  
  24. Hello,

    How can I change/configure properties for "XviD (Lib)" codec in AVANTI

    The entry in the "Bitrate" boxes seem to have no effect while encoding using
    "XviD (Lib)" codec.

    The video is always encoded at 800-850 kbps bitrate, no matter what is entered
    in the bitrate boxes, regardless of the type of video being encoded

    The bitrate boxes only matter during MPEG1/MPEG2 conversions, as observed.

    Is it possible to link the actual "Xvid" encoder properties dialog (with Profile Level,
    Encoding Type etc.) with AVANTI

    BTW, while using the "XviD" (NOT "XviD (Lib)") encoder, AVANTI always says
    "Unknown encoder 'xvid'" as error message and encoding does not occur.
    Latest Xvid is installed and is otherwise working fine.

    Please help as soon as possible ... ... many thanks
    Quote Quote  
  25. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by The Black
    The video is always encoded at 800-850 kbps bitrate, no matter what is entered
    in the bitrate boxes, regardless of the type of video being encoded
    What FFmpeg version do you use? I tested with today's autobuild SVN-r18938 and that works fine.

    http://ffmpeg.arrozcru.com/autobuilds (download the static build).

    Read my previous post about the "Unknown option 'vb'" error message. It's a temporary bug in the current FFmpeg builds which is already reported and can be ignored. It has no effect on the encode results.

    Is it possible to link the actual "Xvid" encoder properties dialog (with Profile Level,
    Encoding Type etc.) with AVANTI
    FFmpeg uses its own build-in XviD encoder. There is no dedicated xvid dialog, it all must (and can) be done with the bitrate settings on the right of the GUI. You don't need to have a separate XviD encoder installed.

    BTW, while using the "XviD" (NOT "XviD (Lib)") encoder, AVANTI always says
    "Unknown encoder 'xvid'" as error message and encoding does not occur.
    XviD without lib is only on the list to be compatible with (very) old FFmpeg versions. For any recent version, you need to use Xvid (Lib).

    Latest Xvid is installed and is otherwise working fine.
    As said, FFmpeg uses it's own encoder but it will do no harm if you keep it installed.
    Quote Quote  
  26. Hello Chris K,

    Thank you for your prompt and helpful response.

    To further clarify my situation, please take a look at some screenshots.

    To answer your query regarding the FFmpeg build I use, here is a screenshot-1 :
    http://img206.imagevenue.com/img.php?image=38296_Screenshot_1_122_82lo.jpg
    of the FFmpeg version as detected by AVANTI during startup

    Does the loaded template, "PAL_DIVX_2_PASS_HQ" have anything to do with the problem ?
    What exactly does the template do ?

    Other relevant details during file encoding (like bitrate, actual encoding bitrate etc.) are
    indicated in this screenshot-2 :
    http://img7.imagevenue.com/img.php?image=38510_Screenshot_2_122_827lo.jpg

    One simple question: To encode at constant bitrate using AVANTI, one has to
    enter the same bitrate in all the fields - Bitrate (kbit/s), Min rate & Max rate.
    Is it correct ?

    If so, then the encoding bitrate should be 1200 kbit/s as seen from the screenshot-2,
    but it clearly isn't (see actual encoding status bar in screenshot-2).

    For AVANTI status report after encoding, click below :
    http://img264.imagevenue.com/img.php?image=38607_Screenshot_3_122_105lo.jpg [screenshot-3].

    For bitrate and other properties of the encoded file click below :
    http://img206.imagevenue.com/img.php?image=38642_Screenshot_4_122_556lo.jpg [screenshot-4].


    According to your suggestion :
    ------------------------------------------

    I downloaded and used the FFmpeg static build from the link:
    http://ffmpeg.arrozcru.com/autobuilds/

    FFmpeg version detected at startup
    http://img180.imagevenue.com/img.php?image=38696_Screenshot_5_122_1192lo.jpg [screenshot-5].

    But the same problem persists when encoding with the above version of FFmpeg.
    Find the relevant screenshot here :
    http://img167.imagevenue.com/img.php?image=38739_Screenshot_6_122_955lo.jpg [screenshot-6].

    For AVANTI status report after encoding, click below :
    http://img165.imagevenue.com/img.php?image=38790_Screenshot_7_122_806lo.jpg [[screenshot-7]

    For bitrate and other properties of the encoded file click below :
    http://img165.imagevenue.com/img.php?image=38790_Screenshot_7_122_806lo.jpg [screenshot-8].

    Notice that the file has exact bitrate properties as the file encoded with the original version of FFmpeg
    [compare screenshots 4 & 8].

    Is it then an FFmpeg issue ? Is there any way to solve it ?

    Any thoughts guys ?? ... ... thanks in advance.
    Quote Quote  
  27. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    I'm afraid you (and me) are dealing with the FFmpeg limitations where it concerns the XviD encoder.
    Although it uses the same source code of the separate XviD, it's a much stripped down version.
    I copied the exact settings from your screenshots and did a number of tests. Even when I set bitrate to 1700 kbps, i'll get this result;
    Code:
    17:27:51 - bitrate: min 928, max 1023, avg 1001 kbit/s
    17:27:51 - Q-scale: min 2.0, max 2.0, avg 2.0
    17:27:51 - FourCC set to Default, frame rate to Source fps.
    This means that with the XviD encoder FFmpeg simply goes its own way, actually saying "I don't need more bitrate for the given source". You will get closer to the requested bitrate if you e.g. encode to a larger frame size or with a grainy source.
    You can see this FFmpeg behaviour more clearly when you do 2-pass mpeg2 encoding with a high bitrate. Then at the start of the second pass FFmpeg may display;
    Code:
    [mpeg2video @ 0x15d5210]
      ... [lavc rc] Using all of requested bitrate is not necessary for this video with these parameters.
    One simple question: To encode at constant bitrate using AVANTI, one has to
    enter the same bitrate in all the fields - Bitrate (kbit/s), Min rate & Max rate.
    Is it correct ?
    It is, but mainly for the codecs included in libavcodec, i.e. mpeg1, mpeg2, mpeg4. XviD is a additional FFmpeg library like e.g. also x264 and these have often their own additional or alternative commands. For x264 there are a lot but for XviD hardly any. Bitrate will always be applicable but "min rate" and "max rate" may or may not depending on the chosen codec.

    Does the loaded template, "PAL_DIVX_2_PASS_HQ" have anything to do with the problem ?
    What exactly does the template do ?
    Basically A template loads predefined settings at the "Destination Audio/Video settings" and command line additions. It doesn't do anything invisible in the background. As at your screenshots, you did your own settings which are used regardless of the last template you loaded. If you right-click on the [User VIDEO options >] button you can call up the command line to check.

    I'm afraid, simply setting a high enough bitrate and let FFmpeg decide is the only way you can use the XviD encoder.
    2-pass can give improvement but with a constant q of 2.0, this will hardly have any effect.
    Quote Quote  
  28. Hi, Chris K,

    Thanks a lot for shining some much needed light on my queries.

    Your comments were very helpful and are much appreciated.

    Since it is an FFmpeg limitation, nothing can be done about it, I guess.

    Pity, since AVANTI is an otherwise excellent and easy-to-use FREE A/V
    converter, muxer, demuxer and so much more, especially with the well
    laid-out GUI.
    (happened to notice that you yourself are a GUI developer. Kudos on a
    great job if you had anything (or everything) to do with the AVANTI GUI).

    A simple tool that actually works very well (most of the time), much better
    than other similar utilities that claim a bunch but deliver little.

    Perhaps in future releases, shortcomings and limitations such as the one
    realized here can be ironed out (although it is an FFmpeg issue).

    It would have been perfect to be able to link the actual "Xvid" encoder
    properties to AVANTI, since the codec is very popular and is available for
    free.
    Quote Quote  
  29. Man of Steel freebird73717's Avatar
    Join Date
    Dec 2003
    Location
    Smallville, USA
    Search PM
    Originally Posted by The Black
    (happened to notice that you yourself are a GUI developer. Kudos on a
    great job if you had anything (or everything) to do with the AVANTI GUI).
    Yep Chris is the sole developer of Avanti and has done a bangup job working on it and offering support.
    Donadagohvi (Cherokee for "Until we meet again")
    Quote Quote  
  30. Just as I thought ... ...
    Excellent job Chris K and many thanks for all your topic support.
    Quote Quote  



Similar Threads

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