VideoHelp Forum
+ Reply to Thread
Page 3 of 4
FirstFirst 1 2 3 4 LastLast
Results 61 to 90 of 120
Thread
  1. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by wiseant
    Also, just for the heck of it I have been converting Avi's (XviD/DivX) to half D1 (352x480) w/ ac3 at 192 kbps - I have been using the -sameq switch. This has been working quite well for me - until I got the dreaded buffer underflow - at first ffmpeg did not show this (I was using Ctrl-S for ffmpeg console) - but later when I used Muxman and DVDAuthorGUI - they failed and indicated that my MPEG2 Decoder had buffer underflow problems.
    I have checked the forums for buffer_underflow - what I gleaned was to use -bufsize 224k; but there is no mention of using -sameq

    I suppose using -sameq causes the problem in isolated instances - any advice on this?

    I should mention that I am using an avisynth script - so ffmpeg "sees" raw video and audio . . .
    I loaded the "NTSC_MPEG2_ES_DVD" template, changed to ac3 and changed the frame size to 352x480. Set the bitrate to 4000. Did not set a buffer size. Then put "-sameq" on the command line and didn't get underflow errors.
    But as you experienced this is not always reliable, I loaded the m2v and ac3 in IfoEdit and Authored it to DVD.
    This program gives a log and that reported that there was no buffer underflow. I also did it with a AVS script and IfoEdit still says there's no buffer underflow. You can also try the "NTSC_MPEG2_VBR_ES_HQ" template and use the same adaptions.
    I don't know (and wonder) how "-sameq" interprets the source if it comes from Avisynth. I also have the impression that some FFmpeg options are accepted without notification but simply do nothing on certain codecs.

    Indeed "-target ntsc-dvd" seems to be restricted to only write a mpg PS container.

    Note that I'm not a expert in tweaking FFmpeg for a certain task (I'm also still learning). The templates are only basic examples.
    Quote Quote  
  2. Member
    Join Date
    Jun 2007
    Location
    Canada
    Search Comp PM
    Thanks Chris

    I am going to do some experiments - although right now I am using Vista (because it came with my new box)

    Vista might be the problem - I did change some encoder/decoder settings because .m2v files were so slow to view in MPlayerClassic and MPlayer did not allow me to quickly advance frames - this may also have been the cause - so I deleted all the new decoders and went back to ffdshow

    I will be reverting back to XP as soon as I determine the best way to do so - but for the time being I'll test on Vista and see if I can save some screen output if the buffer underflow presents itself

    Thanks
    Quote Quote  
  3. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by Chris K
    New version AVANTI 0.1.9 - FFmpeg/Avisynth GUI.
    Code:
    AVANTI 0.1.9 -- FFmpeg/Avisynth GUI -- Change log 19-09-2007.
    ==========================================
    	
    1. Added option to call up the FFmpeg command line. Use <Ctrl><F9>.
       This will show the command line of the last encode process.
    
    2. Added option to cleanup the Windows "temp" directory from
       XviD 2-pass log files (xvidff.x). Set "xvid_log=KEEP" to
       "xvid_log=REMOVE" in the Avanti.ini file to switch it on.
    
    3. Improved 2-pass encoding (command line, reporting).  
    	
    4. Fixed bug in destination "Preview" option for elemetary streams.
    
    5. Fixed a bug that corrupted user given paths on command lines.
       Note that Avanti always converts to Linux paths (slashes).
    	
    6. Changed some code to trace the Avisynth problem which shows up
       on some machines.
    	
    7. New attempt to fix the Vista toolbar bug on remote.
       Waiting for a Vista machine to be able to trace/fix the bug.
    Uploaded new version at the first post of this topic.

    I found that with 2-pass xvid encoding, FFmpeg copies the log file created at the first pass to the Windows temporary directory. It uses "xvidff.x" as filename where x is a unique number. These files are not overwritten and not automatically removed by FFmpeg. I only seen this happen with 2-pass xvid. I added a option for a cleanup (see change log).

    Chris.
    Quote Quote  
  4. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    Originally Posted by Chris K
    Code:
    6. Changed some code to trace the Avisynth problem which shows up on some machines.
    Something particular I can do or try to help you find the problem?
    Quote Quote  
  5. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by 45tripp
    Something particular I can do or try to help you find the problem?
    Hi 45tripp,

    I build in something (a switch) temporarily to trace the Vista bug. Perhaps I can do something comparable for the Avisynth problem. Meanwhile I changed the call to FFmpeg for getting file properties. I did this by encoding a clip of only one second with the -t option. Later I found that FFmpeg has a special option for that -shortest (finish encoding within shortest input). Now I use that assuming that in some cases Avisynth isn't ready yet to deliver file info within the one second I used before.

    Perhaps you tried already if it works without renaming the Avisynth directory, but if not please do.

    Thanks,
    Chris.
    Quote Quote  
  6. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    wouldn't have posted without trying.
    same thing.
    Quote Quote  
  7. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by 45tripp
    wouldn't have posted without trying.
    same thing.
    In the Avanti.ini file you'll find "tistate=OFF". If you set this to on you get a red icon on the taskbar. This is a debug report window. If you left-click on it it will be opened. There's a buch of unformatted debug data there from the GUI and DLL. In your case there also should be error messages from the language runtime. Unfortunately you can not copy from that window but perhaps you can post a screenshot of it. I need the info directly after the program reported the red Avisynth messages at startup.

    Possibly this can clarify the cause of the problem .

    Chris.
    Quote Quote  
  8. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    it just says:
    Code:
    timeout2 = 48
    the number is different each time, usually in the forties.

    So I tried switching on debuging as soon as I could at startup and
    getting a pic of the log. startD1.jpg and startD2.jpg is the area i thought you needed.

    also tried clicking 'avisynth script editor' with debug on.
    AVSscriptedit.jpg

    log.rar

    let me know


    gl
    Quote Quote  
  9. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by 45tripp
    it just says:
    Code:
    timeout2 = 48
    the number is different each time, usually in the forties.
    So I tried switching on debuging as soon as I could at startup and...
    Timeout threshold is 200 (10th of seconds) so this is reasonable. It means that after the call to FFmpeg, there was a delay of 4.8 seconds before it returned info in the GUI buffer.

    The startD1 log starts at a point that already passed the FFmpeg initialisation. I'm preparing a version of the source that will write it to a log on disk. The first experiment wrote the whole startup procedure to a log file of over 300 kb.
    I'm now working on isolating the FFmpeg initialisation (where the error occurs). Only the Avanti executable has to be replaced, but this is 300kb. If you have something like a hotmail or yahoo account and send it to me in a PM, I can send you the log version by e-mail.

    Thanks for your efforts,
    Chris
    Quote Quote  
  10. Member
    Join Date
    Jun 2007
    Location
    Canada
    Search Comp PM
    Thanks for the update Chris K - I have been doing some comparisons between ffmpeg and mencoder as well as experimenting with ffmpeg/Avanti

    I haven't installed the new version - but I like the idea of saving the command line (which should end up being a batch file?)

    I'm also testing some more ffmpeg options and creating some "templates" - perhaps they may be useful . . .

    I tried out Vista again and had to rename the Avisynth directory from 2.5 to 2.5.7 and it worked again - perhaps a batch file that changes the Avisynth directory name and then changes back to the original upon termination?

    Also there are many different installs of Avisynth but I think the most recent have a default directory of Program Files/Avisynth 2.5 - personally I install into c:\Avisynth 2.5 then change it to 2.5.7 (if necessary)

    I'll post a summary in the next couple of days
    Quote Quote  
  11. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Hi wiseant,
    Originally Posted by wiseant
    I haven't installed the new version - but I like the idea of saving the command line (which should end up being a batch file?)
    No not a batch file. It is the command line that Avanti has composed on the fly after you pressed "Start process". It can be copied from the report windows and pasted in notepad to create a batch file yourself. This will not always work because Avanti creates and runs temporary AVS scipts if you select basic Avisynth options or use the Avisynth user mode.

    I'm also testing some more ffmpeg options and creating some "templates" - perhaps they may be useful . . .
    Some kind of template exchange would be nice in the future.

    I tried out Vista again and had to rename the Avisynth directory from 2.5 to 2.5.7 and it worked again - perhaps a batch file that changes the Avisynth directory name and then changes back to the original upon termination?
    That could be a option but first lets try to fix it without renaming. 45tripp offered help for this and also send a template example for FLV encoding which I will include in the next version.

    I'm curious what the toolbar does in Vista. If it still doesn't appear then copy a small text file to the directory with "Avanti-GUI.exe" and name this "Vista_debug.txt". It doesn't matter what's in it because it is only checked for its existance to set a switch. The switch will skip loading the advanced database manager which also uses icons from the same list. I think it is a icon load problem and can trace that more easily as soon as I have access to a Vista machine myself.

    I'll post a summary in the next couple of days
    Will be much appreciated. Thanks,
    Chris.
    Quote Quote  
  12. Member
    Join Date
    Jun 2007
    Location
    Canada
    Search Comp PM
    Hey Chris,

    Here is some information that I put together:

    I used two different avs files and my ffmpeg encode tests were as close as possible to encoding 10000 frames

    For 352x480 half D1 DVD
    AVISource("C:\AVI\Troy-CD2.avi")
    AddBorders(64,128,64,128)
    BilinearResize(352,480)
    ChangeFPS(30000/1001)

    For 720x480 Full DVD
    AVISource("C:\AVI\Troy-CD2.avi")
    AddBorders(64,128,64,128)
    BilinearResize(720,480)
    ChangeFPS(30000/1001)

    Info re: C:\AVI\Troy-CD2.avi
    File : 698 MB (698 MB), duration: 1:23:06, type: AVI
    Video : 624 MB, 1049 Kbps, 25.0 fps, 512*224 (2.21:1), XVID
    Audio : 74 MB, 128 Kbps, 44100 Hz, 2 channels, 0x55 = MPEG Layer-3

    This is the batch file I used for the 352x480 encode
    "C:\FFMPEG\FFMPEG.EXE" -i "C:\ENCODING\Troy-CD2.avs" -vcodec mpeg2video -bufsize 917k -minrate 0k -b 6000k -maxrate 9800k -aspect 4:3 -an "C:\FFMPEG\Troy-CD2-MPEG.m2v

    frame=10031 fps=156 q=2.0 size= 193522kB time=334.7 bitrate=4737.0kbits/s [156 fps @ 29.97 = 5.2X]


    This is the batch file I used for the 720x480 encode
    "C:\FFMPEG\FFMPEG.EXE" -i "C:\ENCODING\Troy-CD2-720.avs" -vcodec mpeg2video -bufsize 1835k -minrate 0k -b 6000k -maxrate 9800k -aspect 4:3 -an "C:\FFMPEG\Troy-CD2-MPEG-720.m2v

    frame=10033 fps= 93 q=4.9 size= 245378kB time=334.7 bitrate=6005.2kbits/s [93 fps @ 29.97 = 3.1X]

    The above encodes were done using FFmpeg version SVN-r9017


    Then I tried FFmpeg version SVN-r10464 [which seems to support]
    -threads 2

    This is the batch file I used for the 352x480 encode
    "C:\FFMPEG\FFMPEG.EXE" -i "C:\ENCODING\Troy-CD2.avs" -threads 2 -vcodec mpeg2video -bufsize 1835k -minrate 0k -b 6000k -maxrate 9800k -aspect 4:3 -an "C:\FFMPEG\Troy-CD2-MPEG-thread.m2v

    frame= 9975 fps=194 q=2.0 size= 191658kB time=332.8 bitrate=4717.8kbits/s

    So this increased the encoding speed from 156 fps to 194 fps = a 24% increase

    This is the batch file I used for the 720x480 encode
    "C:\FFMPEG\FFMPEG.EXE" -i "C:\ENCODING\Troy-CD2-720.avs" -threads 2 -vcodec mpeg2video -bufsize 1835k -minrate 0k -b 6000k -maxrate 9800k -aspect 4:3 -an "C:\FFMPEG\Troy-CD2-MPEG-720-thread.m2v

    frame=10047 fps=128 q=5.8 size= 245734kB time=335.2 bitrate=6005.5kbits/s

    So this increased the encoding speed from 93 fps to 128 fps = a 37.6% increase


    Then I looked at various FFMPEG Options

    -flags +trell [use trellis quantization]
    -bf [use 'frames' B frames]
    -cmp [full pel me compare function]
    -subcmp [sub pel me compare function]
    -mbd [macroblock decision algorithm]
    -dc [intra_dc_precision]


    1) -bf 2 -mbd 2 -cmp 2 -subcmp 2
    frame= 9999 fps=107 q=2.5 size= 155468kB time=333.5 bitrate=3818.5kbits/s

    2) -flags +trell
    frame=11094 fps=130 q=3.0 size= 200126kB time=370.1 bitrate=4429.3kbits/s

    3) -mbd rd
    frame=10023 fps=162 q=2.0 size= 177564kB time=334.4 bitrate=4349.9kbits/s

    4) -cmp 2 -subcmp 2
    frame=10011 fps=158 q=3.0 size= 181338kB time=334.0 bitrate=4447.7kbits/s

    5) -bf 2
    frame=10002 fps=189 q=2.5 size= 157242kB time=333.6 bitrate=3860.9kbits/s

    6) -dc 10 -bf 2
    frame=10058 fps=188 q=2.5 size= 159310kB time=335.5 bitrate=3889.9kbits/s

    7) -dc 10 -bf 2 -cmp 2 -subcmp 2 -mbd rd -flags +trell
    frame= 9998 fps= 70 q=2.5 size= 154551kB time=333.5 bitrate=3796.4kbits/s

    8) -dc 10 -bf 2 -cmp 2 -subcmp 2 -mbd rd
    frame= 9987 fps=107 q=2.5 size= 156160kB time=333.1 bitrate=3840.1kbits/s

    9) -mbd 2 -flags +trell
    frame= 9993 fps=102 q=3.3 size= 173062kB time=333.4 bitrate=4252.3kbits/s

    10) -mbd rd -flags +trell
    frame= 9982 fps=103 q=3.0 size= 172784kB time=333.0 bitrate=4250.2kbits/s

    11) -mbd rd -dc 10 -bf 2 -flags +trell
    frame=10020 fps= 82 q=2.5 size= 154466kB time=334.2 bitrate=3785.9kbits/s

    My preference is for 8) -dc 10 -bf 2 -cmp 2 -subcmp 2 -mbd rd = 107 fps encoding speed with very nice quality

    7) might be slightly better quality but I don't like the speed tradeoff from 107 fps to 70 fps

    Then I used the parameters for #8 in Avanti and here is a screen shot:



    Since the source file was Progressive I did not use any of the "Interlaced Options", but from some documentation:


    re Interlaced encoding
    -top top=1/bottom=0/auto=-1 field first
    -ildct force interlaced dct support in encoder (MPEG2/MPEG4)
    -ilme force interlaced me support in encoder (MPEG2/MPEG4)

    I stopped using -sameq for any 720x480 mpeg2video encodes because Ifoedit was indicating "Too many Frame Drops" although -sameq seems ok for 352x480 encodes

    Incidentally I found this info, from MPlayer - man_page.html

    vrc_buf_size=<value>
    buffer size in kbit (pass 1/2). For MPEG-1/2 this also sets the vbv buffer size, use 327 for VCD, 917 for SVCD and 1835 for DVD.




    Just wanted to add that Vista still does not show the top row of icons . . .
    Quote Quote  
  13. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by wiseant
    Here is some information that I put together:
    Quite overwhelming. I need some time to get it all, then I will post my comments on that.

    But what frightens me when I look to the screenshot... where is the toolbar, the icons on top?
    Doesn't it appear in WXP anymore?

    If so, I have to revert some of the changes I made.

    Please let me know,
    Chris

    EDIT: Our posts were crossing I suppose

    Did you try the text file with "vista_debug.txt" ?
    Quote Quote  
  14. Member
    Join Date
    Jun 2007
    Location
    Canada
    Search Comp PM
    Hi Chris K

    The screenshot is from Vista - the icons DO show up in XP

    I tried the "vista_debug.txt" but I don't know if it did anything . . .
    Quote Quote  
  15. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by wiseant
    The screenshot is from Vista - the icons DO show up in XP
    I tried the "vista_debug.txt" but I don't know if it did anything . . .
    Thanks. If it's there it switches of a part and the icons should have shown up. I consider to change the toolbar in a series of regular icon buttons but that's quite a job of changing the positions of everything visible.

    Ok... now your "Quality vs. Speed" tests. I've now seen what you actually did. First all individual FFmpeg commands that are useful for mpeg2video. Then a series of tests where you finally chose #8 as the best quality/speed compromise.
    Thereafter you were able to speed up this choice again by using -threads 2 as I can see on the screenshot.

    re Interlaced encoding
    -top top=1/bottom=0/auto=-1 field first
    -ildct force interlaced dct support in encoder (MPEG2/MPEG4)
    -ilme force interlaced me support in encoder (MPEG2/MPEG4)
    I have used this myself with success already on a interlaced source. Added them to the VBR_ES_HQ template and burned it to a DVD-RW. Looked good with the retained interlacing. Didn't show up anything irregular on my TV.

    Incidentally I found this info, from MPlayer - man_page.html

    vrc_buf_size=<value>
    buffer size in kbit (pass 1/2). For MPEG-1/2 this also sets the vbv buffer size, use 327 for VCD, 917 for SVCD and 1835 for DVD.
    I used 2048 for DVD in the template but I believe there were buffer underflows occasionally, depending on the contents of the source. Will try this values to see what happens.

    I think the results of your tests are very interesting and useful to everyone who works with FFmpeg.

    Thanks for your work,
    Chris
    Quote Quote  
  16. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Hi to all,

    45tripp and I are doing a "deep analysis" on the problems with Avisynth. For now we can tell that renaming the Avisynth directory will have several undesired side-effects and we do not recommend this.

    Renaming the Avisynth directory will result in failing of the internal Avanti/Avisynth AUTO and USER options. Your own scripts that use functions from dll's that are "autoloaded" by Avisynth, will also fail.

    If you're a firsttime user of FFmpeg and Avisynth and installed Avisynth and Avanti with a FFmpeg version in the reserved directory, Avanti and all its Avisynth options will work as described in the manual. You don't need to rename the Avisynth directory to get it to work.

    If you are a experienced Avisynth user and have a lot of extra plugins installed that are "autoloaded" by Avisynth then Avanti could fail.

    We found that the following dll's can cause problems if you have them in the Avisynth plugins directory. Some probably only on systems with CPU's that don't support SSE2 and/or SSE3.

    On my system (AMD Athlon XP2000+ only SSE) I had to remove:

    RemoveGrainSSE2 and SSE3.dll
    RepairSSE2 and SSE3.dll
    RSharpenSSE2 and SSE3.dll
    Yadif.dll

    Above dll's (except Yadif.dll) can still be used because they all have versions that can work with CPU's without SSE2 and SSE3 support.

    On 45tripp's system (P4 with SSE2) he had to only remove:

    Yadif.dll

    This is a C dll which is not "autoloaded" by Avisynth. Still it seems to cause the problem if it's in the Avisynth plugin directory.

    Possibly other plugin dll's can cause the same problem. You'll have to do some research yourself to find out. We checked for over 40 plugins that all worked fine.


    We'll keep you informed,
    Chris.
    Quote Quote  
  17. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by Chris K
    New version AVANTI 0.2.0 - FFmpeg/Avisynth GUI.
    Code:
    AVANTI 0.2.0 -- FFmpeg/Avisynth GUI -- Change log 27-09-2007.
    =============================================================
    
    1. Templates now store their associated codec database entry.
       This makes it very easy to exchange templates that contain
       other then the by default registered FFmpeg codecs.
       Avanti will automatically update the database if it finds
       a unregistered codec in the template.
       	
    2. Added template for Flash Video (user contribution).
    
    3. Fixed several minor bugs.
    
    4. Found the main cause of the Avanti/FFmpeg/Avisynth problem
       with a lot of help from 45tripp.
       Read the included "readme.txt" file for more details. 
    
    5. New approach for Vista toolbar. Test GUI did fine, so...?
    
    6. Rewritten the chm help somewhat but it will be revised as
       soon as I find the time for it. Also working on context
       sensitive help.
    Uploaded new version at the first post of this topic.

    Read my previous post about the Avanti/Avisynth problem.

    There's a zip in the "avsplugins" folder with a few batch files and a description. It concerns two new user definable paths in the "Avanti.ini" file. It is not yet documented in the Avanti-help.chm.

    Changed "Transcode" at the audio settings into "Convert AV" because these settings can also be used for audio/video conversion.

    While trying to extract audio from MJPEG avi's that were edited in VirtualDub, I found that FFmpeg delivered distorted sound and continued (probably forever) passed the clip duration. By setting the Avisynth mode to FORCE, which means that Avisynth is inserted to only act as server, the problem could be solved. This happened with all audio formats.

    If you made major changes in the codecs database and/or added user options at the main section, I advice to use "Backup Avanti system files" at the main menu. This will store copies of the database and current ini file. You can also restore them from there in case you had to delete the ini file or find they are corrupted.

    Chris.
    Quote Quote  
  18. Member
    Join Date
    Jun 2007
    Location
    Canada
    Search Comp PM
    Hey Chris - thanks for the update - I think Avanti is an awesome front-end

    Haven't installed it yet on Vista - when I do I'll let you know

    Yes, looks like the avisynth thing is fixed - renamed my avisynth folder back to the original - no problem

    By the way I have been doing some H264 encoding - seems to me that the latest ffmpeg versions use libx264 instead of just x264

    I was able to set up the codec database for h264/x264:
    avi DEVSDT h264 h264 AVI

    Used FFmpeg version SVN-r9017 which utilizes -vcodec h264
    Note: --enable-x264 but uses -vcodec h264 not -vcodec x264

    but when I tried the versions that use libx264 I couldn't get it work (I set it up similar to the syntax for libXvid)

    How would I set this up in the Codec database?

    Also how do I get h264/x264 to show up in the Codec drop-down menu?

    TIA
    Quote Quote  
  19. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    Originally Posted by wiseant
    By the way I have been doing some H264 encoding - seems to me that the latest ffmpeg versions use libx264 instead of just x264
    yes

    Originally Posted by wiseant
    but when I tried the versions that use libx264 I couldn't get it work (I set it up similar to the syntax for libXvid)
    what did you try?
    how did it fail?
    are you switching versions in avanti?
    or replacing the ffmpeg file?
    it's interesting/good to have a look at the advanced database manager when using different versions.

    Originally Posted by wiseant
    How would I set this up in the Codec database?
    Also how do I get h264/x264 to show up in the Codec drop-down menu?
    1. set the box beside the video 'codec' pulldown to "default" (my preference)
    2. click the video 'codec' dropdown menu and type a label e.g "x264", then press enter
    3. open database manager and register libx264 by setting 'ext' to "avi" and 'codec label' to "x264" (exactly the same as you entered in the drop down menu)
    note: if you set the box beside the video 'codec' pulldown to "AVI" (or anything else), you'd have to name the 'codec label' in the database like so: "x264 avi"

    Chris said he might change the codec registration so that the pulldown menu is automatically updated after the database update.

    gl
    Quote Quote  
  20. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Hi Wiseant,

    Originally Posted by wiseant
    Haven't installed it yet on Vista - when I do I'll let you know
    I'm very curious. It's a big change at the icons now. gif's instead of ico's. Other load system.

    Yes, looks like the avisynth thing is fixed - renamed my avisynth folder back to the original - no problem
    We did quite some research on it so lets hope it's solved forever.

    By the way I have been doing some H264 encoding - seems to me that the latest
    ffmpeg versions use libx264 instead of just x264

    I was able to set up the codec database for h264/x264:
    avi DEVSDT h264 h264 AVI

    Used FFmpeg version SVN-r9017 which utilizes -vcodec h264
    Note: --enable-x264 but uses -vcodec h264 not -vcodec x264

    but when I tried the versions that use libx264 I couldn't get it work (I set it up similar to the
    syntax for libXvid)
    There's a lot of name difference for the codecs with versions that come from all kind of places.
    Those from celtic-druids also lately dropped standard names like mp3 and changed it into Libmp3lame.
    This will always be a problem and you have to indeed modify the codecs database yourself now and then.

    How would I set this up in the Codec database?
    45tripp attended me on the unclearness of the docs and I'm going to work on that in the future. For the next version, I have this already changed at the "on-line" help when you have to register or modify a codec database entry.

    Code:
       To register a new "Codec label" at the database follow the next procedure:
    
       1. Search at the "FFmpeg codecs" column for the desired codec name.
    
       2. If it concerns a addition, insert a new codec entry with <Ctrl><Insert>
          and duplicate the codec name at the "FFmpeg codecs" column, else continue
          with step 3 using the codec entry you found.
    
       3. Paste "libx64 AVI" in the "Codec label" column.
    
       4. Modify the "Ext" column to the related file extension. 
    
       5. Modify the "DE*SDT" column according to the codecs (D)ecode, (E)ncode,     
          (A)udio or (V)ideo and other (SDT) capability.
    
       * You can have different labels to the same codec if it supports multiple
         output formats/containers (e.g. like mpeg4... ES=m4v, PS=mp4, avi, mov).
    .
    Also how do I get h264/x264 to show up in the Codec drop-down menu?
    This is actully where you start. Just overwrite the video codec selection field on the main window with a "codec label" name of your choice and then press enter. This will add the name to the end of the list and saves it in the ini file. Then if the system doesn't find this "Codec label" it asks to open the database <Ctrl>[B] and the help (something like above) will appear. Then follow the given steps. If you now re-select your added "codec label", the program should display "Database is up-to-date for your selection".

    Make a backup of the Avanti system files (main menu) now and then so ensure you can recall your additions if something goes wrong.

    Chris.
    Quote Quote  
  21. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Hi 45tripp,

    Originally Posted by 45tripp
    Chris said he might change the codec registration so that the pulldown menu is automatically updated after the database update.
    Good description you give on how it has to be done at the present. I need to do some thinking on how to simplify it. There are also some programatic flow problems to overcome. I think it gonna be a step-by-step procedure starting with the improved on-line help I will add to the new version.

    EDIT:
    3. open database manager and register libx264 by setting 'ext' to "avi" and 'codec label' to "x264" (exactly the same as you entered in the drop down menu)
    The program copies your new entry at the drop down selection to the clipboard so as a option you can also paste it into the "Codec label" field at the database. This will prevent errors because of typos.

    The change in templates to make them "user exchange proof" will in the new version also store the audio codec. I simply overlooked that in the present version. You can easily update your existing templates by loading/saving them once only.

    Chris.
    Quote Quote  
  22. Member
    Join Date
    Jun 2007
    Location
    Canada
    Search Comp PM
    Thanks 45tripp and Chris

    re the codec drop-down menu - I just added h264 to the .ini file

    re the libx264 - I tried just about every combination:
    avi libx264 h264 (lib) AVI
    avi x264 libx264 AVI
    avi h264 h264 (lib) AVI
    avi libx264 h264 (lib) AVI
    avi libx264 x264 (lib) AVI

    none of these worked with the three different ffmpeg versions I tried that use libx264

    the closest I got was when Avanti "registered" the syntax but ffmpeg crashed - this also happened when I used WinFF frontend and a batch file

    Any suggestions?

    As I mentioned, I got h264 to work with this:

    avi DE*SDT h264 h264 AVI
    (even though the ffmpeg configuration is "--enable-x264"

    I noticed that for ffmpeg versions that use "libXviD" the codec database uses:

    avi DEV Xvid Xvid (lib) AVI

    with either (lib) or (Lib)

    but the same "formula" doesn't seem to work with h264

    x264/h264 is working for me in Avanti but the version of ffmpeg I am using is either SVN-r9017 or SVN-r9079 - I can't get SVN-r9767 or later versions to work re h264

    And, lastly, I have been testing various h264 options - is anyone interested?

    Cheers,
    wiseant
    Quote Quote  
  23. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    EDITED:

    Originally Posted by wiseant
    can't get SVN-r9767 or later versions to work re h264
    These versions only support the codec name libx264 for encode (h264 still for decode). I'm not a expert on it but is there a difference in x264, h264 and e.g. libx264 or is it only a matter of naming?

    What name you type for "codec label" doesn't matter. "Lib" or "lib" is just as good because the search is not case sensitive. If you enter "My 264 codec" it's also ok. It's just your own label that refers to the real codec name (and related data) in the database.
    Only thing that matters is that you enter your label exactly the same at the "codec label" field in the database and add the container type to it that you selected on the main screen. For the example it would be
    "My 264 codec AVI". In the database this should be entered as:

    | avi | EV | libx264 | My 264 codec AVI | Y | my comment. |

    At the "M" column you can set if the codec Y/N supports 2-pass encoding (optional). For some codecs FFMpeg writes a empty log and it would be wasted time. If it's set to N, then Avanti will warn you when you select 2-pass encoding for it.

    And, lastly, I have been testing various h264 options - is anyone interested?
    Of course! Please post it.

    Chris.
    Quote Quote  
  24. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    it does work, i've tried

    Originally Posted by wiseant
    the closest I got was when Avanti "registered" the syntax but ffmpeg crashed - this also happened when I used WinFF frontend and a batch file
    Take it straight to the commandline,
    and check ffmpeg output

    gl
    Quote Quote  
  25. Member
    Join Date
    Jun 2007
    Location
    Canada
    Search Comp PM
    Hey Chris and 45tripp:

    I installed the new version of Avanti on Vista - no problems - the icons show up on the top and do what they're supposed to do . . .

    Re libx264
    The only info I could find was from a ffmpeg forum - seems there has been a problem with libx264 - some versions crash on Intel other versions crash on AMD - too technical for my know-how - 'cause I don't compile ffmpeg or libx264 - but I did see that someone came up with a patch - but I did not know how to use it . . .


    here is a link:
    http://arrozcru.no-ip.org/ffmpeg_forum/viewtopic.php?t=621&highlight=libx264

    or:
    http://arrozcru.no-ip.org/ffmpeg_forum/search.php (to search specific topics)

    and here is another link;
    http://forum.doom9.org/showthread.php?t=129901&highlight=libx264
    Quote Quote  
  26. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Hi Wiseant,

    Originally Posted by wiseant
    I installed the new version of Avanti on Vista - no problems - the icons show up on the top and do what they're supposed to do . . .
    Thanks for checking and reporting it! Can you check if they are also on the "Advanced database manager"
    (three of them on top and then the blue button row).

    Re libx264
    The only info I could find was from a ffmpeg forum - seems there has been a problem with libx264 - some versions crash on Intel other versions crash on AMD - too technical for my know-how - 'cause I don't compile ffmpeg or libx264 - but I did see that someone came up with a patch - but I did not know how to use it . . .
    I tried the command line below from the first link and it doesn't crash on my machine (AMD Athlon XP2000+ only SSE1). I used FFmpeg SVN-r10464 from celtic-druids.

    Code:
     ffmpeg.exe -y -i "video.avi" -f mp4 -title "video" -timestamp "2007-09-06 08:12:34" -vcodec libx264
     -level 13 -s 320x240 -r 24000/1001 -b 768k -bt 768k -bufsize 2000k -maxrate 768k -g 250 -coder 0
     -acodec libfaac -ac 2 -ab 128k "video.mp4"
    Note that there's a bug in Avanti that doesn't let you cancel with a valid destination file when the x264 codec is used. You have to use "Limit encode duration" to get a short valid clip. The bug will be fixed in the next version.

    Chris.
    Quote Quote  
  27. Member
    Join Date
    Jun 2007
    Location
    Canada
    Search Comp PM
    Hey Chris and 45tripp

    This is what I found out about different versions of ffmpeg and mpeg4, xvid, and h264/x264 (at least on my P4 Dual Core Prescott): and using
    -ildct -ilme -top 1 [for interlaced encoding]

    1. SVN-r9017 - uses mpeg4, xvid, x264 (h264)
    can use -threads for xvid and h264 but not for mpeg4
    mpeg4: fps = 56 and Avinaptic says it is interlaced
    xvid (-threads 2): fps = 40 and Avinaptic says it is NOT interlaced
    xvid (w/o -threads): fps = 40 and Avinaptic says it is NOT interlaced
    h264 (w/o -threads): fps = 12 and Avinaptic doesn't give any interlaced info
    h264 (w -threads 3): fps = 15
    h264 (w -threads auto): fps = 15
    h264 (w -threads 4): fps = 15

    2. SVN-r9079 uses mpeg4, xvid, x264 (h264)
    can use -threads for xvid and h264 but not for mpeg4
    mpeg4: fps = 56 and Avinaptic says it is interlaced
    xvid (-threads 2): fps = 41 and Avinaptic says it is NOT interlaced
    xvid (w/o -threads): fps = 41 and Avinaptic says it is NOT interlaced
    h264 (w/o -threads): fps = 12 and Avinaptic doesn't give any interlaced info
    h264 (w -threads auto): fps = 15

    3. SVN-r9767 uses mpeg4, libxvid, libx264
    mpeg4: fps = 56 and Avinaptic says it is interlaced
    libxvid: fps = 41 and Avinaptic says it is NOT interlaced
    libxvid (-threads auto): fps = 40 and Avinaptic says it is NOT interlaced
    libx264: ffmpeg crashed
    libx264 (-threads auto): ffmpeg crashed

    4. ffmpeg_bin_pentium4-10629.zip
    uses mpeg4, libxvid, libx264
    mpeg4: fps = 52 and Avinaptic says it is interlaced [a little slower than r9017 and r9079]
    libxvid: fps = 41 and Avinaptic says it is NOT interlaced
    libxvid (-threads auto): fps = 41
    h264: - doesn't work
    libx264: fps = 12
    libx264 (-threads auto): fps =15 [doesn't work with -threads 2 or -threads 3]

    Conclusions:
    A. I find mpeg4 to be better than xvid (ffmpeg): it is faster - 56fps versus 40fps and it also appears that mpeg4 does proper interlaced encoding but xvid (ffmpeg) does not (tested it on my MPEG4 standalone)
    B. - threads crashed mpeg4 and does not improve encoding speed for xvid, but does improve encoding speed for x264
    C. the only recent ffmpeg version that I know of that uses libxvid and libx264 and that does not crash duo-core is ffmpeg_bin_pentium4-10629.
    The same may apply re ffmpeg_bin_athlon64-10629.zip re Athlon processor (but I haven't check this as yet)

    Also, using

    -vcodec mpeg4 -vtag xvid

    produces "xvid" fourcc

    Cheers
    Quote Quote  
  28. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    well,
    i'm sure this is why Chris added the option to easily switch ffmpeg versions within avanti.
    not had any problems myself.

    Why?
    why interlaced?
    common practice is to deinterlace, for mpeg4 output.
    there might be a reason or two not to deinterlace...

    Originally Posted by wiseant
    -ildct -ilme -top 1 [for interlaced encoding]
    these are lavc options.
    they do nothing for xvid.
    as far as i can see, there's no access to advanced xvid options within ffmpeg.
    you can set "interlacing" in mencoder or use the xvid commandline encoder, or just use vfw...

    Originally Posted by wiseant
    A. I find mpeg4 to be better than xvid (ffmpeg): it is faster - 56fps versus 40fps
    I've seen the case made for both.
    speed is dependent on settings...
    but speed is certainly reason enough for preference.

    Originally Posted by wiseant
    C. the only recent ffmpeg version that I know of that uses libxvid and libx264 and that does not crash duo-core is ffmpeg_bin_pentium4-10629.
    one could argue there's no need for xvid in there.
    people were bound to work around the crash problem sooner rather than later

    Originally Posted by wiseant
    Also, using
    -vcodec mpeg4 -vtag xvid
    produces "xvid" fourcc
    'DX50' is far more useful

    gl
    Quote Quote  
  29. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Hi Wiseant,

    Originally Posted by wiseant
    This is what I found out about different versions of ffmpeg and mpeg4, xvid, and h264/x264 (at least on my P4 Dual Core Prescott): and using
    -ildct -ilme -top 1 [for interlaced encoding]
    I find all measurements rather slow for a dual core at 3Ghz. Perhaps it's because of the ildct -ilme -top 1.
    I used the settings from the command line of the link you gave and on my old AMD 1.7Ghz, I was supprised that even libx264 was reasonably fast. 12 fps without dual core. Well, there seems to be bugs in the latest FFmpeg versions that have to do with SSE2 and SSE3.

    When I encode a mp4 with the libx264 codec and look at the header of the mp4, this is in it:

    libfaac 1.26.1 (May 20 2007) UNSTABLE

    I have no problems with it but that's probably because I run it on the AMD with only SSE1. I think we shouldn't expect to much from it as long as the FFmpeg experts can't get it to work on SEE2 and SSE3 machines.

    I found some weird things about the libx264 codec. When I tried to encode 2-pass, FFmpeg wrote a empty log so I assumed that the libx264 codec didn't support 2-pass.
    Then a while later I found three logs named "x264_2pass.log" spread all over my HD. I always encode to the same directory where I also found the empty FFmpeg log.
    Then I found that the libx264 codec writes its logs to any directory that is current at the moment you start FFmpeg. I found one in the FFmpeg folder, in the install direcory of Avanti and in the source folder of the file I was encoding but never in the destination folder that is passed to FFMpeg (where it still writes the x264 final second pass file).

    It's really a mess with the 2-pass logs of FFmpeg. I now already found three different types of it.

    1. The "normal" FFmpeg which is controlable with the -passlogfile command.

    2. The xvid which is always written to the Windows temp directory as numbered copies that never will be overwritten or deleted automatically.

    3. The libx264 who seems to ramble around on my HD.

    So what's still to come from FFMpeg?

    I found something for Avanti to redirect it to the destination directory but don't know yet if it has any side-effect on Avanti itself. Have to test for a longer period.

    About the difference between mpeg4 and xvid. After doing some tests lately, I prefer xvid above mpeg4 but I'm not a practical user of these formats (mainly mpeg2).
    I have a DVD player that supports divx but only use it for tests. This way I found that FFmpeg isn't usable to MUX mpeg4 (divx) and mpeg2. Mpeg2 is always out of sync and divx plays on my computer but not on my stand-alone player. The -vcodec copy option of FFmpeg isn't much more than what it's called, I believe.

    Chris.
    Quote Quote  
  30. Member
    Join Date
    Jun 2007
    Location
    Canada
    Search Comp PM
    Hey Chris

    I can't remember the list of filters that caused problems with avisynth/Avanti, but I found the one that was causing my avisynth/avanti problem:

    CondTemporalMedian-gen.dll and CondTemporalMedian-isse.dll

    Either of these filters required "avisynth_c.dll"
    Quote Quote  



Similar Threads

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