Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|
#1 | Link |
|
Registered User
Join Date: Mar 2005
Posts: 129
|
Cross-Platform D2V Source for VapourSynth
So, I was bored and wrote a cross-platform D2V parser and decoder for VapourSynth.
Current Version: 1.2 Windows Binary: https://github.com/dwbuiten/d2vsourc....2-windows.zip - Contains 32-bit and 64-bit binaries. Source: https://github.com/dwbuiten/d2vsourc...rce-1.2.tar.xz Known Limitations & Bugs
Example usage: Code:
import vapoursynth as vs core = vs.Core() core.std.LoadPlugin(path=r'C:\Path\To\d2vsource.dll') ret = core.d2v.Source(input=r'C:\Path\To\my.d2v') last = ret input - Full path to input D2V file. nocrop - Always use direct-rendered buffer, which may need cropping. Provides a speedup when you know you need to crop your image anyway, by avoiding extra memcpy calls. rff - Invoke ApplyRFF (True by default) threads - Number of threads FFmpeg should use. Default is 0 (auto). If you want to contribute, feel free to send a pull request on GitHub. Last edited by Daemon404; 18th August 2019 at 19:09. Reason: Update version |
|
|
|
|
|
#2 | Link |
|
Guest
Posts: n/a
|
I can look into what would be needed to port DGIndex to *nix. The last time I looked at the code it was a bit menacing, though. It also relies on a bunch of ASM that would probably be a nightmare to port so we'd have to stick to plain C++ until/unless someone wants to take on that task.
I'll also test building this on OS X when I get home tonight. Last edited by Chirico; 5th November 2012 at 18:02. |
|
|
|
#3 | Link | |
|
unsigned int
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
|
Quote:
__________________
Buy me a "coffee" and/or hire me to write code! |
|
|
|
|
|
|
#4 | Link |
|
Guest
Posts: n/a
|
Okay. Though thinking about it more: Does DGIndex actually give us any benefits over ffms2 with a generated index file these days? I can really only see for possibly cutting streams and demuxing audio, but I'm not sure those features alone are worth myself taking on the effort. Though I can definitely provide you with feedback on building on OS X.
Last edited by Chirico; 5th November 2012 at 18:40. |
|
|
|
#5 | Link | |
|
もこたんインしたお!
Join Date: Jan 2008
Location: Finland / Japan
Posts: 512
|
Quote:
Of course, if possible it would be nice for this kind of stuff to be implemented in ffms2 itself, but this is a basic first step towards having cross-platform solutions for various files.
__________________
[I'm human, no debug]
|
|
|
|
|
|
|
#6 | Link | |
|
Registered User
Join Date: Mar 2005
Posts: 129
|
Quote:
|
|
|
|
|
|
|
#9 | Link |
|
Guest
Posts: n/a
|
So I got it to compile in OS X with the removal of "-Wl,-Bsymbolic" but I just get:
Code:
File "vapoursynth.pyx", line 1016, in vapoursynth.Function.__call__ (build/src/cython/vapoursynth.c:15627) vapoursynth.Error: 'Cannot initialize decoder.' Last edited by Chirico; 6th November 2012 at 02:12. |
|
|
|
#10 | Link |
|
Registered User
Join Date: Mar 2005
Posts: 129
|
Yes, I should really add proper error reporting instead of dumping to stdout...
It's probably failing to open the file(s) referenced in the D2V file. I assumed, since this is on OS X, you are using a relative path? EDIT: As of b7a0ada5, error messages are properly propagated. Last edited by Daemon404; 6th November 2012 at 03:08. |
|
|
|
|
|
#12 | Link | |
|
Guest
Posts: n/a
|
Quote:
|
|
|
|
|
#15 | Link |
|
Registered User
Join Date: Sep 2004
Location: Near LA, California, USA
Posts: 1,545
|
I have a large MPEG2-TS file. And it won't seek past 40,000 frames in VirtualDub with VPY support.
__________________
Pirate: Now how would you like to die? Would you like to have your head chopped off or be burned at the stake? Curly: Burned at the stake! Moe: Why? Curly: A hot steak is always better than a cold chop. |
|
|
|
|
|
#16 | Link | |
|
Registered User
Join Date: Mar 2005
Posts: 129
|
Quote:
Do you know if it gets stuck while decoding linearly too, or if it's solely a seeking problem? In any case, here is a test build with a possible "fix": <Linked Removed> The binary is a fair bit bigger due to being built with MinGW this time. If this binary works, I'll work on integrating an MSVC-compatible fix as well. Last edited by Daemon404; 9th November 2012 at 22:37. Reason: Grammar |
|
|
|
|
|
|
#17 | Link |
|
Registered User
Join Date: Sep 2004
Location: Near LA, California, USA
Posts: 1,545
|
It doesn't get stuck decoding linearly. But if I seek past 40,000 frames or stop the playback of the video once it passes that mark, Virtual Dub freezes and I have to shut it down with the task manager.
I tried your "fixed" version. The problem is still there.
__________________
Pirate: Now how would you like to die? Would you like to have your head chopped off or be burned at the stake? Curly: Burned at the stake! Moe: Why? Curly: A hot steak is always better than a cold chop. |
|
|
|
|
|
#20 | Link |
|
Registered User
Join Date: Sep 2004
Location: Near LA, California, USA
Posts: 1,545
|
The fix works. Seeking works now. Thank you.
__________________
Pirate: Now how would you like to die? Would you like to have your head chopped off or be burned at the stake? Curly: Burned at the stake! Moe: Why? Curly: A hot steak is always better than a cold chop. |
|
|
|
![]() |
| Tags |
| d2v, dgindex, vapoursynth |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|