• 隐私条款中国国家地理网 2019-08-10
  • 500亿美元商品相关新闻 2019-08-10
  • 研究:亚洲民众更关注健康食品 2019-08-06
  • 持之以恒打好“节点战” 2019-08-06
  • 英国成功完成机器人辅助眼部手术试验 2019-08-01
  • 户口迁移耽搁了17年 诸暨籍女子找回“迟到”的身份 2019-07-29
  • 明星高考奇葩事杨幂总分第一 赵薇丢准考证(组图) 2019-07-02
  • 肩负促进和平与发展的时代重任 2019-07-02
  • 探秘海南高考评卷场 考生答题卡武警24小时值守 2019-06-28
  • “人民日报是我一生最尊敬和宝贵的朋友” 2019-06-28
  • 惊艳卢浮宫小牛电动发布新款电动车惊艳卢浮宫小牛电动发布新款电动车-手机行情 2019-06-23
  • 社区 —频道 春城壹网 七彩云南 一网天下 2019-06-15
  • 全国网络举报工作会议 2019-06-15
  • 珍贵!“国宝”林麝现身重庆金佛山 2019-06-11
  • 亚冠前瞻:恒大权健皆不容有失 两将伤情成上港争胜关键 2019-06-09
  • 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 > Capturing and Editing Video > Avisynth Usage

    Reply
     
    Thread Tools Search this Thread Display Modes
    Old 11th July 2019, 09:20   #1  |  Link
    Registered User
     
    Join Date: Dec 2018
    Posts: 35
    How to encode 720p, 25fps BD compliant ?

    hello,

    when I encode 720p HD sources with 29,97 to BD compilant 720p sources I usually use changefps(59.94) in Avisynth and make a 720p59.94 x264 encode.

    This time time I have a 25fps 720p HD source so I want to go for the 720p50 specification but somehow changefps(50.00) doesn't work. I get an error and don't understand why this is a wrong divisor?
    There is also the possibility to not use the avisynth fps command and just go for a
    720p25, which (according to //www.x264bluray.com/home/720p-encoding) doubles the framerate with the "--pulldown double preset".
    The encode works fine but plays with 50% more speed which is totally senseless.

    Any advice is appreciated
    thanks
    regards
    Metal-HTPC is offline   Reply With Quote
    Old 11th July 2019, 15:05   #2  |  Link
    Registered User
     
    Join Date: Oct 2018
    Posts: 1
    Does it even have 50 original frames?
    junah is offline   Reply With Quote
    Old 11th July 2019, 16:29   #3  |  Link
    Registered User
     
    Join Date: May 2006
    Posts: 3,477
    What is the (avisynth) error you are getting?
    --pulldown double encode with wrong playback speed: Do you watch the .264 raw stream? If so, mux it into a container (.mkv, .mp4, .m2ts) and set the framerate to 50fps

    Upload a sample (few seconds duration) of your source so someone can take a look.

    Last edited by Sharc; 11th July 2019 at 16:53.
    Sharc is offline   Reply With Quote
    Old 11th July 2019, 18:56   #4  |  Link
    Registered User
     
    Join Date: Oct 2002
    Location: France
    Posts: 1,747
    Quote:
    Originally Posted by Sharc View Post
    --pulldown double encode with wrong playback speed:
    Is it a bug un x264 ? In that case, it has to be reported.
    __________________
    My github.
    jpsdr is offline   Reply With Quote
    Old 11th July 2019, 21:32   #5  |  Link
    Registered User
     
    Join Date: May 2006
    Posts: 3,477
    Quote:
    Originally Posted by jpsdr View Post
    Is it a bug un x264 ? In that case, it has to be reported.
    Not as I know. The OP might however have a problem with the player, hence my recommendation to mux the .264 video stream into a container for playback. Just a thought.
    Btw. exactly the same topic is discussed in the videohelp forum as well …….
    Sharc is offline   Reply With Quote
    Old 11th July 2019, 21:58   #6  |  Link
    Broadcast Encoder
     
    FranceBB's Avatar
     
    Join Date: Nov 2013
    Location: Germany
    Posts: 634
    25p should be accepted and it shouldn't speed the video up by 50%.
    Encode a few minutes like so by only using an indexer:

    x264 --bitrate 25000 --preset veryslow --tune film --bluray-compat --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 25 --open-gop --slices 4 --pulldown double --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --pass 1 -o "out.264" "AVS_Script.avs"

    x264 --bitrate 25000 --preset veryslow --tune film --bluray-compat --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 25 --open-gop --slices 4 --pulldown double --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --pass 2 -o "out.264" "AVS_Script.avs"

    Otherwise, with Avisynth you can do something like:

    Code:
    ConvertFPS(50)
    assumeTFF()
    separatefields()
    selectevery(4,0,3)
    weave()
    and then encode everything as 25i:

    x264 --bitrate 25000 --preset veryslow --tune film --bluray-compat --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 25 --open-gop --slices 4 --tff --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --pass 1 -o "out.264" "AVS_Script.avs"

    x264 --bitrate 25000 --preset veryslow --tune film --bluray-compat --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 25 --open-gop --slices 4 --tff --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --pass 2 -o "out.264" "AVS_Script.avs"


    Last but not least, you can try 50p by using FFMpegSource2 as indexer and setting fpsnum 50000, fpsden 1000 like so:

    Code:
    FFMpegSource2("source.m2ts", fpsnum=50000, fpsden=1000, atrack=-1)
    and then encode everything as 50p:

    x264 --bitrate 25000 --preset veryslow --tune film --bluray-compat --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 50 --open-gop --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --pass 1 -o "out.264" "AVS_Script.avs"

    x264 --bitrate 25000 --preset veryslow --tune film --bluray-compat --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 50 --open-gop --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --pass 2 -o "out.264" "AVS_Script.avs"
    __________________
    Broadcast Encoder
    LinkedIn

    Last edited by FranceBB; 11th July 2019 at 22:01.
    FranceBB is offline   Reply With Quote
    Old 11th July 2019, 22:24   #7  |  Link
    Registered User
     
    Join Date: May 2006
    Posts: 3,477
    Quote:
    Originally Posted by FranceBB View Post
    ? and then encode everything as 25i: ?..
    720 must be progressive for Blu-ray compliance.
    Sharc is offline   Reply With Quote
    Old 12th July 2019, 02:37   #8  |  Link
    Broadcast Encoder
     
    FranceBB's Avatar
     
    Join Date: Nov 2013
    Location: Germany
    Posts: 634
    Ah, right, right, only 1080i is compliant so he would have to upscale as well... possibly with Spline36 or Spline64Resize in that case... (or NNEDI + Spline).
    __________________
    Broadcast Encoder
    LinkedIn
    FranceBB is offline   Reply With Quote
    Old 12th July 2019, 10:03   #9  |  Link
    Registered User
     
    Join Date: Dec 2018
    Posts: 35
    It doesn't matter if I chose "changefps(50.00)" "changefps("pal_double") or "changefps(50, 1)" it always leads to the error "error: Evaluate: System exception - Integer Divide by Zero"
    The commandline I used was
    Quote:
    --bluray-compat --level 4.1 --keyint 50 --sar 1:1 --slices 4 --vbv-bufsize 30000 --vbv-maxrate 40000 --b-pyramid none --weightp 0 --colorprim bt709 --transfer bt709 --colormatrix bt709 --merange 24
    according to //www.x264bluray.com/home/720p-encoding the blu-ray specification for 720p 25fps blu-rays has to be done using the "--pulldown double" command which makes 50 out of the 25fps. The problem is that this command doesn't work here because it doubles the playback speed. If a 720p 25fps blu ray without the framerate duplication is supported as well then I give it a try. Thanks so far guys and a good weekend
    Metal-HTPC is offline   Reply With Quote
    Old 12th July 2019, 11:45   #10  |  Link
    Registered User
     
    Join Date: Dec 2002
    Location: Region 0
    Posts: 1,129
    Doubles the playback speed on what software / hardware?
    Stereodude is offline   Reply With Quote
    Old 12th July 2019, 21:23   #11  |  Link
    Broadcast Encoder
     
    FranceBB's Avatar
     
    Join Date: Nov 2013
    Location: Germany
    Posts: 634
    Quote:
    Originally Posted by Metal-HTPC View Post
    It doesn't matter if I chose "changefps(50.00)" "changefps("pal_double") or "changefps(50, 1)" it always leads to the error "error: Evaluate: System exception - Integer Divide by Zero"
    Can't you just let the indexer duplicate frames to 50fps progressive?

    Code:
    FFMpegSource2("source.m2ts", fpsnum=50000, fpsden=1000, atrack=-1)
    __________________
    Broadcast Encoder
    LinkedIn
    FranceBB is offline   Reply With Quote
    Old 13th July 2019, 05:04   #12  |  Link
    Registered User
     
    Join Date: Oct 2012
    Posts: 5,778
    the normal none BD spec doesn't have 25p at all it is either 720p50 or 1080i50 and well yeah 1440x1080i50. which the tp well knows.

    is 720 uspcale to 1080 an option for you?
    if yes all you need is now set the fake-interlaced flag for x264 and you are done.

    Quote:
    error: Evaluate: System exception - Integer Divide by Zero
    can you just as a test try this:

    assumeFPS(25)
    changeFPS(50)
    huhn is offline   Reply With Quote
    Old 16th July 2019, 19:29   #13  |  Link
    Registered User
     
    Join Date: Dec 2018
    Posts: 35
    Quote:
    Originally Posted by huhn View Post
    is 720 uspcale to 1080 an option for you?
    if yes all you need is now set the fake-interlaced flag for x264 and you are done.
    The stream recording hasn't the greatest quality to begin with so bloating it to a higher resolution doesn't make much sense but if I don't have any other choice..
    Quote:
    Originally Posted by huhn View Post
    can you just as a test try this:
    assumeFPS(25)
    changeFPS(50)
    "changeFPS(50)" also gives me the "integer devide by zero" error

    shure assumeFPS(25) works but sadly 25fps isn't allowed in a 720p BD compilant encode

    Code:
    FFMpegSource2("source.m2ts", fpsnum=50000, fpsden=1000, atrack=-1)
    I use DGAVCindex as an indexer. Didn't use FFMpeg for that before but could give it a try.

    I just noticed something weird tho. The framerate of the source is specified different depending on which application I use.
    DGAVCindex and MPC-HD shows it as 25fps which seems right because Belium is a PAL country and should therefore stream PAL. Tmpegenc smart renderer recognises it as 30 fps and tsmuxter as "unknown frame rate".
    If this isn't 25fps then somethings very strange.

    But before I continue to break my head. here is a sample for you

    https://we.tl/t-ZhbKzDeUpW

    thanks in advance for the help

    Last edited by Metal-HTPC; 22nd July 2019 at 10:12.
    Metal-HTPC is offline   Reply With Quote
    Old 22nd July 2019, 10:11   #14  |  Link
    Registered User
     
    Join Date: Dec 2018
    Posts: 35
    anyone?
    Metal-HTPC is offline   Reply With Quote
    Old 22nd July 2019, 10:32   #15  |  Link
    Registered User
     
    Join Date: Dec 2002
    Posts: 5,438
    Code:
    BlankClip(fps=25)
    ChangeFPS(50)
    Same error?

    Please run AviSynth Info Tool or avsmeter -avsinfo and avsmeter "script.avs".

    //www.zs-x.com/showthread.php?t=174797
    //www.zs-x.com/showthread.php?t=176079
    sneaker_ger is offline   Reply With Quote
    Old 22nd July 2019, 10:56   #16  |  Link
    Registered User
     
    Join Date: May 2006
    Posts: 3,477
    No problem here.
    Changefps(50) duplicates the frames, as expected.

    Perhaps reinstall your Avisynth.
    Sharc is offline   Reply With Quote
    Old 23rd July 2019, 04:29   #17  |  Link
    Broadcast Encoder
     
    FranceBB's Avatar
     
    Join Date: Nov 2013
    Location: Germany
    Posts: 634
    Quote:
    Originally Posted by Sharc View Post
    No problem here.
    Changefps(50) duplicates the frames, as expected.
    Yep, I just checked as well and it works absolutely fine.


    @Metal-HTPC... your source is a normal HD file in H.264 yv12 (4:2:0 planar) 8bit at 25fps CFR which has been already encoded by someone at a very low bitrate, therefore there are some pretty bad blocking artifacts as it's starved, like:



    Code:
    #indexing
    video=FFVideoSource("Candlemass - Graspop 2019.264")
    audio=FFAudioSource("Candlemass - Graspop 2019.aac")
    AudioDub(video, audio)
    
    #Clipping
    Limiter(min_luma=16, max_luma=235, min_chroma=16, max_chroma=240)
    
    #Blending
    ConvertFPS(50)
    
    #Loudness Correction
    ResampleAudio(48000)
    Normalize(0.22)
    Either duplicating frames with ChangeFPS(50) or blending with ConvertFPS(50) works absolutely fine. Link

    I won't send you back the encoded sample as it's 50 minutes long and the file would be too big to upload with a BD-Tier bitrate.
    For the records, whoever squeezed almost 1h of video in 500 MB, did a poor job: it's a concert and there are many dark scenes with strong lights which had to be encoded with attention; instead, someone just used random settings which made it look pretty bad, without details and even with blocking artifacts. Encoding it in BD with 25Mbit/s bitrate for BD compatibility is like giving a castle to a homeless person... well... you know what I mean.
    Anyway, I hope it helps.

    Cheers,
    Frank.
    __________________
    Broadcast Encoder
    LinkedIn

    Last edited by FranceBB; 23rd July 2019 at 04:38.
    FranceBB is offline   Reply With Quote
    Old 23rd July 2019, 09:54   #18  |  Link
    Registered User
     
    Join Date: Dec 2018
    Posts: 35
    Quote:
    Originally Posted by sneaker_ger View Post
    Code:
    BlankClip(fps=25)
    ChangeFPS(50)
    Same error?
    Please run AviSynth Info Tool or avsmeter -avsinfo and avsmeter "script.avs".
    //www.zs-x.com/showthread.php?t=174797
    //www.zs-x.com/showthread.php?t=176079
    I willl try those out to see what is wrong in my setup, thanks for the suggestion.
    Quote:
    Originally Posted by Sharc View Post
    ....................
    Perhaps reinstall your Avisynth.
    will do so but have to check what the above mentioned tools have to say.

    Quote:
    Originally Posted by FranceBB View Post
    ...............
    I won't send you back the encoded sample as it's 50 minutes long and the file would be too big to upload with a BD-Tier bitrate.
    For the records, whoever squeezed almost 1h of video in 500 MB, did a poor job: it's a concert and there are many dark scenes with strong lights which had to be encoded with attention; instead, someone just used random settings which made it look pretty bad, without details and even with blocking artifacts. Encoding it in BD with 25Mbit/s bitrate for BD compatibility is like giving a castle to a homeless person... well... you know what I mean.
    Anyway, I hope it helps.
    No problem at all.
    I know the quality is bad but this is the way they streamed it. I think they had to do it in order to make shure that the broadcast plays flawless. Those belgium festival streams never improved much over the years but they are still a better souvenir than nothing.
    Regarding making a BD out of it you are pretty much right. I should go for a x264 SD 720x576 resolution here and the show easily fits on a dvd-r or even a cd-r..
    Thanks for the help, guys. I'm away for a few days and try to get the problems fixed when I return. It shure looks like it's a problem with my setup.
    Metal-HTPC is offline   Reply With Quote
    Old 17th August 2019, 19:44   #19  |  Link
    Registered User
     
    Join Date: Dec 2018
    Posts: 35
    works fine now.

    The problem was that I still used DGindex and DGAVCindex which are outdated for years and seem to have problems with todays (weird) streams.

    I switched to FFVideo and now everything works fine.

    Thanks for the support guys !
    cheers
    Metal-HTPC is offline   Reply With Quote
    Old 17th August 2019, 22:40   #20  |  Link
    Registered User
     
    Join Date: Jul 2014
    Posts: 776
    DGAVCIndex is deprecated for years. DGIndex is intended for MPEG2 video in ES/VOB/Transport, where it continues to work very well.

    Not sure what you mean by "today's (weird) streams" but if it is AVC/HEVC/MPEG/VC1 in ES/Transport/Program Stream/MKV/MP4, and possibly with HDR, then DGDecNV is just for you!
    videoh 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 13:35.


    Powered by vBulletin® Version 3.8.11
    Copyright ©2000 - 2019, vBulletin Solutions Inc.
  • 隐私条款中国国家地理网 2019-08-10
  • 500亿美元商品相关新闻 2019-08-10
  • 研究:亚洲民众更关注健康食品 2019-08-06
  • 持之以恒打好“节点战” 2019-08-06
  • 英国成功完成机器人辅助眼部手术试验 2019-08-01
  • 户口迁移耽搁了17年 诸暨籍女子找回“迟到”的身份 2019-07-29
  • 明星高考奇葩事杨幂总分第一 赵薇丢准考证(组图) 2019-07-02
  • 肩负促进和平与发展的时代重任 2019-07-02
  • 探秘海南高考评卷场 考生答题卡武警24小时值守 2019-06-28
  • “人民日报是我一生最尊敬和宝贵的朋友” 2019-06-28
  • 惊艳卢浮宫小牛电动发布新款电动车惊艳卢浮宫小牛电动发布新款电动车-手机行情 2019-06-23
  • 社区 —频道 春城壹网 七彩云南 一网天下 2019-06-15
  • 全国网络举报工作会议 2019-06-15
  • 珍贵!“国宝”林麝现身重庆金佛山 2019-06-11
  • 亚冠前瞻:恒大权健皆不容有失 两将伤情成上港争胜关键 2019-06-09
  • 彩经网平台下载 下载秒速时时 玩时时彩什么平台最好 棒球比赛直播 888真人在线棋牌 双色球大小 今日足彩对阵 体彩20选5开奖走势图 快乐飞艇是那个博彩公司出的 老时时号码开奖结果 游戏厅捕鱼达人 快乐赛车app注册平台 新时时彩个位最大遗漏 山西时时彩快乐十分走势图 天津时时全国号码 极速五分彩票