Modify

Opened 10 years ago

Last modified 4 years ago

#11017 new defect

3GPP audio files open in browser on Linux

Reported by: stanton Owned by: team
Priority: normal Milestone:
Component: Core audio Version: tested
Keywords: 3gpp audio file gpx browser Cc: naoliv

Description

I'm running r7777 on Ubuntu MATE 14.10 with OpenJDK 7. When I open a GPX track created with OSMTracker for Android and click on an audio file marker (3GPP format), the file opens in Firefox (which in turn launches the audio player).

The JOSM version in the Ubuntu repos (svn6502+dfsg3-1) opens these audio files directly in Totem, without going through the browser – the way it should be.

Examining things, I see that the JOSM build on the Ubuntu repos has some patches applied and is launched through a shell script. I didn't find anything in the patches that looked like it had to do with file associations (though I may have missed something). I tried modifying the Ubuntu script to launch josm-latest.jar (from this site) rather than Ubuntu's JOSM, and I have launched Ubuntu's JOSM JAR directly – results are the same: josm-latest launches the browser, Ubuntu JOSM launches Totem directly.

I have only recently installed Ubutu MATE 14.04 – before that I was on Ubuntu 12.04, also with JOSM downloaded from the website, and audio files would open directly in Totem (no browser involved).

Since the error stays with the JAR and earlier versions (which I used on 12.04) didn't have this problem, I am wondering if this is a recently introduced bug.

Where does JOSM get the information which app to launch for a particular file type? Then I can do some further research into this.

Attachments (2)

status_report.txt (95.1 KB ) - added by stanton 10 years ago.
JOSM status report
2015-02-18_20-43-19.zip (5.3 KB ) - added by stanton 10 years ago.
GPX track with voice note to reproduce

Download all attachments as: .zip

Change History (17)

comment:1 by Don-vip, 10 years ago

Keywords: gpx browser added; associations removed
Owner: changed from team to stanton
Status: newneedinfo

can you please attach your GPX and 3GPP files, and your status report?

by stanton, 10 years ago

Attachment: status_report.txt added

JOSM status report

by stanton, 10 years ago

Attachment: 2015-02-18_20-43-19.zip added

GPX track with voice note to reproduce

comment:2 by stanton, 10 years ago

Owner: changed from stanton to Don-vip
Status: needinfonew

comment:3 by Don-vip, 10 years ago

Owner: changed from Don-vip to team

comment:4 by Don-vip, 10 years ago

What does xdg-open 2015-02-18_20-44-00.3gpp in a terminal on your system?

comment:5 by stanton, 10 years ago

It opens the file in Totem.

comment:6 by naoliv, 9 years ago

Cc: naoliv added

Maybe we could have a simple option to make JOSM execute an external program?
For example, the user could simply choose the program or enter /usr/bin/foo $1 (where $1 (or something similar) gets replaced by the filename)

comment:7 by simon04, 9 years ago

Currently, a 3gpp file is considered as WebMarker, thus a browser window is being opened.

	at org.openstreetmap.josm.tools.OpenBrowser.displayUrl(OpenBrowser.java:42)
	at org.openstreetmap.josm.tools.OpenBrowser.displayUrl(OpenBrowser.java:89)
	at org.openstreetmap.josm.gui.layer.markerlayer.WebMarker.actionPerformed(WebMarker.java:40)
	at org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer$1.mouseReleased(MarkerLayer.java:172)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
...

comment:8 by naoliv, 9 years ago

Could it be hacked to use a custom external program when <link href=… ends in .3gpp?

comment:9 by simon04, 9 years ago

This deserves a better solution than a quick hack for .3gpp files since any other audio format different from .wav is affected as well (org.openstreetmap.josm.gui.layer.markerlayer.Marker#markerProducers).

Last edited 9 years ago by simon04 (previous) (diff)

comment:10 by motogs, 7 years ago

I was referred to this thread from the OSM Forum (my post of 2017-10-22 19:29:00). Thanks to @Klumbumbus for that.
I realise this thread is old but I thought it better to continue it rather than start a new one as my problem appears to be very closely related.

I use OSMTracker to create a GPX file, jpg files and 3gpp files for each track. The locations of the jpg files and the 3gpp files are visible in JOSM as squares with the text "Photo" or "Voice recording" alongside. I can open each photo with a click on the appropriate square, but nothing happens when I click on a "Voice recording" square. In fact JOSM sometimes locks up.

The gpx file, the jpg files and the 3gpp files are all in the same directory. The gpx file contains similar information about the 3gpp files as for the jpg files. I can run the 3gpp files outside of JOSM with a double click in a file manager. (It opens VLC Media Player and plays the file.)

I would like to get JOSM to play the audio files with a click on the appropriate square; I'll be able to map so much more quickly if I can run the audio files from JOSM.

As I understand it, JOSM will run .wav files in this way (though I haven’t tried it yet) so I could convert the .3gpp files to .wav. I’d have to change the references to the files in the .gpx as well though I guess.

I know nothing of Ubuntu but it seems the discussion in this thread implied a request to run other audio formats from JOSM, presumably by using a file association defined in a file manager (or from somewhere else, such as an option within JOSM) to run an appropriate application, or to play it within JOSM itself.

If some feature along these lines is currently implemented in JOSM, how do I use it?

If not, can you please confirm that it can’t be done and I’ll find some work-around.

I'm running JOSM v12921 with Java 1.8.0_151 under Windows XP Home SP3. My usual internet browser is Firefox 52.4.0 and my usual file manager is Windows Explorer.

Thanks.

comment:11 by bastiK, 7 years ago

motogs, there is currently no hidden feature that allows you to customize, how .3gpp files are opened when clicking on the marker. We are relying on Java API to open the file (java.awt.Desktop). The results will depend on the Windows version. There is little chance we will be working on a workaround for Windows XP specifically, as it is out of support for quite a while.

in reply to:  11 comment:12 by Don-vip, 7 years ago

There is little chance we will be working on a workaround for Windows XP specifically

lol there is no chance at all. Please start by updating to Windows 10.

comment:13 by Don-vip, 7 years ago

Ticket #16024 has been marked as a duplicate of this ticket.

comment:14 by Don-vip, 7 years ago

Ticket #16025 has been marked as a duplicate of this ticket.

comment:15 by jalvesaq@…, 4 years ago

I'm on Linux and this issue affects me too. The best workaround is to convert the 3gpp files into wav and replace "3gpp" with "wav" in the gpx file. Then, an arrowhead moves along the track line while the sound is being played by JOSM, which is very helpful. I use the following command in a terminal emulator to convert all the 3gpp files into wav at once:

for a in *.3gpp ; do ffmpeg -i "$a" `basename $a .3gpp`.wav ; done

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 stanton.
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.