Play file in browser or with external helper application #34
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "df/webif:df-playmedia-patch"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replace the obsolete VLC player with the following scheme to play media in the browser or using an external player:
ffmpeg
which is analysed to extract duration, container and video codec; the Play button closes the dialog and plays mp4, mkv and webm containers with h264, av1 or vp9 video in the browser's HTML5 video player, or otherwise downloads a playlist file as before;To do:
This patch should solve the problem raised in this forum thread and makes use of suggestions from forum user imanon.
httpheader
772d91a9f840a13a871a
toe896ec5adc
The last hunk of webif/lib/system.class needs removing.
Great minds, etc: I already prepared the attached patch (now deleted).
It appeared to apply to webif 1.4.9-3 using a real patch program:
I don't have any confidence about the equivalent with Busybox patch:
Also, you might think that rebasing the patch branch against the latest master would either eliminate any conflict or bring up a conflict resolution edit. When Linus named it git, I didn't realise he was an Alf Garnett fan.
Oh, and
.patch
isn't an allowed file type for the server and is secretly not attached. Admittedly not a complete secret if you know that there's a restriction, as its icon and tooltip try to distinguish the issue, but an actual error message, or just doing what you're told, would be better.Update 2021-03-15 17:19
The previously attached zipped
.diff
finally correctly updated HDR as well as HD, but still didn't work with Busybox patch.The same now applies to the default
.diff
file that Gitea generates, and you'll get the latest commits too. So:/mod/bin
;.diff
and apply it to a system with webif-1.4.9-3, using something like the first command above:Still have "This pull request has changes conflicting with the target branch.
webif/lib/system.class"
Attaching patches isn't going to fix that, and proably just causes more confusion.
In any case, the patches are still broken:
"
humax /mnt/hd2/mod # patch -p1 <df-playmedia.patch
patching file webif/html/browse/download.jim
patching file webif/lib/system.class
patching file webif/lib/system.class
Hunk #2 FAILED at 312.
1 out of 2 hunks FAILED -- saving rejects to file webif/lib/system.class.rej
patching file webif/lib/setup
patching file webif/html/browse/index.jim
Hunk #2 succeeded at 139 (offset 3 lines).
patching file webif/html/browse/file.jim
patching file webif/html/browse/play.jim
patching file webif/html/browse/script.js
humax /mnt/hd2/mod # cat webif/lib/system.class.rej
--- webif/lib/system.class
+++ webif/lib/system.class
@@ -312,7 +312,7 @@ proc {system dlnaurl} {file {urlbase ""}} {
return $ret
}
-proc {system dlnahelper} {file {urlbase ""}} {
+proc {system dlnahelper} {file {urlbase "127.0.0.1"}} {
set dir /mnt/hd2/mod/.dlnahelper
require lock
"
After that, there is an unmatched brace at file.jim:264
I tried adding one in a likely looking place (274 or EOF) which kinda made things work.
The Media Details Info item just sits there say "Loading..." on a non-TS file.
The Play button didn't seem to get enabled either way.
01afb288bb
toed9df1796d
Git: a system for making an unholy f---ing mess out of calm and order, causing much frustration in the process.
The source of the hassle appears to be this:
b0b1093eac
Hunk 2 has already been applied in hummypkg/master but somehow it isn't in this commit, so I guess this is what you need to rebase? Or maybe not, I dunno. Or just do whatever to make it go away and put the change in a separate PR.
The .patch file just seems to make more mess.
At least using the .diff file I only get this one conflict, which is easily dealt with.
Using the .patch file causes five.
I don't know when/why you would use .patch over .diff, or vice-versa.
There is an element of user error here (perhaps several).
Apparently
.patch
output is meant to be used withgit am <patchfile>
. Forpatch
, one needs.diff
.Eliminating the duplicated change to
system.class
gives a.diff
that applies to the latest beta using GNU patch. Busybox patch 1.20 fails to apply the change towebif/lib/setup
which means you get to read the HTTP message containing the playlist instead of the playlist being downloaded and played. In either case the new filewebif/html/browse/play.jim
has to be made executable. Perhapsgit am
can do that from thecreate mode
line in the.patch
file.And some bizarre typos and misunderstandings needed to be cleared up to get it working on HDRs as well as HDs.
I've updated the tweaked patch.
fe57094a1a
to36b8b43a17
And now unbundled the double update to eliminate the conflict.
WIP: df-playmedia-patchto df-playmedia-patchf6a3b999c4
to44bb8f774d
44bb8f774d
tof0a1c0be1b
I've been using GNU Patch for a while (got fed up with lack of --dry-run on the stock one).
The create mode permissions seem to be 644 in the diff, which is not terribly useful as far as creating executable code goes, so I had to "chmod +x" it.
All working nicely now though.
36f40170e0
to7964145677
It works OK for me.
Is this one ready to go into a beta? I can do the necessary re-basing etc.
git
on the command line does handle conflicts and merges well in my experience, it's just a matter of going in and finding the conflict markers etc.I think it is, but it's not my PR :-)
The /mod/webif/html/play tree needs removing too, as that's not in this.
It applies cleanly on 1.4.9-3 now, so no re-basing needed I would think.
What @prpr said.
I came to the conclusion that the problem area was a similar commit in the master and patch branches, where the patch commit repeated the change from master and added a further change. In rebasing you can only omit a commit or reorder/relog it but you can't modify the actual change. Once you get to merging, the conflict markers should come into play.
To-do item "test on HDR" has been achieved.
/mod/webif/html/browse/file.jim:287: Error: missing quote
at file "/mod/webif/html/browse/file.jim", line 287
/mod/webif/html/browse/file.jim:297: Error: unmatched "["
at file "/mod/webif/html/browse/file.jim", line 297
/mod/webif/lib/system.class:302: Error: invalid command name "http://aa.bb.cc.dd:9000/web/media/nnnnn.TS]"
at file "/mod/webif/lib/system.class", line 302
Line 300 looks wrong to me - spurious " }" on the end.
df-playmedia-patchto Play file in browser or with external helper applicationThis breaks the system dlnahelper function used by autodecrypt and chaseget see
Do not promote from Beta until fixed
Yes, that is the problem. The dlnahelper is deliberately using a link to the real ts file so that it doesn't conflict with the indexing of the real file by the humax so we must not use the normalized name.
I think it might work to create helper.ts as a hard link instead of symbolic link in system dlnahelper
Alternatively require the callers of system dlnaurl supply the normalized name when needed - are there many callers that don't
I could only find 3:
I know. WiP. Will fix it all properly shortly.