Modify

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)

Screenshot from 2016-09-03 10-17-39.png (33.8 KB ) - added by openstreetmap.org-user-d1g 8 years ago.
3seg_outer_1seg_inner_after_handbrake_normal.m4v (847.1 KB ) - added by openstreetmap.org-user-d1g 8 years ago.
mediainfo 3seg_outer_1seg_inner.mp4 output (2.4 KB ) - added by openstreetmap.org-user-d1g 8 years ago.
mediainfo 3seg_outer_1seg_inner_after_handbrake_normal.m4v output (2.9 KB ) - added by openstreetmap.org-user-d1g 8 years ago.

Download all attachments as: .zip

Change History (17)

by openstreetmap.org-user-d1g, 8 years ago

comment:1 by Don-vip, 8 years ago

Keywords: video added
Summary: There no support for video in embedded helpAdd support for video in embedded help
Type: defectenhancement

comment:2 by skyper, 8 years ago

Well, the video does not work with my firefox-esr (45.3.0) from Debian stable neither.

comment:3 by openstreetmap.org-user-d1g, 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>

in reply to:  2 comment:4 by openstreetmap.org-user-d1g, 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.

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 openstreetmap.org-user-d1g, 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.

in reply to:  2 ; comment:6 by openstreetmap.org-user-d1g, 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 -

in reply to:  6 ; comment:7 by skyper, 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.

in reply to:  7 ; comment:8 by openstreetmap.org-user-d1g, 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 to Main@L4

by openstreetmap.org-user-d1g, 8 years ago

by openstreetmap.org-user-d1g, 8 years ago

in reply to:  8 comment:9 by skyper, 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 to Main@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 openstreetmap.org-user-d1g, 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 openstreetmap.org-user-d1g, 8 years ago

Keywords: embedded-browser added; help removed

comment:12 by openstreetmap.org-user-d1g, 8 years ago

comment:13 by taylor.smock, 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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to openstreetmap.org-user-d1g.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.