Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ld-cut issues #495

Closed
toynbeeidea opened this issue May 27, 2020 · 4 comments
Closed

ld-cut issues #495

toynbeeidea opened this issue May 27, 2020 · 4 comments
Assignees
Labels
deficiency ld-decode An issue only affecting the ld-decode[r]

Comments

@toynbeeidea
Copy link

toynbeeidea commented May 27, 2020

While trying to splice out a clip for #493, I used the following command:

./ld-cut -S 85798 -l 500 -n /run/media/erik/NAS4FreeSync/RTW.ldf /run/media/erik/NAS4FreeSync/rtw-clip.lds

Which gave a message, "ERROR: Seeking failed," and froze until I ctrl-c'd out of it. Not terribly specific.

I kept inching back to find a spot that wouldn't error. Backing up to 85650 gave:

Traceback (most recent call last):
File "/home/erik/github/ld-decode/lddecode/core.py", line 2697, in decodefield
f.process()
File "/home/erik/github/ld-decode/lddecode/core.py", line 2365, in process
super(FieldNTSC, self).process()
File "/home/erik/github/ld-decode/lddecode/core.py", line 1226, in process
self.linelocs2 = self.refine_linelocs_hsync()
File "/home/erik/github/ld-decode/lddecode/core.py", line 1746, in refine_linelocs_hsync
if nb_min(hsync_area) < self.rf.iretohz(-55) or nb_max(hsync_area) > self.rf.iretohz(30):
File "/usr/lib/python3.8/site-packages/numba/np/arraymath.py", line 502, in array_min_impl
raise ValueError(MSG)
ValueError: zero-size array to reduction operation minimum which has no identity

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "./ld-cut", line 63, in
startloc = ldd.seek(args.start, args.seek)
File "/home/erik/github/ld-decode/lddecode/core.py", line 3126, in seek
fnr = self.seek_getframenr(cur)
File "/home/erik/github/ld-decode/lddecode/core.py", line 3097, in seek_getframenr
f, offset = self.decodefield(initphase = True)
File "/home/erik/github/ld-decode/lddecode/core.py", line 2701, in decodefield
self.internalerrors.append(e)
AttributeError: 'int' object has no attribute 'append'

Backing up to 85649 worked exactly as expected.

@happycube
Copy link
Owner

happycube commented May 28, 2020 via email

@happycube
Copy link
Owner

happycube commented May 31, 2020

What I'll look at in the morning: If -s is not specified (in ld-decode or -cut), try jumping the same distance. If that fails (typically because it's a clip), try again with -s 0.

(edit: done!)

happycube added a commit that referenced this issue May 31, 2020
Issue #495: begin seek well into the file by default
@happycube happycube self-assigned this May 31, 2020
@happycube happycube added deficiency ld-decode An issue only affecting the ld-decode[r] labels May 31, 2020
@toynbeeidea
Copy link
Author

Sorry, haven't had a chance to mess with the fix yet... will check it out shortly and report back.

@toynbeeidea
Copy link
Author

Seems to work as expected. Nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deficiency ld-decode An issue only affecting the ld-decode[r]
Projects
None yet
Development

No branches or pull requests

2 participants