View Full Version : vsrawsource - Raw Video Reader for VapourSynth
ddubya
31st July 2016, 01:52
Changes pushed for opening from stdin, using "-"
kolak
31st July 2016, 12:31
No, if you want to use a literal backslash in a string, you must escape it with another backslash.
You can use forward slash instead or format like this
"C:\\folder1\\folder2\\file.raw"
etc.
OK, but this is related only to raw reader. Other plugins are fine with "normal" paths.
kolak
31st July 2016, 12:33
Changes pushed for opening from stdin, using "-"
Cool, need to wait for myrsloik to compile new version.
How I meant to use it after this change? Still:
clip = core.raws.Source("/dev/stdin")
?
ddubya
31st July 2016, 20:15
OK, but this is related only to raw reader. Other plugins are fine with "normal" paths.
It isn't the plugin, its python. The backslash by itself is the escape character.
ddubya
31st July 2016, 20:15
Cool, need to wait for myrsloik to compile new version.
How I meant to use it after this change? Still:
clip = core.raws.Source("/dev/stdin")
?
clip = core.raws.Source("-")
kolak
31st July 2016, 20:59
It isn't the plugin, its python. The backslash by itself is the escape character.
Ok, but other filters (ffms2, avi source) handle "normal" paths fine without any workaround (at least form the end user).
kolak
31st July 2016, 20:59
clip = core.raws.Source("-")
Easy enough :)
Myrsloik
2nd August 2016, 12:56
Updated binaries (https://dl.dropboxusercontent.com/u/73468194/rawsource_binaries2.7z)
kolak
2nd August 2016, 15:03
Thanks, but still no luck:
Python exception: raws: failed to open source file stdin in binary mode (for both rawvideo and y4m)
Myrsloik
4th August 2016, 10:40
I have a vague memory the code has to do it the windows api way. Using portable stuff won't work.
Or that it works often enough if you simply skip it on windows. That's what x264 seems to do anyway.
ddubya
4th August 2016, 16:47
I have a vague memory the code has to do it the windows api way. Using portable stuff won't work.
Or that it works often enough if you simply skip it on windows. That's what x264 seems to do anyway.
x264 does this:
_setmode( _fileno( stdin ), _O_BINARY );
I just committed change to do the same instead of freopen(). I'm pretty sure windows defaults to text mode on open which would likely mess up y4m header parsing.
Myrsloik
4th August 2016, 21:31
Again (https://dl.dropboxusercontent.com/u/73468194/rawsource_binaries3.7z)
You really should test your code...
kolak
5th August 2016, 11:38
Yep, this code needs some work/debugging.
New error:
raws: check_header: fail to read file magic
vspipe crashes.
Jindadil007
30th January 2017, 03:19
Hi While Loading Raw source, I get this error : vapoursynth.Error: LoadLibraryEx failed with code 87: update windows and try again
Here is my script :
core.std.LoadPlugin('vsrawsource.dll')
video = core.raws.Source(r'C:\DVD\Vine.raw')
Input raw file is RGB48. Pl. help. Thanks. Also would appreciate if some one compile vsrawsource.dll (v 0.33) for windows for non programmers. I am on Win10.
Sent from my GT-N8000 using Tapatalk
jackoneill
30th January 2017, 12:53
Hi While Loading Raw source, I get this error : vapoursynth.Error: LoadLibraryEx failed with code 87: update windows and try again
Here is my script :
core.std.LoadPlugin('vsrawsource.dll')
video = core.raws.Source(r'C:\DVD\Vine.raw')
Input raw file is RGB48. Pl. help. Thanks. Also would appreciate if some one compile vsrawsource.dll (v 0.33) for windows for non programmers. I am on Win10.
Sent from my GT-N8000 using Tapatalk
You're missing some Windows update. Thus,
update windows and try again
Jindadil007
30th January 2017, 15:12
You're missing some Windows update. Thus,
Hi My win10 is upto date. Maybe the vswarsource.dll is corrupt. Can i get a new updated dll ?
Thanks
Jindadil007
30th January 2017, 16:57
Updated binaries (https://dl.dropboxusercontent.com/u/73468194/rawsource_binaries2.7z)
Hi. Link is not working. Can you please upload and share vsrawsource.dll since I do not know how to compile...Thanks
Jindadil007
1st February 2017, 06:01
Hi...I am looking for a resolution to my problem stated in above post...
Jindadil007
1st February 2017, 18:04
Hi While Loading Raw source, I get this error : vapoursynth.Error: LoadLibraryEx failed with code 87: update windows and try again
Here is my script :
core.std.LoadPlugin('vsrawsource.dll')
video = core.raws.Source(r'C:\DVD\Vine.raw')
Input raw file is RGB48. Pl. help. Thanks. Also would appreciate if some one compile vsrawsource.dll (v 0.33) for windows for non programmers. I am on Win10.
Sent from my GT-N8000 using Tapatalk
Hi Myrsloik,
You resolved this issue at https://github.com/vapoursynth/vapoursynth/issues/210
How can I get away with this error on my Win10 where installing KB2533623 is not possible ? Pl. help...
Myrsloik
1st February 2017, 19:51
The windows compile never worked well and nobody bothered to debug it. That's why it's unavailable. That error has only happened on windows 7 or older before. I have no idea how you managed to trigger it on windows 10. Are you really using windows 10?
Jindadil007
2nd February 2017, 05:44
The windows compile never worked well and nobody bothered to debug it. That's why it's unavailable. That error has only happened on windows 7 or older before. I have no idea how you managed to trigger it on windows 10. Are you really using windows 10?
Thanks Myrsloik. Yes I am using Win10HomeOEM (Anniversary Update).
I am not a programmer so would wait till someone attempts to get this working in windows. Would try it on Mac this weekend.
dipje
3rd February 2017, 15:54
I used a compile from feisty2, x64 dll which works fine on my Win10, but it's from somewhere june 2015. No clue what has changed since then and if that's crucial for you, but at least you know of it's existence now :)
https://github.com/IFeelBloated/vsrawsource/releases
Jindadil007
4th February 2017, 08:11
I used a compile from feisty2, x64 dll which works fine on my Win10, but it's from somewhere june 2015. No clue what has changed since then and if that's crucial for you, but at least you know of it's existence now :)
https://github.com/IFeelBloated/vsrawsource/releases
Thanks Dipje...This works well on Win10 :)
Jindadil007
5th February 2017, 05:59
Hi...I converted a clip from YUV to RGBS with using vspipe with this script :
import vapoursynth as vs
core = vs.get_core()
video = core.d2v.Source(r'C:\DVD\Sample.d2v')
video = core.resize.Point(video, matrix_in_s="170m", format=vs.RGB24)
video = core.fmtc.bitdepth(video,bits=32,fulls=False,fulld=True)
video.set_output()
While the preview was good, but the actual raw video I get after loading in VSeditor is having a grainy look...
Where I am Wrong ?
feisty2
5th February 2017, 08:46
Where I am Wrong ?
short answer: everywhere
long answer: you need to learn some very basic stuff about video processing before messing around very advanced filters like V-BM3D or Vine or Plum
a raw file(excluding y4m) = nothing but the binary data of the image/video
you need to manually specify the following properties at least
- resolution(width, height)
- colorspace
and probably some extra properties
- packed/planar(if the raw contains multiple channels)
- little endian/big endian(if the raw has a bitdepth more than 8bpc)
- decompressing algorithm(if the raw is not uncompressed)
- framerate(not necessary cuz it won't affect the processing anyways)
now google all these things and stop expecting to be spoon-fed
Jindadil007
5th February 2017, 09:14
short answer: everywhere
long answer: you need to learn some very basic stuff about video processing before messing around very advanced filters like V-BM3D or Vine or Plum
a raw file(excluding y4m) = nothing but the binary data of the image/video
you need to manually specify the following properties at least
- resolution(width, height)
- colorspace
and probably some extra properties
- packed/planar(if the raw contains multiple channels)
- little endian/big endian(if the raw has a bitdepth more than 8bpc)
- decompressing algorithm(if the raw is not uncompressed)
- framerate(not necessary cuz it won't affect the processing anyways)
now google all these things and stop expecting to be spoon-fed
You can stop responding to my posts...Your tone and tanor is not something which i like...If everything is on google...what for we are here ? We are here to ask experts like you but don't show your attitude...nobody gives a damn to your skills if your attitude is not good...
feisty2
5th February 2017, 09:22
You can stop responding to my posts...Your tone and tanor is not something which i like...If everything is on google...what for we are here ? We are here to ask experts like you but don't show your attitude...nobody gives a damn to your skills if your attitude is not good...
I don't know where you're from and how you define a "nice attitude", but I'm speaking with a perfectly normal and non-aggressive attitude in the English world, get used to it.
dipje
5th February 2017, 15:07
Although I do get how feisty comments may come over as rude, that also means you don't need to take everything as an offensive comment (and let me be clear that I'm absolutely neutral in all of this).
That being said, in this thread and others you are asking (repeatedly and sometimes seemingly impatiently) basic things that are out of the scope of the thread.
If the thread is about an avisynth plugin and you ask basic avisynth-principles, it's normal to receive an answer 'learn avisynth first'. That's not offensive, that's just a redirection that the question your asking belongs somewhere else.
You seem to be going to a school for 'learning to drive rally race cars at high speed' and you keep asking your instructor 'where is the brake pedal'.. that's not how it works. First basics, then the next step up.
If you use the plugin 'vsrawsource' and you think it's ok to just specify the filename and nothing more, you're clearly not really knowing what you're doing and people with very little spare time don't always want to answer basics like that. So go learn what the plugin is actually doing / supposed to do seems like a valid answer here.
And in case you want to take the shortcuts and say "I don't need to know what it is I'm doing or who it works, I just want it working" well, feisty did give you the answers to what you were missing. You need to specify all you know about the file file, because there is zero information in the file itself. Width, height and pixel-format is the minimum.
_that_ being said, I do find it weird that you're opening a .D2V file inside of Vapoursynth only to convert it to a raw floating-point rgb file-dump, which you're then trying to open up back into Vapoursynth. But good luck at whatever you're trying.
Jindadil007
5th February 2017, 17:13
Although I do get how feisty comments may come over as rude, that also means you don't need to take everything as an offensive comment (and let me be clear that I'm absolutely neutral in all of this).
That being said, in this thread and others you are asking (repeatedly and sometimes seemingly impatiently) basic things that are out of the scope of the thread.
If the thread is about an avisynth plugin and you ask basic avisynth-principles, it's normal to receive an answer 'learn avisynth first'. That's not offensive, that's just a redirection that the question your asking belongs somewhere else.
You seem to be going to a school for 'learning to drive rally race cars at high speed' and you keep asking your instructor 'where is the brake pedal'.. that's not how it works. First basics, then the next step up.
If you use the plugin 'vsrawsource' and you think it's ok to just specify the filename and nothing more, you're clearly not really knowing what you're doing and people with very little spare time don't always want to answer basics like that. So go learn what the plugin is actually doing / supposed to do seems like a valid answer here.
And in case you want to take the shortcuts and say "I don't need to know what it is I'm doing or who it works, I just want it working" well, feisty did give you the answers to what you were missing. You need to specify all you know about the file file, because there is zero information in the file itself. Width, height and pixel-format is the minimum.
_that_ being said, I do find it weird that you're opening a .D2V file inside of Vapoursynth only to convert it to a raw floating-point rgb file-dump, which you're then trying to open up back into Vapoursynth. But good luck at whatever you're trying.
Got it ... No Offence... Yes I got good results by using :
video = core.raws.Source(r'C:\DVD\Vspipe\Sample.raw',720,480,src_fmt="RGB")
Anyways...Can you suggest a good link/forum where I can learn the basics...this looks for advanced programmers...
Mystery Keeper
5th February 2017, 18:04
Got it ... No Offence... Yes I got good results by using :
video = core.raws.Source(r'C:\DVD\Vspipe\Sample.raw',720,480,src_fmt="RGB")
Anyways...Can you suggest a good link/forum where I can learn the basics...this looks for advanced programmers...This forum has Newbies section (https://forum.doom9.org/forumdisplay.php?f=6).
KingLir
21st February 2017, 00:28
Anyone was able to build this for macOS ? I am getting:
$ ./configure
generating config.mak ...
error: patches welcome
KingLir
23rd February 2017, 00:52
I was able to build on macOS with this. Anyone able to do a commit with this patch - please do.
gcc -c -fPIC ${CFLAGS} ${CPPFLAGS} -I. $(pkg-config --cflags vapoursynth) -o main.o rawsource.c
g++ -dynamiclib -undefined suppress -flat_namespace *.o -o libraws.dylib
ifb
23rd February 2018, 04:59
Is there some trick to making a working windows build? I can usually preview a frame or two in VS Editor before it dies. vspipe also crashes and I can't get a backtrace with gdb. I messed with this a few weeks ago and gdb pointed at history_add(), but I've since changed something and I can't even get that far anymore.
I haven't tried building with visual studio yet. The same script works fine in a Linux VM.
import vapoursynth as vs
core = vs.get_core(threads=1)
# https://media.xiph.org/video/derf/Chimera/Netflix_WindAndNature_4096x2160_60fps_10bit_420.yuv
c = core.raws.Source('Netflix_WindAndNature_4096x2160_60fps_10bit_420.yuv',4096,2160,60000,1001,src_fmt='YUV420P10')
c.set_output()
vspipe script.vpy output.raw
Ultimately, I'd like to use walisser's vsrawsource repo (https://github.com/walisser/vsrawsource) with pipe input, but it's only a few commits ahead of Myrsloik's tree which doesn't work either so I don't know what I've screwed up here.
Myrsloik
23rd February 2018, 12:22
Use this repo (https://github.com/maki-rxrz/vsrawsource) which has fixed the crash and other issues.
Windows binaries (http://www.mediafire.com/file/w8ha7gvvehvebj5/vsrawsource_vs2017.7z).
How many forks are there now? Which one should I point to?
ifb
23rd February 2018, 18:18
Use this repo (https://github.com/maki-rxrz/vsrawsource) which has fixed the crash and other issues.
Windows binaries (http://www.mediafire.com/file/w8ha7gvvehvebj5/vsrawsource_vs2017.7z).
Thanks. I did manage to debug it with vs2017 last night and find the crash, but it was late and the fix (https://github.com/maki-rxrz/vsrawsource/commit/688e6fbea73660a7937b9887b1501f458072a8ab) wasn't immediately obvious to me.
I didn't know there was yet another fork and the work had already be done for me. :rolleyes:
logicom
2nd November 2019, 18:00
I am experiencing dificulties to make this working:
ffmpeg -y -re -f lavfi -i testsrc=duration=30:size=720x576:rate=25 -c:v rawvideo -pix_fmt yuv420p -r 25 -an -f rawvideo - | vspipe --y4m live.vpy - | ffplay -f rawvideo -pix_fmt yuv420p -s 720x576 -i -
where live.vpy is:
import vapoursynth as vs
core = vs.get_core()
clip = core.raws.Source("-",720,576,src_fmt="YUV420P8")
clip.set_output()
could someone provide win binary that accepts input from "-"
:thanks:
Myrsloik
2nd November 2019, 18:58
It's been a long time since I looked at this but I think reading from stdin on windows never worked well.
logicom
2nd November 2019, 19:44
Any advice on how to move on from this point?
DJATOM
4th November 2019, 12:30
Looks like it works, thx.
poisondeathray
4th November 2019, 16:51
Awesome, works well, thanks
Is raw pipe (or yuv pipe) in, or anything like that possible with avisynth ?
logicom
4th November 2019, 23:53
Try this (https://github.com/HolyWu/vsrawsource/releases/download/20191104/vsrawsource-20191104.7z). I think it should work.
Thank you for looking into this. I tested 64 bit version
and piping was working. But I was wondering why I could not have any influence on framerate.
whithout vsrawvideo pipe: 25 tbr, 25 tbn, 25 tbc
with vsrawvideo pipe: 29.97 fps, 29.97 tbr, 29.97 tbn, 29.97 tbc
I tested with yuv420p yuv422p and yuv444p
Kind Regards.
poisondeathray
5th November 2019, 00:01
@logicom -
core.raws.Source(fpsnum=25, fpsden=1)
If you add --y4m headers for vspipe , the receiving application should take that information
logicom
5th November 2019, 01:04
:)
Thank you!
DJATOM
5th November 2019, 13:05
@poisondeathray
you can wrap core.raws.Source call with AVS plugin VapourSource (function VSEval), it should work as intended.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.