View Full Version : D2V Witch: cross-platform D2V creator
jackoneill
16th April 2017, 16:41
Is there any gain in using this instead over LSMASHSource or FFMS2, or is it 'just' an alternative?
(alternatives are always good :D, btw. would be nice if mpls files would also be supported :))
No mpls for you. :(
Selur
16th April 2017, 16:48
Had to ask. :D
May be an option to load multiple files? ;) That would also help with DVD handling; I normally know the vobs/m2ts files, which belong to a specific playlist, and their order and it would help if they could be all indexed and opened in one go. :)
jackoneill
16th April 2017, 17:03
Had to ask. :D
May be an option to load multiple files? ;) That would also help with DVD handling; I normally know the vobs/m2ts files, which belong to a specific playlist, and their order and it would help if they could be all indexed and opened in one go. :)
You can do that with DVDs since v1. Technically you can do it with blurays too, but I just tried and random access doesn't work right. You get the wrong frames.
Selur
16th April 2017, 17:08
Lol, you are right about the DVD thing, I even used that a few times and totally forgot about it. :) Problem with m2ts files is that in a playlist the numbering doesn't have to follow a specific order so autoloading based on the file name would be a bad thing.
jackoneill
16th April 2017, 17:42
Lol, you are right about the DVD thing, I even used that a few times and totally forgot about it. :) Problem with m2ts files is that in a playlist the numbering doesn't have to follow a specific order so autoloading based on the file name would be a bad thing.
Good thing there is no autoloading, then!
New d2vsource decodes 9 and 10 bit h264 too (that d2vwitch.h264 mentioned above). New D2V Witch has two very small fixes. Git history was edited, sorry.
http://savedonthe.net/download/1836/D2VWitch-d2vsource-h264-win64.html
http://savedonthe.net/download/1837/D2VWitch-d2vsource-h264-win32.html
Selur
16th April 2017, 17:49
Thanks! I can confirm that d2vwitch.h264 can now be decoded without a problem. :)
Cu Selur
jackoneill
16th April 2017, 18:20
$ ffplay /tmp/Trailer\ 3D_MVC.mts
<stuff>
[h264 @ 0x7fa370089a40] sps_id 1 out of range
Failed to open file '/tmp/Trailer 3D_MVC.mts' or configure filtergraph
Maybe I need a newer ffmpeg (I have 3.2.2), but I don't feel like updating right now.
ffmpeg 3.3 doesn't decode it either.
Selur
16th April 2017, 18:52
Plays fine with Windows Media Player (filters installed), MPC-HC, MPlayer, but it seems like ffmpeg (ffms2 and LSmashSource) can't handle the file. :( (DGDecNV and DGDecIM can)
jackoneill
16th April 2017, 20:29
Plays fine with Windows Media Player (filters installed), MPC-HC, MPlayer, but it seems like ffmpeg (ffms2 and LSmashSource) can't handle the file. :( (DGDecNV and DGDecIM can)
ffmpeg from git snapshot works.
http://savedonthe.net/download/1838/D2VWitch-d2vsource-h264-win32.html
http://savedonthe.net/download/1839/D2VWitch-d2vsource-h264-win64.html
Selur
16th April 2017, 20:35
Sweat! Works fine! Thanks! :D
lansing
26th July 2018, 00:38
The gui version, when indexing to a existed d2v, there's no prompt warning about overwriting the existing file.
_Al_
22nd February 2019, 08:00
Is there any way to catch that printing progress (1% .... 56%... etc) for dv2witch command line using subprocess in Python, I have no luck to get it to stdout or stderr, or I cannot do it, something like this:
import threading
import subprocess
class Cmd(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
process = subprocess.Popen(
[d2vwitch, '--output', output, file],
stdout=subprocess.PIPE)
line = ''
for char in iter(lambda: process.stdout.read(1).decode('utf-8'), ''):
line +=char
if char == '\r':
print(line)
line = ''
file = 'C:/HDV TAPE 44/tape 44-2013_09_28-10_29_29.m2t'
d2vwitch = shutil.which('d2vwitch')
output = 'C:/temp/out.d2v'
command = Cmd()
command.start()
command.join()
no problem getting actual d2v, just that progress, I tried stdout, stderr or returncode, and it looks empty.
This is for windows but I tried it on linux and, the same, no luck.
_Al_
22nd February 2019, 20:33
oh, sorry, it is in stderr, it's ok
ChaosKing
28th March 2019, 12:55
I noticed that D2V Witch v2 freezed if I click on File->open video files. Drag and drop works <-- I always used this :D
Runing it via cmd or powershell works too but it looks like the program is still running because it "pauses" at the end with d2vwitch.exe --output abc.d2v VTS_01_CHAPTER_05_1.VOB or just d2vwitch.exe --help
My os: win10 x64 pro 1809
jackoneill
28th March 2019, 13:59
I noticed that D2V Witch v2 freezed if I click on File->open video files. Drag and drop works <-- I always used this :D
Runing it via cmd or powershell works too but it looks like the program is still running because it "pauses" at the end with d2vwitch.exe --output abc.d2v VTS_01_CHAPTER_05_1.VOB or just d2vwitch.exe --help
My os: win10 x64 pro 1809
I think the freezing of the graphical interface will be fixed in the next version, which will be out soon. (I started working on D2V Witch again last week.)
I'm not sure what to do about the pausing when you run it in cmd. It tries to be both a command line application and a graphical application, which is not supported in Windows.
ChaosKing
28th March 2019, 16:56
ok
One small thing: The button "Remove files" should be renamed to "Remove file" as it only removes one file :eek:
ChaosKing
30th March 2019, 01:24
Maybe you can also add some icons like in this fork https://github.com/emako/D2VWitch/releases
It's a nice improvement.
I also noticed that in this mod build there is no "thinking time" when adding a file. Adding a file in V2 always takes some seconds to show if the file is valid or not. In this mod it happens instantaneous.
p.s. No Open files bug :)
jackoneill
30th March 2019, 12:15
Maybe you can also add some icons like in this fork https://github.com/emako/D2VWitch/releases
It's a nice improvement.
I also noticed that in this mod build there is no "thinking time" when adding a file. Adding a file in V2 always takes some seconds to show if the file is valid or not. In this mod it happens instantaneous.
p.s. No Open files bug :)
I don't know how to explain the difference in "thinking time". It's definitely not supposed to take seconds after adding a file. Does it happen with any format, any size?
ChaosKing
30th March 2019, 13:04
Now that I tested it more, yes it seems to happen for all formats and sizes. For example h265.mp4 (18mb) takes 4-5 sec, the gui turns "red". Then I click on remove files and this takes also some sec to remove it. h264.mkv (20mb) or a valid vob file (500mb) is the same. The files are on a m2 ssd :D
It is only "fast" if I add a h265.mkv and a "avformat_open_input failed: invalid data found" appears.
EDIT:
Found your "v3" here https://forum.doom9.org/showthread.php?p=1803882#post1803882
It's the same thing. Drag&drop the file -> gui freezes for some sec -> file is valid and shows mpeg2 video-blah or turns red if invalid.
Edit2:
File->Open files is also working in v3
jackoneill
30th March 2019, 15:39
Now that I tested it more, yes it seems to happen for all formats and sizes. For example h265.mp4 (18mb) takes 4-5 sec, the gui turns "red". Then I click on remove files and this takes also some sec to remove it. h264.mkv (20mb) or a valid vob file (500mb) is the same. The files are on a m2 ssd :D
It is only "fast" if I add a h265.mkv and a "avformat_open_input failed: invalid data found" appears.
I can't reproduce this on a Windows 7 computer with a Pentium 4 CPU and spinning hard drive.
ChaosKing
1st April 2019, 12:00
I can't reproduce this on a Windows 7 computer with a Pentium 4 CPU and spinning hard drive.
Can I help somehow? With a debug build maybe?
jackoneill
1st April 2019, 16:30
Can I help somehow? With a debug build maybe?
Sure. This build will print some timings at the bottom of the window when you add or remove files:
http://savedonthe.net/download/2391/D2VWitch-thinking-time-win64.html
Note that this build is not suitable for other uses. It will crash if you don't use the graphical interface.
ChaosKing
1st April 2019, 16:51
With a VOB file (drag & drop):
[20190401 17:50:02] dropEvent: Getting to line 1308 took 0 ms
[20190401 17:50:02] dropEvent: Getting to line 1312 took 0 ms
[20190401 17:50:02] dropEvent: Getting to line 1316 took 0 ms
[20190401 17:50:02] dropEvent: Getting to line 1321 took 0 ms
[20190401 17:50:02] dropEvent: Getting to line 1323 took 15 ms
[20190401 17:50:02] dropEvent: Getting to line 1326 took 0 ms
[20190401 17:50:02] dropEvent: Getting to line 1328 took 0 ms
[20190401 17:50:02] dropEvent: Getting to line 1333 took 0 ms
[20190401 17:50:02] inputFilesUpdated: Getting to line 208 took 0 ms
[20190401 17:50:02] inputFilesUpdated: Getting to line 220 took 0 ms
[20190401 17:50:02] inputFilesUpdated: Getting to line 222 took 0 ms
[20190401 17:50:15] inputFilesUpdated: Getting to line 224 took 13653 ms
[20190401 17:50:15] inputFilesUpdated: Getting to line 231 took 0 ms
[20190401 17:50:15] inputFilesUpdated: Getting to line 235 took 0 ms
[20190401 17:50:15] inputFilesUpdated: Getting to line 239 took 0 ms
[20190401 17:50:15] inputFilesUpdated: Getting to line 242 took 0 ms
[20190401 17:50:15] inputFilesUpdated: Getting to line 244 took 0 ms
[20190401 17:50:15] inputFilesUpdated: Getting to line 246 took 0 ms
[20190401 17:50:15] inputFilesUpdated: Getting to line 249 took 0 ms
[20190401 17:50:15] inputFilesUpdated: Getting to line 251 took 0 ms
[20190401 17:50:15] inputFilesUpdated: Getting to line 253 took 0 ms
[20190401 17:50:15] inputFilesUpdated: Getting to line 256 took 0 ms
[20190401 17:50:15] inputFilesUpdated: Getting to line 258 took 0 ms
[20190401 17:50:15] inputFilesUpdated: Getting to line 261 took 0 ms
[20190401 17:50:15] inputFilesUpdated: Getting to line 263 took 0 ms
[20190401 17:50:15] inputFilesUpdated: Getting to line 265 took 0 ms
[20190401 17:50:15] inputFilesUpdated: Getting to line 267 took 0 ms
[20190401 17:50:15] inputFilesUpdated: Getting to line 269 took 0 ms
[20190401 17:50:15] inputFilesUpdated: Getting to line 271 took 0 ms
[20190401 17:50:15] inputFilesUpdated: Getting to line 273 took 0 ms
[20190401 17:50:15] inputFilesUpdated: Getting to line 275 took 0 ms
[20190401 17:50:15] inputFilesUpdated: Getting to line 277 took 0 ms
[20190401 17:50:15] inputFilesUpdated: Getting to line 284 took 0 ms
[20190401 17:50:15] dropEvent: Getting to line 1335 took 13653 ms
[20190401 17:50:15] dropEvent: Getting to line 1337 took 0 ms
[20190401 17:50:15] initFormat: Getting to line 56 took 0 ms
[20190401 17:50:15] initFormat: Getting to line 64 took 0 ms
[20190401 17:50:15] initFormat: Getting to line 70 took 0 ms
[20190401 17:50:15] initFormat: Getting to line 82 took 0 ms
[20190401 17:50:15] initFormat: Getting to line 94 took 0 ms
h265.mp4(drag & drop)
[20190401 17:51:57] dropEvent: Getting to line 1308 took 0 ms
[20190401 17:51:57] dropEvent: Getting to line 1312 took 0 ms
[20190401 17:51:57] dropEvent: Getting to line 1316 took 0 ms
[20190401 17:51:57] dropEvent: Getting to line 1321 took 0 ms
[20190401 17:51:57] dropEvent: Getting to line 1323 took 16 ms
[20190401 17:51:57] dropEvent: Getting to line 1326 took 0 ms
[20190401 17:51:57] dropEvent: Getting to line 1328 took 0 ms
[20190401 17:51:57] dropEvent: Getting to line 1333 took 0 ms
[20190401 17:51:57] inputFilesUpdated: Getting to line 208 took 0 ms
[20190401 17:51:57] inputFilesUpdated: Getting to line 220 took 31 ms
[20190401 17:51:57] inputFilesUpdated: Getting to line 222 took 0 ms
[20190401 17:52:23] inputFilesUpdated: Getting to line 224 took 25296 ms
[20190401 17:52:23] inputFilesUpdated: Getting to line 261 took 0 ms
[20190401 17:52:23] inputFilesUpdated: Getting to line 263 took 0 ms
[20190401 17:52:23] inputFilesUpdated: Getting to line 265 took 0 ms
[20190401 17:52:23] inputFilesUpdated: Getting to line 267 took 0 ms
[20190401 17:52:23] inputFilesUpdated: Getting to line 269 took 0 ms
[20190401 17:52:23] inputFilesUpdated: Getting to line 271 took 0 ms
[20190401 17:52:23] inputFilesUpdated: Getting to line 273 took 0 ms
[20190401 17:52:23] inputFilesUpdated: Getting to line 275 took 0 ms
[20190401 17:52:23] inputFilesUpdated: Getting to line 277 took 0 ms
[20190401 17:52:23] inputFilesUpdated: Getting to line 284 took 0 ms
[20190401 17:52:23] dropEvent: Getting to line 1335 took 25327 ms
[20190401 17:52:23] dropEvent: Getting to line 1337 took 0 ms
[20190401 17:52:23] initFormat: Getting to line 56 took 0 ms
[20190401 17:52:23] initFormat: Getting to line 64 took 0 ms
[20190401 17:52:23] initFormat: Getting to line 70 took 0 ms
[20190401 17:52:23] initFormat: Getting to line 82 took 15 ms
[20190401 17:52:23] initFormat: Getting to line 94 took 16 ms
Same VOB file via "Add files":
[20190401 17:53:40] Add files: Getting to line 585 took 6626 ms
[20190401 17:53:40] Add files: Getting to line 591 took 0 ms
[20190401 17:53:40] Add files: Getting to line 603 took 0 ms
[20190401 17:53:40] Add files: Getting to line 605 took 0 ms
[20190401 17:53:40] Add files: Getting to line 610 took 0 ms
[20190401 17:53:40] inputFilesUpdated: Getting to line 208 took 0 ms
[20190401 17:53:40] inputFilesUpdated: Getting to line 220 took 15 ms
[20190401 17:53:40] inputFilesUpdated: Getting to line 222 took 0 ms
[20190401 17:54:03] inputFilesUpdated: Getting to line 224 took 23248 ms
[20190401 17:54:03] inputFilesUpdated: Getting to line 231 took 0 ms
[20190401 17:54:03] inputFilesUpdated: Getting to line 235 took 0 ms
[20190401 17:54:03] inputFilesUpdated: Getting to line 239 took 0 ms
[20190401 17:54:03] inputFilesUpdated: Getting to line 242 took 0 ms
[20190401 17:54:03] inputFilesUpdated: Getting to line 244 took 0 ms
[20190401 17:54:03] inputFilesUpdated: Getting to line 246 took 0 ms
[20190401 17:54:03] inputFilesUpdated: Getting to line 249 took 0 ms
[20190401 17:54:03] inputFilesUpdated: Getting to line 251 took 0 ms
[20190401 17:54:03] inputFilesUpdated: Getting to line 253 took 0 ms
[20190401 17:54:03] inputFilesUpdated: Getting to line 256 took 0 ms
[20190401 17:54:03] inputFilesUpdated: Getting to line 258 took 0 ms
[20190401 17:54:03] inputFilesUpdated: Getting to line 261 took 0 ms
[20190401 17:54:03] inputFilesUpdated: Getting to line 263 took 0 ms
[20190401 17:54:03] inputFilesUpdated: Getting to line 265 took 0 ms
[20190401 17:54:03] inputFilesUpdated: Getting to line 267 took 0 ms
[20190401 17:54:03] inputFilesUpdated: Getting to line 269 took 0 ms
[20190401 17:54:03] inputFilesUpdated: Getting to line 271 took 0 ms
[20190401 17:54:03] inputFilesUpdated: Getting to line 273 took 0 ms
[20190401 17:54:03] inputFilesUpdated: Getting to line 275 took 0 ms
[20190401 17:54:03] inputFilesUpdated: Getting to line 277 took 0 ms
[20190401 17:54:03] inputFilesUpdated: Getting to line 284 took 0 ms
[20190401 17:54:03] Add files: Getting to line 613 took 23263 ms
[20190401 17:54:03] initFormat: Getting to line 56 took 0 ms
[20190401 17:54:03] initFormat: Getting to line 64 took 0 ms
[20190401 17:54:03] initFormat: Getting to line 70 took 0 ms
[20190401 17:54:03] initFormat: Getting to line 82 took 0 ms
[20190401 17:54:03] initFormat: Getting to line 94 took 15 ms
After I added the VOB file I clicked on "Use relative paths" and it also took very long. No log was generated.
And remove the vob file
[20190401 17:59:02] Remove files: Getting to line 622 took 0 ms
[20190401 17:59:02] Remove files: Getting to line 628 took 1 ms
[20190401 17:59:02] Remove files: Getting to line 631 took 0 ms
[20190401 17:59:02] Remove files: Getting to line 633 took 0 ms
[20190401 17:59:15] Remove files: Getting to line 638 took 13540 ms
[20190401 17:59:15] Remove files: Getting to line 642 took 0 ms
jackoneill
1st April 2019, 18:21
I guess it's the NTFS permission checking, which the Qt documentation did promise it would be slow.
You can verify with this build: http://savedonthe.net/download/2392/D2VWitch-thinking-time-win64.html
I added some new timing code, so please try a file before unchecking the "Slow permissions" box, and one after.
ChaosKing
1st April 2019, 19:22
[x] Slow perm. checking
[20190401 20:16:15] dropEvent: Getting to line 1339 took 0 ms
[20190401 20:16:15] dropEvent: Getting to line 1343 took 16 ms
[20190401 20:16:15] dropEvent: Getting to line 1347 took 0 ms
[20190401 20:16:15] dropEvent: Getting to line 1352 took 0 ms
[20190401 20:16:15] dropEvent: Getting to line 1354 took 0 ms
[20190401 20:16:15] dropEvent: Getting to line 1357 took 0 ms
[20190401 20:16:15] dropEvent: Getting to line 1359 took 0 ms
[20190401 20:16:15] dropEvent: Getting to line 1364 took 0 ms
[20190401 20:16:15] inputFilesUpdated: Getting to line 208 took 0 ms
[20190401 20:16:15] inputFilesUpdated: Getting to line 220 took 0 ms
[20190401 20:16:15] inputFilesUpdated: Getting to line 222 took 0 ms
[20190401 20:16:15] d2v_edit.textChanged: Getting to line 710 took 0 ms
[20190401 20:16:15] d2v_edit.textChanged: Getting to line 712 took 0 ms
[20190401 20:16:15] d2v_edit.textChanged: Getting to line 714 took 0 ms
[20190401 20:16:15] d2v_edit.textChanged: Getting to line 716 took 0 ms
[20190401 20:16:15] d2v_edit.textChanged: Getting to line 718 took 0 ms
[20190401 20:16:29] d2v_edit.textChanged: Getting to line 720 took 13585 ms
[20190401 20:16:29] d2v_edit.textChanged: Getting to line 722 took 0 ms
[20190401 20:16:29] d2v_edit.textChanged: Getting to line 724 took 0 ms
[20190401 20:16:29] d2v_edit.textChanged: Getting to line 726 took 0 ms
[20190401 20:16:29] d2v_edit.textChanged: Getting to line 728 took 0 ms
[20190401 20:16:29] inputFilesUpdated: Getting to line 224 took 13585 ms
[20190401 20:16:29] inputFilesUpdated: Getting to line 231 took 0 ms
[20190401 20:16:29] inputFilesUpdated: Getting to line 235 took 0 ms
[20190401 20:16:29] inputFilesUpdated: Getting to line 239 took 0 ms
[20190401 20:16:29] inputFilesUpdated: Getting to line 242 took 0 ms
[20190401 20:16:29] inputFilesUpdated: Getting to line 244 took 0 ms
[20190401 20:16:29] inputFilesUpdated: Getting to line 246 took 0 ms
[20190401 20:16:29] inputFilesUpdated: Getting to line 249 took 0 ms
[20190401 20:16:29] inputFilesUpdated: Getting to line 251 took 0 ms
[20190401 20:16:29] inputFilesUpdated: Getting to line 253 took 0 ms
[20190401 20:16:29] inputFilesUpdated: Getting to line 256 took 0 ms
[20190401 20:16:29] inputFilesUpdated: Getting to line 258 took 0 ms
[20190401 20:16:29] inputFilesUpdated: Getting to line 261 took 0 ms
[20190401 20:16:29] inputFilesUpdated: Getting to line 263 took 0 ms
[20190401 20:16:29] inputFilesUpdated: Getting to line 265 took 0 ms
[20190401 20:16:29] inputFilesUpdated: Getting to line 267 took 0 ms
[20190401 20:16:29] inputFilesUpdated: Getting to line 269 took 0 ms
[20190401 20:16:29] inputFilesUpdated: Getting to line 271 took 0 ms
[20190401 20:16:29] inputFilesUpdated: Getting to line 273 took 0 ms
[20190401 20:16:29] inputFilesUpdated: Getting to line 275 took 0 ms
[20190401 20:16:29] inputFilesUpdated: Getting to line 277 took 0 ms
[20190401 20:16:29] inputFilesUpdated: Getting to line 284 took 0 ms
[20190401 20:16:29] dropEvent: Getting to line 1366 took 13585 ms
[20190401 20:16:29] dropEvent: Getting to line 1368 took 0 ms
[20190401 20:16:29] initFormat: Getting to line 56 took 0 ms
[20190401 20:16:29] initFormat: Getting to line 64 took 0 ms
[20190401 20:16:29] initFormat: Getting to line 70 took 0 ms
[20190401 20:16:29] initFormat: Getting to line 82 took 0 ms
[20190401 20:16:29] initFormat: Getting to line 94 took 0 ms
[ ] Slow perm. checking
[20190401 20:17:54] dropEvent: Getting to line 1339 took 0 ms
[20190401 20:17:54] dropEvent: Getting to line 1343 took 0 ms
[20190401 20:17:54] dropEvent: Getting to line 1347 took 0 ms
[20190401 20:17:54] dropEvent: Getting to line 1352 took 0 ms
[20190401 20:17:54] dropEvent: Getting to line 1354 took 0 ms
[20190401 20:17:54] dropEvent: Getting to line 1357 took 0 ms
[20190401 20:17:54] dropEvent: Getting to line 1359 took 0 ms
[20190401 20:17:54] dropEvent: Getting to line 1364 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 208 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 220 took 16 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 222 took 0 ms
[20190401 20:17:54] d2v_edit.textChanged: Getting to line 710 took 0 ms
[20190401 20:17:54] d2v_edit.textChanged: Getting to line 712 took 0 ms
[20190401 20:17:54] d2v_edit.textChanged: Getting to line 714 took 0 ms
[20190401 20:17:54] d2v_edit.textChanged: Getting to line 716 took 0 ms
[20190401 20:17:54] d2v_edit.textChanged: Getting to line 718 took 0 ms
[20190401 20:17:54] d2v_edit.textChanged: Getting to line 720 took 0 ms
[20190401 20:17:54] d2v_edit.textChanged: Getting to line 722 took 0 ms
[20190401 20:17:54] d2v_edit.textChanged: Getting to line 724 took 0 ms
[20190401 20:17:54] d2v_edit.textChanged: Getting to line 726 took 0 ms
[20190401 20:17:54] d2v_edit.textChanged: Getting to line 728 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 224 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 231 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 235 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 239 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 242 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 244 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 246 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 249 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 251 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 253 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 256 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 258 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 261 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 263 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 265 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 267 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 269 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 271 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 273 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 275 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 277 took 0 ms
[20190401 20:17:54] inputFilesUpdated: Getting to line 284 took 0 ms
[20190401 20:17:54] dropEvent: Getting to line 1366 took 16 ms
[20190401 20:17:54] dropEvent: Getting to line 1368 took 0 ms
[20190401 20:17:54] initFormat: Getting to line 56 took 0 ms
[20190401 20:17:54] initFormat: Getting to line 64 took 0 ms
[20190401 20:17:54] initFormat: Getting to line 70 took 0 ms
[20190401 20:17:54] initFormat: Getting to line 82 took 0 ms
[20190401 20:17:54] initFormat: Getting to line 94 took 16 ms
I'll take the fast permission checking :D
jackoneill
4th April 2019, 19:53
It's not dead!
https://github.com/dubhater/D2VWitch/releases/tag/v3
Among other things, this release brings audio delay calculation, automatic indexing of vts_xx_y.vob sequences (in the command line), various bug fixes. The full list: changes.rst (https://github.com/dubhater/D2VWitch/blob/v3/changes.rst).
No H264 support because there are some problems to sort out. (Although no one has complained of any in a long time, so I assume it's mostly fine.) LSmash appears to work fine (https://forum.doom9.org/showthread.php?p=1870019#post1870019), anyway.
ChaosKing
4th April 2019, 20:30
Thx for the new release.
I only saw that d2v had h264 support while reading the previous posts.
Selur
6th April 2019, 21:05
I use it for H.264 and other stuff,.. hoping for support for it to come back. :)
jackoneill
6th April 2019, 21:52
I use it for H.264 and other stuff,.. hoping for support for it to come back. :)
Why do you prefer D2V Witch + the custom d2vsource over the alternatives? Just curious.
Selur
6th April 2019, 22:17
For transportstreams it was more reliable in the past then using FFVideoSource or Libavsource,.. (DGDecNV also was good, but that is only available on Windows)
It's more pythonic question or maybe not, not sure, I try it on windows and I have:
import subprocess
import threading
import shutil
def process(cmd):
subprocess.call(cmd)
d2vwitch = shutil.which('d2vwitch')
index_file = r'C:\.... path ...\test.d2v'
file = r'C:\... path ...\HDV.m2t'
cmd = [d2vwitch] + ['--output', index_file] + [file]
p = threading.Thread(target=process, args=(cmd,))
p.start()
p.join()
I'd just like to see cmd prompt to pop up with 1% ... 57%.... info as if it was run by simple command line in cmd prompt and then after indexing is done, that pop up would be canceled. If I type it manually in cmd prompt it works. But running it from Python script (vapoursynth script) besides creating d2v file that cmd prompt is not showing (with those readings). It also wait for process to be finished but as mentioned, no pop up can be seen.
Is there a way in Python together with d2vwitch.exe to make it work and show cmd prompt (like shell=False running subprocess in Python) wait for process to be done and then cancel that cmd window , script is continuing its further process?
For example ffmsindex.exe works with above example, having no problem.
ChaosKing
1st June 2019, 13:45
You could try it with os.system: return_code = os.system(d2vwitch.exe)
That works, thanks!
import subprocess
import threading
import shutil
def process(cmd):
os.system(cmd)
d2vwitch = shutil.which('d2vwitch')
index_file = r'C:\.... path ...\test.d2v'
file = r'C:\... path ...\HDV.m2t'
cmd = f'{d2vwitch} --output "{index_file}" "{file}"'
p = threading.Thread(target=process, args=(cmd,))
p.start()
p.join()
there is one bug I think, if I put quotes around d2vwitch path, it does not work, only if I type it manually into cmd prompt, but not with os.system within Python, for example:
cmd = f'"{d2vwitch}" --output "{index_file}" "{file}"'
does not work
only:
cmd = f'{d2vwitch} --output "{index_file}" "{file}"'
so it works only without quotes , so there must not be spaces in the d2vwitch path or d2vwitch should be in current directory
ok not sure what is going on, when I put two commands in a row, it works with quotes, so the whole thing:
import threading
import shutil
import os
import sys
def log_err():
err = str(sys.exc_info()[0])+'\n'
err += 'in line ' + str(sys.exc_info()[2].tb_lineno)+'\n'
err += str(sys.exc_info()[1])+'\n'
return err
def process(cmd):
try:
os.system(cmd)
except:
print(log_err())
d2vwitch = shutil.which('d2vwitch')
index_file= r'C:\... path ...\test.d2v'
file = r'C:\... path ...\HDV.m2t'
cmd = 'mode con: cols=30 lines=6 | ' + f'"{d2vwitch}" --output "{index_file}" "{file}"' #for windows to set cmd prompt size
p = threading.Thread(target=process, args=(cmd,))
p.start()
p.join()
print('done indexing: ', index_file)
just correcting a code above if someone tests that, that error catching is a nonsense there.
os.system returns error like ChaosKing posted, if it is 0, process went well, on linux it is a bit different because return suppose to be in 16bit with two 8 bit values, but just for Windows - and using a list slot to pass a return value from inside a thread.
import threading
import shutil
import os
from vapoursynth import core
def process(cmd, result):
return_code = os.system(cmd)
result[0]=return_code
d2vwitch = shutil.which('d2vwitch')
index_file= r'C:\... path ...\test.d2v'
file = r'C:\... path ...\HDV.m2t'
cmd = f'title d2vwitch creating: {index_file} | mode con: cols=60 lines=8 | "{d2vwitch}" --output "{index_file}" "{file}"'
results = [None]
p = threading.Thread(target=process, args=(cmd,results))
p.start()
p.join() #waits for thread to finish
#print(results[0])
if results[0]==0:
print('indexing went well')
clip = core.d2v.Source(index_file)
clip.set_output()
else:
print('indexing failed')
ChaosKing
3rd June 2019, 10:09
Hmm I get only1 value in Ubuntu (wsl) and a debian based distro with this:
user@live-pc:~$ python3 -c "import sys, os; r = os.system('-ls -a'); print('return: ', r)"
return: 0
user@live-pc:~$ python3 -c "import sys, os; r = os.system('ls -a-'); print('return: ', r)"
return: 512
You can also try adding os.WEXITSTATUS(os.system('ls -a'))
One value but packed as two 8bit numbers, https://stackoverflow.com/questions/6466711/what-is-the-return-value-of-os-system-in-python/6466753
I was not sure if return is not zero and still it could be ok, so maybe return >> 8 or use that os.WEXITSTATUS, I will set it up later to try.
for linux, Ubuntu 18.04 this seems to work, I hope it works on other unix systems, but that --disable-factory looks controversial:
os.system ('gnome-terminal --disable-factory -x .... command.....')
that would let terminal to pop up with % information while indexing, and python waits for it to finish, then terminal closes and script goes on.
Return code is still zero if terminal is canceled by user so checking if file exists and it is not empty:
import threading
import shutil
import os
from vapoursynth import core
def process(cmd):
os.system(cmd)
d2vwitch = shutil.which('d2vwitch')
index_file = '/home/your user name/ ... /test.d2v'
file = '/home/your user name/ ... /HDV.m2t'
cmd = 'gnome-terminal --disable-factory --hide-menubar --geometry=90x10 '
cmd += f' --title="d2vwitch creating: {index_file}" '
cmd += f' -x "{d2vwitch}" --output "{index_file}" "{file}"'
p = threading.Thread(target=process, args=(cmd,))
p.start()
p.join()
if not (os.path.isfile(index_file) and os.path.getsize(index_file) > 0):
print('indexing failed')
raise FileNotFoundError("Index file was not created or process was canceled")
clip = core.d2v.Source(index_file)
clip.set_output()
sorry I'm back again about d2vwitch output , live readings about continuing progress :-)
using code from this input https://forum.doom9.org/showthread.php?p=1866410#post1866410 that worked indeed, thru stderr, but it looks like it does not work under windows , linux only, reading live output from subprocess.Popen. Do I suppose to use dgindex under windows, or do I do something wrong?
or this is easier code, again, it works on linux only:
import threading
import subprocess
class Cmd(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
process = subprocess.Popen(
[d2vwitch, '--output', output, file],
stderr=subprocess.PIPE,
universal_newlines=True)
for line in process.stderr:
print(line)
file = '09_28-10_29_29.m2t'
d2vwitch = shutil.which('d2vwitch')
output = 'out.d2v'
command = Cmd()
command.start()
command.join()
lansing
26th July 2019, 09:36
There's some difference between the default setting for input color range between dgindex and d2v witch, dgindex said to use "pc range" generally while d2v witch said videos are assumed to have limited range. I'm kind of confused.
jackoneill
26th July 2019, 17:00
There's some difference between the default setting for input color range between dgindex and d2v witch, dgindex said to use "pc range" generally while d2v witch said videos are assumed to have limited range. I'm kind of confused.
The setting DGIndex calls "pc range" will have the same effect as the setting that D2V Witch calls "limited range".
In DGIndex the range setting refers to the range of the output video after conversion to RGB. (This must mean that it assumes all input videos will have limited range YUV.)
From the DGIndex manual:
PC scale - Map output RGB to full range: YUV [16, 235(Y)/240(UV)] -> RGB [0, 255]
TV scale - Map output RGB to clipped range: YUV [16, 235(Y)/240(UV)] -> RGB [16, 235]
lansing
26th July 2019, 19:07
So all dvd source should be using "tv range" in d2v witch and "pc range" in dgindex? But what happen if my source is HDTV? Then it will be "pc range" in d2v witch and dgindex not applicable?
jackoneill
26th July 2019, 22:29
So all dvd source should be using "tv range" in d2v witch and "pc range" in dgindex? But what happen if my source is HDTV? Then it will be "pc range" in d2v witch and dgindex not applicable?
I'm pretty sure HDTV is usually limited range as well, just like DVDs. This is just an assumption, though.
If you do encounter a video with full range YUV, you'll need to use the "full range" option in D2V Witch and the "TV range" option in DGIndex.
Note that the range you pick doesn't matter at all in Avisynth. In VapourSynth it only tells d2vsource what value to give the _ColorRange (http://www.vapoursynth.com/doc/apireference.html#reserved-frame-properties) frame property, and you can always override that in the script with SetFrameProp.
_Al_
27th July 2019, 00:47
limited to full can be changed either manually in d2v file:
line is YUVRGB_Scale=1 or YUVRGB_Scale=0
I think it is properly named, it matters if you convert to RGB (preview on screen).
If you just encode to x264, it does not matter.
d2vfile:
DGIndexProjectFile16
1
D:\path\tape 34-2013_12_25-09_03_53.m2t
Stream_Type=2
MPEG2_Transport_PID=810,814,0
Transport_Packet_Size=188
MPEG_Type=2
iDCT_Algorithm=6
YUVRGB_Scale=1
Luminance_Filter=0,0
Clipping=0,0,0,0
.
.
, or programmatically as well, d2v does not need to be indexed again, if you want to keep those d2v files with proper color range to be identified for RGB conversion,
def correct_byte_for_range(d2v_path, input_range):
log = ''
if input_range == 'full': input_range_number = '0'
else: input_range_number = '1'
'''find a line with 'YUVRGB_Scale' in d2v file and change byte for YUVRGB_Scale line to '1' or '0' if needed '''
with open(d2v_path, 'r+') as f:
offset = 0
try:
for line in f:
if line.strip().startswith('YUVRGB_Scale'):
break
offset += len(line)
if offset:
f.seek(offset+13) #'YUVRGB_Scale=0 or 'YUVRGB_Scale=1'
_range = f.read(1)
if _range != input_range_number:
f.seek(0)
f.seek(offset)
f.write(f'YUVRGB_Scale={input_range_number}')
f.close()
log += f"correcting input range byte in d2v file to '{input_range_number}' - '{input_range}'\n"
except:
raise TypeError("Not dv2 index file or not compatible\n"
"correcting input_range byte failed")
return log
lansing
27th July 2019, 01:30
Okay correct me if I get it wrong, so color range is just a flag to tell vs editor to display the right levels on preview, when we're encoding to x264, x264 is just going to ignore that flag and assumed everything to be tv range by default?
_Al_
27th July 2019, 02:16
It has no meaning for x264, x264 uses YUV values that are in your video
but it is used for YUV to RGB conversion
previewing video (and converting to RGB) is a tricky business, it can fool you thinking you have different video than you really have :-)
jackoneill
27th July 2019, 12:12
Okay correct me if I get it wrong, so color range is just a flag to tell vs editor to display the right levels on preview, when we're encoding to x264, x264 is just going to ignore that flag and assumed everything to be tv range by default?
That's mostly right.
If you're piping the video to x264, the flag gets lost and x264 doesn't know anything about the range.
If you're using x264 through a copy of ffmpeg that can open VapourSynth scripts directly, it's possible that the flag makes it to x264.
In any case, x264 only cares about the range because it can mark the video it produces with a flag that tells video players how to convert the encoded video to RGB. x264 has a command line parameter for this called "--range". (It also has parameters for the matrix, primaries, transfer, chroma location, etc.) If you don't use the parameter, x264 will not mark the video in any way and video players will just have to guess. They most likely guess TV range.
Jukus
14th November 2019, 17:59
When I try to use demux, I get crash to desktop, the empty (0 byte) index file and video in the m2v container.
When I run in the terminal, I get the messages:
kf5.kio.core: We got some errors while running testparm "Load smb config files from /etc/samba/smb.conf\nError loading services.\n"
kf5.kio.core: We got some errors while running 'net usershare info'
kf5.kio.core: "Can't load /etc/samba/smb.conf - run testparm to debug it\n"
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 11792, resource id: 37058093, major code: 40 (TranslateCoords), minor code: 0
Segmentation error (memory stack flushed to disk)
Installed from here:
https://aur.archlinux.org/packages/d2vwitch-git/
Still would like support mkv.
jackoneill
30th November 2019, 15:46
When I try to use demux, I get crash to desktop, the empty (0 byte) index file and video in the m2v container.
When I run in the terminal, I get the messages:
kf5.kio.core: We got some errors while running testparm "Load smb config files from /etc/samba/smb.conf\nError loading services.\n"
kf5.kio.core: We got some errors while running 'net usershare info'
kf5.kio.core: "Can't load /etc/samba/smb.conf - run testparm to debug it\n"
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 11792, resource id: 37058093, major code: 40 (TranslateCoords), minor code: 0
Segmentation error (memory stack flushed to disk)
Installed from here:
https://aur.archlinux.org/packages/d2vwitch-git/
Still would like support mkv.
Thanks for the report. It's fixed now.
Jukus
30th November 2019, 20:54
Thanks for the report. It's fixed now.
Thanks.
Does GUI demux works only without audio, should it be?
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.