• “创新从来都是九死一生”(人民论坛) 2019-02-14
  • 端午假期广州铁路运客640.5万人次 创历史新高 2019-02-14
  • 19次生态输水让塔河下游生机勃勃 2018-11-22
  • 男篮再胜伊朗迎热身赛两连胜 任骏飞19+11陶汉林18分 2018-11-22
  • 小卒子,你南街村的代言人啊?扮豬不咋像呢!你滴,大大滴,明白? 2018-11-22
  • 女性之声——全国妇联 2018-11-21
  • 新华网评:凝聚打赢脱贫攻坚战的强大合力 2018-11-21
  • 栗战书:执法检查要直面问题不搞评功摆好 让法律制度成为不可触碰的高压线 2018-11-21
  • 这些水果越新鲜越不能吃 放一放更好吃 2018-11-21
  • 生产资料公有制不会也不可能涉及生产资料的分配,这完全是你杜撰的,是强词夺理的。从这点看,你的所谓逻辑是幼稚可笑的。哈哈哈哈! 2018-11-20
  • 践行“两山论”是一场发展的革命 2018-11-20
  • 女教师舍身保护学生被撞身亡感动各界 2018-11-20
  • Welcome to

    Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

     

    Go Back   Doom9's Forum > Video Encoding > MPEG-4 ASP

    Reply
     
    Thread Tools Search this Thread Display Modes
    Old 17th September 2018, 14:23   #1  |  Link
    Registered User
     
    Join Date: Sep 2018
    Posts: 9
    StaxRip how to make divx-home certified stream with xvid encraw?

    I found this document that explain the limits of each profile of divx certified logo.

    //www.divx.com/files/DivX-Profiles_Tech-Specs.pdf

    I want to make compliant AVI using staxrip and xvidencraw, with the best settings possible.

    For example i can't understand if i respect maximum value for
    Macroblocks [40 500 bps]
    VBV Buffer [384 kB]
    VBV Bitrate [4854 kbps]



    The string in staxrip that i try to build is (for CQ encoding):

    xvid_encraw -vbvsize 3145728 -vbvmax 4854000 -vbvpeak 40500 ?? -cq 2 -smoother 0 -max_key_interval 250 -vhqmode 4 -bvhq -quality 6 -qtype 0 -masking 2 -nopacked -max_bframes 1 -bquant_ratio 162 -bquant_offset 0 -threads 1 -i "%script_file%" -avi "%encoder_out_file%" -par %target_sar%

    -vbvpeak is macroblocks?!
    Is the right way to proceed ?!
    martynuzza is offline   Reply With Quote
    Old 17th September 2018, 18:52   #2  |  Link
    Life looks better in UHD
     
    SeeMoreDigital's Avatar
     
    Join Date: Jun 2003
    Location: Notts, UK
    Posts: 11,382
    Wow... Out of interest, what's the make and model of your hardware player?
    __________________
    | I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
    SeeMoreDigital is offline   Reply With Quote
    Old 17th September 2018, 19:32   #3  |  Link
    Registered User
     
    Join Date: Sep 2018
    Posts: 9
    Not for me. For friends and people that has old panasonic\lg or systems like integrated tv and projector with usb that can't reproduce anything else than avi-divxhome.

    For now, i kept a WinXP machine for doing the job using the lastest DivX codec 6.8.5 and old staxrip, but now i upgraded to win10 and i want a more simple integrated and flawless workflow. Staxrip accomplish my needs very well but new version doesn't have vfw (so divx) anymore.

    I've made some encodings for test with standard settings for xvid and try to reproduce to a "strict" projector...not work...( maybe because the FourCC..i'm not investigate further...)

    Last edited by martynuzza; 17th September 2018 at 19:34.
    martynuzza is offline   Reply With Quote
    Old 17th September 2018, 19:55   #4  |  Link
    Life looks better in UHD
     
    SeeMoreDigital's Avatar
     
    Join Date: Jun 2003
    Location: Notts, UK
    Posts: 11,382
    If you require compatibility with old gear you're probably better off generating 'SP' (Simple Profile) encodes (ie: encodes without b-frames). 'MPEG4 SP (Simple) @L5' should work okay...

    If the old gear can handle 'ASP' (Advanced Simple Profile) encodes with b-frames, try generating encodes with one (not two or more consecutive) b-frames(s). And select the 'Packed bit-stream' option.
    __________________
    | I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
    SeeMoreDigital is offline   Reply With Quote
    Old 18th September 2018, 23:33   #5  |  Link
    Registered User
     
    Join Date: Sep 2007
    Location: Italy
    Posts: 3
    Quote:
    Originally Posted by martynuzza View Post

    -vbvpeak is macroblocks?!
    No, isn't macroblocks.

    Macroblock is video resolution dependent:

    Macroblock rate [Mbs/sec] = Resolution/(macroblock dimension)*frame rate.
    For Xvid/Divx Home profile (up to) 40500 mbs/sec = (720*576)/(16*16)*25 for PAL videos; (720*480)/(16*16)*30 for NTSC videos.

    vbvpeak is "Max bits over any one second interval" in Xvid interface (your posted image). For Home Profile, it's "8000000" (not 40500).

    I'm not sure, but vbvpeak is not very important (is for codec internal check only) and in official MPEG-4 SP/ASP profiles is absent. VBVpeak is satisfied already with others vbv parameters: Max bitrate and Buffer size of Home profile.

    In Divx Profiles table in your post, matrix for Home Teather is, theoretically, h.263 only, but you can to use MPEG matrix too, "standard" (not "custom"). MPEG standard and H.263 are fully Standalone player compatible.
    Note: That table I think is not fully correct: example: VBV size of HD 720p profile is not 2048 kB (this is for 1080p only); actually it is 768 kB (9708 kbps double bitrate of HT profile... so must be double size of HT vbv size too ) In Xvid interface all these values are correct for 'equivalents' DivX profiles too.

    Last edited by blob2500; 19th September 2018 at 01:28. Reason: ...about macroblock/sec and matrix
    blob2500 is offline   Reply With Quote
    Old 19th September 2018, 13:41   #6  |  Link
    Registered User
     
    Join Date: Sep 2018
    Posts: 9
    ook

    Now, what about...that?
    -nopacked
    -max_bframes 1

    XviD VFW interface keep no restriction on that but should do so.

    I remember that the bitstream should to be, instead, packed and with only 1 b-frame allowed at maximum.

    ...

    I tried a sample conversion with DivX Converter with codec 6.8.5 and him makes a packed bitstream...so this should be the correct way.

    Right?
    martynuzza is offline   Reply With Quote
    Old 19th September 2018, 14:15   #7  |  Link
    Life looks better in UHD
     
    SeeMoreDigital's Avatar
     
    Join Date: Jun 2003
    Location: Notts, UK
    Posts: 11,382
    If the playback devices are only able to support MPEG-4 SP/ASP streams with b-frames placed within the .avi container, ideally you will need to use 'pack bit-stream'.

    However, if the playback devices are able to support MPEG-4 SP/ASP streams with b-frames placed within the .mp4 container, you wont need to use 'pack bit-stream'.

    If you haven't done-so already, try creating some short .avi and .mp4 test sample files.

    That said, if I can find them, I might be able to provide you with some short .avi and .mp4 test sample files...


    Cheers
    __________________
    | I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
    SeeMoreDigital is offline   Reply With Quote
    Old 19th September 2018, 15:56   #8  |  Link
    Registered User
     
    Join Date: Sep 2018
    Posts: 9
    Solved

    Only AVI Only Packed just tried

    In summary, the correct string is (i made some small personal modification with zones)
    Quote:
    xvid_encraw -vbvsize 3145728 -vbvmax 4854000 -vbvpeak 8000000 -max_bframes 1 -qtype 0 -cq 2 -smoother 0 -vhqmode 4 -quality 6 -masking 2 -bvhq -bquant_ratio 162 -bquant_offset 0 -zones 0,w,1.0,O -i "%script_file%" -avi "%encoder_out_file%" -par %target_sar%
    For now it's ok but I'll have to write to the author of staxrip to ask him how to activate the 2-pass mode...this is another story

    martynuzza is offline   Reply With Quote
    Old 20th September 2018, 01:39   #9  |  Link
    Registered User
     
    Join Date: Sep 2007
    Location: Italy
    Posts: 3
    Quote:
    Originally Posted by martynuzza
    I remember that the bitstream should to be, instead, packed and with only 1 b-frame allowed at maximum.
    It's true for DivX Home profile full compatibility. 1 b-frame + Packed Bitsream is safest choice.

    Every old Standalone Player support 2 consecutive b-frame too, but the problem is combination of 2 b-frames with (or without) Packed Bitstream. Almost all support 2 B-frame without PB; others support 2 B-frame but with PB.

    Last edited by blob2500; 20th September 2018 at 01:47.
    blob2500 is offline   Reply With Quote
    Old 20th September 2018, 05:00   #10  |  Link
    Registered User
     
    Revan654's Avatar
     
    Join Date: May 2004
    Posts: 286
    Quote:
    Originally Posted by martynuzza View Post
    Only AVI Only Packed just tried

    In summary, the correct string is (i made some small personal modification with zones)


    For now it's ok but I'll have to write to the author of staxrip to ask him how to activate the 2-pass mode...this is another story

    He's retired, I think I'm the only one who has added functions to the code since.

    It should be:

    -pass1 [file]
    -pass2 [file]

    -pass1full is disabled.

    Doesn't the help function enable when you click on it?
    Revan654 is offline   Reply With Quote
    Old 20th September 2018, 15:15   #11  |  Link
    Registered User
     
    Join Date: Sep 2018
    Posts: 9
    Quote:
    Originally Posted by Revan654 View Post
    Doesn't the help function enable when you click on it?
    mmmmmmmm what?

    hmm...which parameters? i can't understand how xvid_encraw get the parameters of pass1 to create final pass2



    For example, bitrate at 1800kbps, is correct the syntax?
    Quote:
    xvid_encraw -pass1 TEST.PASS_1 -max_bframes 1 -qtype 0 -bitrate 1800 -smoother 0 -max_key_interval 250 -vhqmode 4 -quality 6 -masking 2 -bvhq -bquant_ratio 162 -bquant_offset 0 -zones 0,w,1.0,O -i "%script_file%" -par %target_sar%

    xvid_encraw -pass2 TEST.PASS_1 -vbvsize 3145728 -vbvmax 4854000 -vbvpeak 8000000 -max_bframes 1 -qtype 0 -bitrate 1800 -smoother 0 -max_key_interval 250 -vhqmode 4 -quality 6 -masking 2 -bvhq -bquant_ratio 162 -bquant_offset 0 -zones 0,w,1.0,O -i "%script_file%" -avi "%encoder_out_file%" -par %target_sar%

    Last edited by martynuzza; 20th September 2018 at 15:17.
    martynuzza is offline   Reply With Quote
    Old 20th September 2018, 19:40   #12  |  Link
    Registered User
     
    Revan654's Avatar
     
    Join Date: May 2004
    Posts: 286
    Quote:
    Originally Posted by martynuzza View Post
    mmmmmmmm what?

    hmm...which parameters? i can't understand how xvid_encraw get the parameters of pass1 to create final pass2



    For example, bitrate at 1800kbps, is correct the syntax?
    It's been ages since I actually used XviD, I'm a bit rusty when using XviD.

    It should be something like this

    -pass1 src.pass
    -pass2 src.pass -avi dst.avi
    or with macro
    -pass2 src.pass -avi "%encoder_out_file%"

    Only the second pass requires the -avi and .avi file location output.

    The encoder will pull in the .pass file which contains all the needed information. First pass writes to .pass and second pass reads the .pass.

    ------

    You can also use ffmpeg XviD as well, with does most of the work for you already. It has 2-pass mode built in and will add the proper flags for the passes.

    Last edited by Revan654; 20th September 2018 at 19:43.
    Revan654 is offline   Reply With Quote
    Old 20th September 2018, 21:23   #13  |  Link
    Life looks better in UHD
     
    SeeMoreDigital's Avatar
     
    Join Date: Jun 2003
    Location: Notts, UK
    Posts: 11,382
    Hi @martynuzza,

    How about looking at different encoder GUI's. MeGUI has plenty of support on this forum and offers an XviD 'scratchpad' encoding option
    __________________
    | I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
    SeeMoreDigital is offline   Reply With Quote
    Old 25th September 2018, 08:13   #14  |  Link
    Registered User
     
    Join Date: Sep 2018
    Posts: 9
    mmm I never used megui, seems to be a good program, I downloaded it and I'm trying it; at first sight I can't see filter preview or a function to add hardcoded subtitles or a setting to select a custom drc compression level in audio. I think I will use it

    Also I noticed that staxrip has the old codec xvid 1.3.3 instead of 1.3.5; I tried to overwrite the new version over but brings to error for complaining about missing yv12 input
    martynuzza is offline   Reply With Quote
    Old 25th September 2018, 19:40   #15  |  Link
    Registered User
     
    Revan654's Avatar
     
    Join Date: May 2004
    Posts: 286
    Quote:
    Originally Posted by martynuzza View Post
    mmm I never used megui, seems to be a good program, I downloaded it and I'm trying it; at first sight I can't see filter preview or a function to add hardcoded subtitles or a setting to select a custom drc compression level in audio. I think I will use it

    Also I noticed that staxrip has the old codec xvid 1.3.3 instead of 1.3.5; I tried to overwrite the new version over but brings to error for complaining about missing yv12 input


    StaxRip already uses 1.3.5, If you have 1.3.3 you must have downloaded a older build of StaxRip.

    Code:
    xvidcore build version: xvid-1.3.5
    Bitstream version: 1.3.5
    I found MeGui way to limited, when it comes to filters & Encoding. After all these years x64 version is still listed as a test build.

    Hybrid & StaxRip were always my go to Encoders. I mainly use Hybrid on Linux(One few Encoders that's fully support in Linux). With StaxRip being my Main Windows Encoder.

    Last edited by Revan654; 25th September 2018 at 19:45.
    Revan654 is offline   Reply With Quote
    Reply


    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT +1. The time now is 06:47.


    Powered by vBulletin® Version 3.8.11
    Copyright ©2000 - 2019, vBulletin Solutions Inc.
  • “创新从来都是九死一生”(人民论坛) 2019-02-14
  • 端午假期广州铁路运客640.5万人次 创历史新高 2019-02-14
  • 19次生态输水让塔河下游生机勃勃 2018-11-22
  • 男篮再胜伊朗迎热身赛两连胜 任骏飞19+11陶汉林18分 2018-11-22
  • 小卒子,你南街村的代言人啊?扮豬不咋像呢!你滴,大大滴,明白? 2018-11-22
  • 女性之声——全国妇联 2018-11-21
  • 新华网评:凝聚打赢脱贫攻坚战的强大合力 2018-11-21
  • 栗战书:执法检查要直面问题不搞评功摆好 让法律制度成为不可触碰的高压线 2018-11-21
  • 这些水果越新鲜越不能吃 放一放更好吃 2018-11-21
  • 生产资料公有制不会也不可能涉及生产资料的分配,这完全是你杜撰的,是强词夺理的。从这点看,你的所谓逻辑是幼稚可笑的。哈哈哈哈! 2018-11-20
  • 践行“两山论”是一场发展的革命 2018-11-20
  • 女教师舍身保护学生被撞身亡感动各界 2018-11-20