Fixes and improvements for bookmark viewer #47

Merged
prpr merged 67 commits from df/webif:df-bookmarkviewer-patch into master 2022-03-25 22:57:16 +00:00
Owner

The previous update introduced a problem when trying to add new bookmarks, in particular when there were none originally.

The jQueryUI slider widget has to be re-created whenever the number of slider handles is changed.

Also:

  • the HTML page is now correctly terminated;
  • the HTML (specific to this page) is less offensive to W3C HTML5 checker;
  • duplicate bookmarks are disallowed.

Two workflows are supported.

Type bookmark positions in seconds into the Bookmarks field, press Update, and the slider is updated with handles at the specified positions. The h:m:s versions of the bookmarks are shown below the Bookmarks field, and in the tooltip of each handle.

Or press the + button to add a bookmark at position 0 (only if there isn't one already), which updates the slider with a new handle as well as the Bookmarks field. To add a new bookmark when one is already at 0, move that one to the new position and use + to add one at 0, or type the new position into Bookmarks and press Update.

The selected bookmark position, corresponding to the last added or selected slider handle, is shown at the left.

When a bookmark is selected you can display thumbnails at -1s, 0s, 1s relative to the bookmark by pressing "Generate Thumbnails". The button icon changes and the button is disabled; temporary thumbnails are shown "Generating..." until the thumbnails have been extracted (several, up to 10s of, seconds). Changing the position of the selected bookmark (including selecting a different bookmark) re-enables "Generate Thumbnails".

One test file that had already passed through the Crop function failed to match the thumbnails to the correct position. Its cropped length was

Pressing - deletes the selected bookmark, and clears any thumbnail display.

The original file (its HMT) is unchanged until you press "Save Bookmarks".

The previous update introduced a problem when trying to add new bookmarks, in particular when there were none originally. The jQueryUI slider widget has to be re-created whenever the number of slider handles is changed. Also: * the HTML page is now correctly terminated; * the HTML (specific to this page) is less offensive to W3C HTML5 checker; * duplicate bookmarks are disallowed. Two workflows are supported. Type bookmark positions in seconds into the Bookmarks field, press Update, and the slider is updated with handles at the specified positions. The `h:m:s` versions of the bookmarks are shown below the Bookmarks field, and in the tooltip of each handle. Or press the + button to add a bookmark at position 0 (only if there isn't one already), which updates the slider with a new handle as well as the Bookmarks field. To add a new bookmark when one is already at 0, move that one to the new position and use + to add one at 0, or type the new position into Bookmarks and press Update. The selected bookmark position, corresponding to the last added or selected slider handle, is shown at the left. When a bookmark is selected you can display thumbnails at -1s, 0s, 1s relative to the bookmark by pressing "Generate Thumbnails". The button icon changes and the button is disabled; temporary thumbnails are shown "Generating..." until the thumbnails have been extracted (several, up to 10s of, seconds). Changing the position of the selected bookmark (including selecting a different bookmark) re-enables "Generate Thumbnails". One test file that had already passed through the Crop function failed to match the thumbnails to the correct position. Its cropped length was Pressing - deletes the selected bookmark, and clears any thumbnail display. The original file (its HMT) is unchanged until you press "Save Bookmarks".
df added 65 commits 2021-05-30 11:25:25 +00:00
3c8ea907de Add thumbnail viewer to Manage Bookmarks
Refactor script to handle UI interaction between Bookmarks, Slider and Thumbnail generation.
580ecb8c75 Add thumbnail viewer to Manage Bookmarks
Finally eliminate end in favour of curval
67e71691eb Retry access in case the settings database is locked
Create `settings::_safer_query` class proc to allow 5 tries with 1s delay; use it for `_nval_setting` and `_tval_setting` methods
1a08892868 Allow minimum width for cut plan
Also
* add ID for estimated time row
* make the <label> for the Save Bookmarks checkbox actually be its label.
b8964c8017 Check that bookmark save succeeded
If not, enable the old "Save new bookmarks" button.

Also
* add icons for buttons
* simplify invert URL handling.
ad9b48b0d2 Remove unnecessary exec
Jim supports the pwd command since at least 6461e8bf6d, so no need to exec it.
0c1bb71520 exists -proc -> exists -command
`exists -command` subsumes `exists -proc`

This test is generally checking whether the command exists, rather than some proc that is overriding it.

Currently `class` is a proc but this may not always be so.
39dae95f28 Set maximum width for File column
Add title attribute to display possibly truncated File as tooltip.

Will this work well for mobile/touchscreen use?
00689a2036 Make 127.0.0.1 the default host for `system dlnahelper`
In all the cases where `system dlnahelper` is called, no host/IP part is specified, and those cases are creating a URL that only needs to be accessible from the same machine, where the loopback address should be the default.

Should fix eg https://hummy.tv/forum/threads/detectads-not-always-succesful.9936/post-147241.
db477e5d42 Add missing $ for certain variable references
Missing $s invalidated attempts to check the length of title, synopsis, guidance.
afee47b6bc Improve status, adding more possible outputs
- check for copying vs playing: the same file.ext is open twice
 - check for playing DLNA: localhost:n->host:9000
 - on HDR, distinguish Playing a show vs streaming it over DLNA
 - distinguish between Watching, Watching (delayed) (timeshift),
   and Not Watching (eg Portal).
df added 1 commit 2021-05-30 11:58:08 +00:00
Owner

I didn't test the thumbnails bit as it takes ages, but the rest of it "works for me".

I didn't test the thumbnails bit as it takes ages, but the rest of it "works for me".
Author
Owner

ages = only a few 10s of seconds on a small media file (500MB or less)!

If ffmpeg has to read through 3GB to find the thumbnail, it will take a lot longer. I assume it doesn't try to decode each frame while finding the frame at the specified offset (-ss), or it really would take ages.

The .nts file provides an index that could facilitate random access into the .ts but sadly there's no easy way to use that with ffmpeg (I think).

ages = only a few 10s of seconds on a small media file (500MB or less)! If ffmpeg has to read through 3GB to find the thumbnail, it will take a lot longer. I assume it doesn't try to decode each frame while finding the frame at the specified offset (`-ss`), or it really would take ages. The .nts file provides an index that could facilitate random access into the .ts but sadly there's no easy way to use that with ffmpeg (I think).
Contributor

ffmpeg indexing is Very fast and independent of file length (if specified corectly, there is a slower version) - no need to use nts

I haven't tried the new bookmarks with thumbnails yet but I have in the past tested timing thumbnail generation several hours into long recording without issue

ffmpeg indexing is Very fast and independent of file length (if specified corectly, there is a slower version) - no need to use nts I haven't tried the new bookmarks with thumbnails yet but I have in the past tested timing thumbnail generation several hours into long recording without issue
Contributor

Tested generating thumbs for a bookmark at 8000 sec and set of 3 took about 5sec which seems very acceptaable

BUT the Generate Thumbnail button is still active if the file has not been decrypted and that does take forever - doesn't return any error indication.
The button should be greyed out (or hidden) if the file has not been decrypted

Tested generating thumbs for a bookmark at 8000 sec and set of 3 took about 5sec which seems very acceptaable **BUT** the Generate Thumbnail button is still active if the file has not been decrypted and that does take forever - doesn't return any error indication. The button should be greyed out (or hidden) if the file has not been decrypted
df added 1 commit 2021-06-02 23:40:21 +00:00
Author
Owner

Good point that occurred to me as I was writing the earlier answer. I had in mind that the bookmark viewer needed decryption, but obvs not.

And that's where the .nts might be useful, by allowing us to skip to the area of interest and decrypt it. But removing the Generate button is a lot easier.

Good point that occurred to me as I was writing the earlier answer. I had in mind that the bookmark viewer needed decryption, but obvs not. And that's where the .nts might be useful, by allowing us to skip to the area of interest and decrypt it. But removing the Generate button is a lot easier.
prpr merged commit 4f55ea1b9f into master 2022-03-25 22:57:16 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: hummypkg/webif#47
No description provided.