Opened 8 years ago
Last modified 2 years ago
#13520 new enhancement
Add support for video in embedded help
Reported by: | openstreetmap.org-user-d1g | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | video, embedded-browser | Cc: |
Description
What steps will reproduce the problem?
Try to view Help/Action/CreateMultipolygon or Help/Action/UpdateMultipolygon with embedded videos in embedded browser.
What is the expected result?
Ideally, we should watch video similar to trac, at least layout should be the same with link to real video at trac page.
What happens instead?
There no hint about video.
Please provide any additional information below. Attach a screenshot if possible.
URL:http://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2016-09-03 03:27:18 +0200 (Sat, 03 Sep 2016) Build-Date:2016-09-03 01:37:36 Revision:10936 Relative:URL: ^/trunk Identification: JOSM/1.5 (10936 en) Linux Ubuntu 16.04.1 LTS Memory Usage: 222 MB / 1774 MB (113 MB allocated, but free) Java version: 1.8.0_91-8u91-b14-3ubuntu1~16.04.1-b14, Oracle Corporation, OpenJDK 64-Bit Server VM Screen: :0.0 1920x1080 Maximum Screen Size: 1920x1080 Java package: openjdk-8-jre:amd64-8u91-b14-3ubuntu1~16.04.1 WebStart package: icedtea-netx:amd64-1.6.2-3ubuntu1 VM arguments: [-Dicedtea-web.bin.name=javaws, -Dicedtea-web.bin.location=/usr/bin/javaws, -Djava.security.manager, -Djava.security.policy=/etc/icedtea-web/javaws.policy] Dataset consistency test: No problems found
Attachments (4)
Change History (17)
by , 8 years ago
Attachment: | Screenshot from 2016-09-03 10-17-39.png added |
---|
comment:1 by , 8 years ago
Keywords: | video added |
---|---|
Summary: | There no support for video in embedded help → Add support for video in embedded help |
Type: | defect → enhancement |
follow-ups: 4 6 comment:2 by , 8 years ago
comment:3 by , 8 years ago
HTML5 <video> tag is stripped down ATM by tracwiki
{{{ #!html <h1 style="text-align: right; color: blue"> HTML video test starts here </h1> <div class="flowplayer" data-ratio="0.4167"> <video width="320" height="240" controls loop autoplay muted> <source src="https://josm.openstreetmap.de/raw-attachment/wiki/Help/Action/CreateMultipolygon/3seg_outer_1seg_inner.mp4" type="video/mp4"> Your browser does not support the video tag. </video> </div> <h1 style="text-align: right; color: red"> HTML video test ends here </h1> }}}
will result in
<!-- blue block --> <div class="flowplayer"> <!-- no video tag or any player --> </div> <!-- red block -->
otherwise code below should work locally and from other domains (CSR)
<video width="320" height="240" controls loop autoplay muted> <source src="https://josm.openstreetmap.de/raw-attachment/wiki/Help/Action/CreateMultipolygon/3seg_outer_1seg_inner.mp4" type="video/mp4"> Your browser does not support the video tag. </video>
comment:4 by , 8 years ago
Replying to skyper:
Well, the video does not work with my firefox-esr (45.3.0) from Debian stable neither.
Probably not Firefox specific (Debian issue). Can you play .mp4 file outside browser?
caniuse says:
Firefox supports H.264 on Linux since version 26 if the appropriate gstreamer plug-ins are installed.
- https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats#MP4_H.264_(AAC_or_MP3) - mentions licensing questions
- https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats#Browser_compatibility - cross browser table [Link 1]
- http://caniuse.com/#feat=mpeg4 - reported as supported by most/all browsers both desktop and mobile [Link 2]
Well if HTML5 was fully accessible at TracWiki then I would simply upload secondary VP8/WebM video (or whatever container/codec pair can be played at every other platform) and add video/source pair.
comment:5 by , 8 years ago
Well text "Your browser does not support the video tag." can be replaced with actual GIF as <img>.
But again, I cannot do this because of stripping.
follow-up: 7 comment:6 by , 8 years ago
Replying to skyper:
Well, the video does not work with my firefox-esr (45.3.0) from Debian stable neither.
Please tell me if you can play videos with yuv420/baseline here: http://www.trinckle.com/videotest.php -
follow-up: 8 comment:7 by , 8 years ago
Replying to openstreetmap.org-user-d1g:
Replying to skyper:
Well, the video does not work with my firefox-esr (45.3.0) from Debian stable neither.
Please tell me if you can play videos with yuv420/baseline here: http://www.trinckle.com/videotest.php -
No problem with any video, all playing.
Replying to openstreetmap.org-user-d1g:
Replying to skyper:
Well, the video does not work with my firefox-esr (45.3.0) from Debian stable neither.
Probably not Firefox specific (Debian issue). Can you play .mp4 file outside browser?
Now it turns out be be strange. mplayer2 and vlc play the videos but totem and sushi demand a codec.
follow-up: 9 comment:8 by , 8 years ago
Replying to skyper:
Now it turns out be be strange. mplayer2 and vlc play the videos
Not strange at all, they should play anything
but totem and sushi demand a codec.
Well this is off-topic to JOSM, but I was using Kazam with default settings, but apparently they are terrible: https://answers.launchpad.net/kazam/+question/241829 do not use Kazam for anything other than raw recording.
https://trac.ffmpeg.org/wiki/Encode/H.264#Encodingfordumbplayers
converted this file using Handbrake 0.10.2 "normal" profile:
- Chroma subsampling was changed to
4:2:0
- Format profile changed from
High 4:4:4 Predictive@L3.1
toMain@L4
by , 8 years ago
Attachment: | 3seg_outer_1seg_inner_after_handbrake_normal.m4v added |
---|
by , 8 years ago
Attachment: | mediainfo 3seg_outer_1seg_inner.mp4 output added |
---|
by , 8 years ago
Attachment: | mediainfo 3seg_outer_1seg_inner_after_handbrake_normal.m4v output added |
---|
comment:9 by , 8 years ago
Replying to openstreetmap.org-user-d1g:
Replying to skyper:
Now it turns out be be strange. mplayer2 and vlc play the videos
Not strange at all, they should play anything
I use only official packages, e.g.:
All players should be able to use the same libraries and should not include them within the core binary. So either all should fail or some look for more libraries or some player include them.
but totem and sushi demand a codec.
Well this is off-topic to JOSM, but I was using Kazam with default settings, but apparently they are terrible: https://answers.launchpad.net/kazam/+question/241829 do not use Kazam for anything other than raw recording.
https://trac.ffmpeg.org/wiki/Encode/H.264#Encodingfordumbplayers
converted this file using Handbrake 0.10.2 "normal" profile:
- Chroma subsampling was changed to
4:2:0
- Format profile changed from
High 4:4:4 Predictive@L3.1
toMain@L4
Sorry, but still no different result.
Anyway, speaking for myself, I have options to view the files, e.g. not worse the effort and off topic.
comment:10 by , 8 years ago
Wait a second, why do we have an embedded browser in the first place?
What if external browser (chrome/firefox) will open local / remote help (depending on the settings)?
The only reason to use an embedded browser is when local system outside JOSM in not able to open html page/link. Is this true in 2016?
comment:11 by , 8 years ago
Keywords: | embedded-browser added; help removed |
---|
comment:13 by , 2 years ago
For the embedded help browser, we use HTMLEditorKit (actually, we subclass it in JosmHTMLEditorKit). HTMLEditorKit only implements HTML 3.2 and a subset of HTML 4, with no support for HTML 5.
We do have the ability to open browser windows (see OpenBrowser), but on some systems it may not happen.
The problem with video comes down to the codecs. I don't think we will support them -- the patent situation with most video codecs is complex. For example, the base patents for h264 should start expiring next year, but some functionality has been added to h264 since the initial public release. Maybe by 2030 we can start looking at adding a dependency for known patent-ended codecs, but I don't think it is worth it.
With that said, there is a button in the help browser to open a page in the user's browser.
Well, the video does not work with my firefox-esr (45.3.0) from Debian stable neither.