• 《国家人文历史》往期杂志汇总 2019-04-22
  • 一师一团土地确权登记颁证工作全面展开 2019-04-14
  • 德州扑克赌场披“俱乐部”外衣 打竞技旗号难掩赌博实质 2019-04-12
  • 自治区党委召开常委(扩大)会议 陈全国主持 2019-04-12
  • 17年来首次!塔利班组织宣布停火3天 与阿富汗民众自拍 2019-04-04
  • 2022年冬奥会筹备进行时 2019-04-03
  • 人家80年前就造航母,我们现在才造航母,基础不一样。 2019-04-03
  • 葡萄牙首都上演城市节狂欢 2019-04-01
  • RED EARTH红地球展现自我丝绒唇膏全新发布 2019-03-24
  • 龙船礼 有讲究 百岁龙 抖精神 2019-03-17
  • 新加坡航空将开通 全球最长商业航线 2019-03-17
  • 传说中的自由飞“翔” 当厕所被狂风吹上天 2019-03-12
  • 导游强迫交易获刑 曾辱骂威胁强迫游客消费上万元--旅游频道 2019-03-09
  • 北京正式推出租赁型职工集体宿舍 每间居住人数不超8人 2019-03-09
  • 美元短线拉升 随后回吐涨幅 2019-03-07
  • 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 > VapourSynth

    Reply
     
    Thread Tools Search this Thread Display Modes
    Old 24th March 2019, 02:28   #1  |  Link
    Registered User
     
    Join Date: Mar 2019
    Location: in a U.S. colony plagued by a Financial Oversight Board
    Posts: 7
    How do I load a VapourSynth script within an international filepath into VirtualDub2?

    Hello, this is my first posting here on Doom9 and I seek some help regarding VirtualDub2 and VapourSynth:

    I have a VapourSynth script file (with an English filename) stored inside a folder that has a Japanese name on it. That script essentially loads a PNG image (also with English filename), repeats it 60 times, then uses std.Expr to reduce its colors from 24-bit RGB precision (RGB888) to 12-bit RGB precision (RGB444) by integer-dividing all its pixel RGB values by 16, then multiplying by 17:

    Code:
    import vapoursynth as vs
    import functools
    core = vs.get_core()
    # 24-bit RGB (RGB888)
    baselogo = core.imwri.Read(filename="Team Shanghai Alice.png")*60
    # Simulate 12-bit RGB (RGB444) by integer-dividing all RGB values by 16, then
    # multiplying them by 17
    rgb444logo = baselogo.std.Expr(expr=["x 16 /", "x 16 /", "x 16 /"])
    rgb888logo = rgb444logo.std.Expr(expr=["x 17 *", "x 17 *", "x 17 *"])
    
    rgb888logo.set_output()
    When I load that VPY file into VirtualDub2, rather than getting the logo, I get error frames with the following error message:

    Code:
    Read: ImageMagick error: libimwri.dll: UnableToOpenBlob 'C:\Users\couga\Desk
    top\鏉辨–筆roject\Team Shanghai Alice.png': No such file or directory @ erro
    r/blob.c/OpenBlob/3094
    Note that "鏉辨–?quot; above should have read instead "東方".

    I thought both VirtualDub2 and VapourSynth were Unicode-aware (my reason I migrated from AviSynth to VapourSynth was the latter's purported support for UTF-8), but it seems that this is not the case here. And I am running VirtualDub2 normally (not via Locale Emulator or any other AppLocale-like app).

    Any insight on this?

    Please note that the script code above has worked for me on pure-ASCII filepaths – an example is a test video I had uploaded to my YouTube channel:
    https://www.youtube.com/watch?v=NII8C-OueKc

    Thankee!

    Last edited by SilSinn9801; 17th April 2019 at 18:22. Reason: The correct RGB12-to-RGB24 conversion is multiplication by 17, such that #C3B→#CC33BB, not #C030B0
    SilSinn9801 is offline   Reply With Quote
    Old 24th March 2019, 03:09   #2  |  Link
    Registered User
     
    Join Date: Sep 2006
    Posts: 1,096
    Have you save your vpy with utf-8 encoding?
    lansing is offline   Reply With Quote
    Old 24th March 2019, 03:09   #3  |  Link
    Registered User
     
    Join Date: Sep 2007
    Posts: 3,758
    You can use ffms2 instead of imagemagick as the source filter
    eg
    Code:
    baselogo = core.ffms2.Source(r'C:\Users\couga\Desktop\東方Project\Team Shanghai Alice.png')*60
    poisondeathray is offline   Reply With Quote
    Old 24th March 2019, 03:28   #4  |  Link
    Registered User
     
    Join Date: Mar 2019
    Location: in a U.S. colony plagued by a Financial Oversight Board
    Posts: 7
    Quote:
    Originally Posted by lansing View Post
    Have you save your vpy with utf-8 encoding?
    Yes, it is UTF-8, otherwise the script would fail to load altogether, as the parser would encounter invalid UTF-8 bytes like FE and FF, so UTF-8 is mandatory.

    Quote:
    Originally Posted by poisondeathray View Post
    You can use ffms2 instead of imagemagick as the source filter
    eg
    Code:
    baselogo = core.ffms2.Source(r'C:\Users\couga\Desktop\東方Project\Team Shanghai Alice.png')*60
    I tried your code and now the script fails to load, giving me this error:

    Code:
    Avisynth open failure:
    Python exception: Source: No video track found
    
    Traceback (most recent call last):
     File "src\cython\vapoursynth.pyx", line 1927, in
    vapoursynth.vpy_evaluateScript
     File "src\cython\vapoursynth.pyx", line 1928, in
    vapoursynth.vpy_evaluateScript
     File
    "C:\Users\couga\Desktop\鏉辨柟Project\TeamShanghaiAlice.v
    py", line 5, in <module>
      baselogo = 
    core.ffms2.Source(r'C:\Users\couga\Desktop\鏉辨柟Project\Te
    am Shanghai Alice.png')*60
     File "src\cython\vapoursynth.pyx", line 1833, in
    vapoursynth.Function.__call__
    vapoursynth.Error: Source: No video track found
    SilSinn9801 is offline   Reply With Quote
    Old 24th March 2019, 03:30   #5  |  Link
    Registered User
     
    Join Date: Sep 2007
    Posts: 3,758
    You might be using a ffms2 version that does not support PNG . Try another version
    poisondeathray is offline   Reply With Quote
    Old 24th March 2019, 03:36   #6  |  Link
    Registered User
     
    Join Date: Mar 2019
    Location: in a U.S. colony plagued by a Financial Oversight Board
    Posts: 7
    Quote:
    Originally Posted by poisondeathray View Post
    You might be using a ffms2 version that does not support PNG . Try another version
    Can you show me a PNG-enabled, x64 version of ffms2.dll then? The one I got came from ffms2000-test8.7z:
    https://www.dropbox.com/s/snepd7t006...s2000-test8.7z
    which was listed on this Doom9 thread:
    //www.zs-x.com/archive/index.php/t-174469.html
    SilSinn9801 is offline   Reply With Quote
    Old 24th March 2019, 03:37   #7  |  Link
    Registered User
     
    Join Date: Sep 2007
    Posts: 3,758
    Yes, it works here with other ffms2 versions

    And I can replicate the error with ffms2-2.23.1-msvc, and ffms2000-test8 => these versions do not support PNG. And they are older, don't support newer codecs like AV1

    This one works, recent from 2019
    //www.zs-x.com/showthread.php?t=176198
    poisondeathray is offline   Reply With Quote
    Old 24th March 2019, 03:55   #8  |  Link
    Registered User
     
    Join Date: Mar 2019
    Location: in a U.S. colony plagued by a Financial Oversight Board
    Posts: 7
    I tried this new ffms2.dll and now it works! Thankee! Now back to work.
    SilSinn9801 is offline   Reply With Quote
    Old 26th March 2019, 17:02   #9  |  Link
    Beyond Kawaii
     
    Mystery Keeper's Avatar
     
    Join Date: Feb 2008
    Location: Russia
    Posts: 700
    Why would you need to load it into VirtualDub2 in the first place? You can open it with VapourSynth Editor, hook it to FFMPEG and encode with the codec of your choice.
    __________________
    ...desu!
    Mystery Keeper is offline   Reply With Quote
    Old 17th April 2019, 18:30   #10  |  Link
    Registered User
     
    Join Date: Mar 2019
    Location: in a U.S. colony plagued by a Financial Oversight Board
    Posts: 7
    Quote:
    Originally Posted by Mystery Keeper View Post
    Why would you need to load it into VirtualDub2 in the first place? You can open it with VapourSynth Editor, hook it to FFMPEG and encode with the codec of your choice.
    The most recent VirtualDub2 version I have also hooks up to FFMPEG and even x264 to export to MP4, although I still haven't figured out how to successfully do 2-pass encoding there, although that is a separate topic that should be best discussed on a separate VirtualDub (not VapourSynth) thread. But thankee anyway!
    SilSinn9801 is offline   Reply With Quote
    Reply

    Tags
    international filename, international filepath, unicode, vapoursynth, virtualdub2


    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 09:43.


    Powered by vBulletin® Version 3.8.11
    Copyright ©2000 - 2019, vBulletin Solutions Inc.
  • 《国家人文历史》往期杂志汇总 2019-04-22
  • 一师一团土地确权登记颁证工作全面展开 2019-04-14
  • 德州扑克赌场披“俱乐部”外衣 打竞技旗号难掩赌博实质 2019-04-12
  • 自治区党委召开常委(扩大)会议 陈全国主持 2019-04-12
  • 17年来首次!塔利班组织宣布停火3天 与阿富汗民众自拍 2019-04-04
  • 2022年冬奥会筹备进行时 2019-04-03
  • 人家80年前就造航母,我们现在才造航母,基础不一样。 2019-04-03
  • 葡萄牙首都上演城市节狂欢 2019-04-01
  • RED EARTH红地球展现自我丝绒唇膏全新发布 2019-03-24
  • 龙船礼 有讲究 百岁龙 抖精神 2019-03-17
  • 新加坡航空将开通 全球最长商业航线 2019-03-17
  • 传说中的自由飞“翔” 当厕所被狂风吹上天 2019-03-12
  • 导游强迫交易获刑 曾辱骂威胁强迫游客消费上万元--旅游频道 2019-03-09
  • 北京正式推出租赁型职工集体宿舍 每间居住人数不超8人 2019-03-09
  • 美元短线拉升 随后回吐涨幅 2019-03-07
  • 超级大乐透开奖结果 玩高频彩一期中的方法 体彩排列五走势图 福彩欢乐生肖走势图 排列5走势带连线专业版 足球彩票半全场怎么算 七乐彩选号技巧公式 7星彩中5等奖多少钱 七乐彩走势图大 极速快3官网下载地址 彩票大奖故事都是假的 中国福利彩票15选5开奖结果 新时时彩老时时彩 pk10免费计划软件手机 体彩竞彩篮球大小分 快速时时彩正规吗