Inform user when a video format is not supported

Bug #1365497 reported by Jean-Baptiste Lallement
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
High
Unassigned
mediaplayer-app
Fix Released
High
Renato Araujo Oliveira Filho
media-hub (Ubuntu)
Fix Released
High
Jim Hodapp
media-hub (Ubuntu RTM)
Fix Released
Undecided
Jim Hodapp
mediaplayer-app (Ubuntu)
Fix Released
High
Renato Araujo Oliveira Filho
mediaplayer-app (Ubuntu RTM)
Fix Released
Undecided
Unassigned

Bug Description

When a video format is not supported the result is at best a black or green screen, a black video with audio, or worst case a crash.
Instead of this the player shouldn't try playing the video and inform the user that the format is not supported.

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: mediaplayer-app 0.20.5+14.10.20140820-0ubuntu1 [origin: Ubuntu RTM]
Uname: Linux 3.4.67 armv7l
ApportVersion: 2.14.7-0ubuntu1
Architecture: armhf
Date: Thu Sep 4 15:07:06 2014
InstallationDate: Installed on 2014-09-04 (0 days ago)
InstallationMedia: Ubuntu Utopic Unicorn (development branch) - armhf (20140904-030254)
SourcePackage: mediaplayer-app
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :
summary: - Inform user when a video format is unsupported
+ Inform user when a video format is not supported
Jim Hodapp (jhodapp)
Changed in mediaplayer-app (Ubuntu):
status: New → Confirmed
Changed in mediaplayer-app:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Bill Filler (bfiller) wrote :

@jhodap
how do we know if the video format is supported or not?
Is there an api on the media-hub or some other place to query?

Changed in mediaplayer-app:
importance: Critical → High
Changed in mediaplayer-app (Ubuntu):
importance: Undecided → High
Changed in media-hub:
importance: Undecided → High
assignee: nobody → Jim Hodapp (jhodapp)
Changed in mediaplayer-app:
assignee: nobody → Renato Araujo Oliveira Filho (renatofilho)
Changed in mediaplayer-app (Ubuntu):
assignee: nobody → Renato Araujo Oliveira Filho (renatofilho)
tags: added: 2014-09-25
tags: added: touch-2014-09-25
removed: 2014-09-25
Revision history for this message
Jim Hodapp (jhodapp) wrote :

@Bill: No formal way of doing it yet. I need to add some code to my GStreamer decoder plugin to return this list (it already gets it from the Android layer, just needs to export it) to media-hub where media-hub would present it to a client. I would say for now, put in a static list of mpeg4 and h264 for video codec types. It should support all of the major container types, so no need to check for that. Would you mind filing a bug against media-hub and qtubuntu-media to add this support?

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

@jim @bill
I think the most import is a way to check if a given file is supported we can not relay on the file extension or mime-type since the contents of the file can be different, and there is several containers that support h264 videos.

Revision history for this message
Jim Hodapp (jhodapp) wrote :

@Renato: exactly. We must rely on GStreamer's URI decodebin to tell us what codecs the streams actually are.

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

@Jim

Sorry I am not familiar with the new media-hub, but is the app using gstreamer directly to play videos?
I am trying to understand how the app can test if the video is supported or not? In my point of view we should try to play the video and receive a reply saying that the video format is not supported.

Revision history for this message
Jim Hodapp (jhodapp) wrote :

@Renato: no, the app uses media-hub and media-hub uses playbin from GStreamer. For how it should work, see my comment #3 above.

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :
Download full text (4.2 KiB)

I have implemented error handling on app level, is working fine on Desktop but fails on device.

When I try to run a webm video I get this log:

 mediaplayer-app file:///home/phablet/Videos/Tears_of_Steel-Trailer.webm --desktop_file_hint=/usr/share/applications/mediaplayer-app.desktop
unity::action::ActionManager::ActionManager(QObject*):
 Could not determine application identifier. HUD will not work properly.
 Provide your application identifier in $APP_ID environment variable.
UCUriHandler: Empty "APP_ID" environment variable, ignoring.
Initializing AalServicePlugin
Creating a new static Service instance
virtual int AalMediaPlayerControl::volume() const

virtual QMediaPlayer::State AalMediaPlayerControl::state() const

virtual QMediaPlayer::MediaStatus AalMediaPlayerControl::mediaStatus() const

virtual QMediaPlayer::MediaStatus AalMediaPlayerControl::mediaStatus() const

virtual int AalMediaPlayerControl::volume() const

virtual void AalMediaPlayerControl::stop()

PlaybackStatusChanged signal arrived via the bus.
virtual void AalMediaPlayerControl::setMedia(const QMediaContent&, QIODevice*)

virtual QMediaPlayer::MediaStatus AalMediaPlayerControl::mediaStatus() const

virtual QMediaPlayer::MediaStatus AalMediaPlayerControl::mediaStatus() const

virtual QMediaPlayer::MediaStatus AalMediaPlayerControl::mediaStatus() const

Setting media to: QUrl( "file:///home/phablet/Videos/Tears_of_Steel-Trailer.webm" )
void AalVideoRendererControl::setupSurface()
virtual bool AalMediaPlayerControl::isMuted() const

virtual int AalMediaPlayerControl::volume() const

virtual bool AalMediaPlayerControl::isMuted() const

virtual int AalMediaPlayerControl::volume() const

virtual bool AalMediaPlayerControl::isMuted() const

virtual int AalMediaPlayerControl::volume() const

virtual void AalMediaPlayerControl::setMuted(bool)

virtual void AalMediaPlayerControl::setVolume(int)

virtual int AalMediaPlayerControl::volume() const

virtual void AalMediaPlayerControl::play()

virtual QMediaPlayer::MediaStatus AalMediaPlayerControl::mediaStatus() const

virtual QMediaPlayer::MediaStatus AalMediaPlayerControl::mediaStatus() const

UbuntuWindow - fullscreen geometry
virtual QSGVideoNode* ShaderVideoNodePlugin::createNode(const QVideoSurfaceFormat&)
void AalVideoRendererControl::onTextureCreated(unsigned int) : textureId: 1
Creating video sink
** Setting GLConsumer instance
UbuntuWindow::handleSurfaceFocusChange(focused=true)
void AalVideoRendererControl::onGLConsumerSet()
virtual void core::ubuntu::media::ServiceStub::pause_other_sessions(core::ubuntu::media::Player::PlayerKey)
Actually calling m_hubPlayerSession->play()
Failed to start playback: org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)
Failed to get current playback position: org.freedesktop.DBus.Error.ServiceUnknown: The name core.ubuntu.media.Service was not provided by any .service files
Failed to get current playback position: org.freedesktop.DBus.Error.ServiceUnknown: The name core.ubuntu.media.Service was not provided by any .service files

** (process:551): WARNING **: Unable to register app: GDBus.Error:org.freedesktop.DBus.Error...

Read more...

tags: added: multimedia
tags: added: qa-manual-testing
removed: qa-daily-testing
tags: added: qa-daily-testing
removed: qa-manual-testing
Changed in mediaplayer-app:
status: Triaged → In Progress
Changed in mediaplayer-app (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

@Jim

Looks like media-hub is crashing and not reporting the correct error to the app. If you want I can send you the file that I am using to test.

Revision history for this message
Jim Hodapp (jhodapp) wrote :

@Renato: yeah media-hub will have completely undefined behavior for unsupported formats right now as there is nothing in place to gracefully handle them and report an error. I'm not quite sure what you were expecting?

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

@Jim
Well I am expecting that the QMediaPlayer object reports back an Error using the signal "error"[1];

This is how the application can detect if there is an error or not. Works very well on desktop with gstreamer (I tested it).

There is a enum[2] used to identify which error was. And one of the enum values is "QMediaPlayer::FormatError" which is used to notify the application that this format is not supported.

[1] http://qt-project.org/doc/qt-5/qmediaplayer.html#error-2
[2[ http://qt-project.org/doc/qt-5/qmediaplayer.html#Error-enum

Revision history for this message
Jim Hodapp (jhodapp) wrote :

@Renato: Thanks for the links, that'll be useful for a proper implementation. However, as I noted above, there is nothing underneath in the backend that will properly raise the error signal. In the meantime, I think we could do a simple implementation in qtubuntu-media based on the file extension that raises an error or not depending on if we support that container (and assumed common codec type(s)) in the container. After I finish up the video freeze/framerate bug and fix the video recording orientation bugs, I can assess working out a time table for a proper solution for this bug.

Revision history for this message
Bill Filler (bfiller) wrote :

@Jim
it would be good to do the check at a low level like you suggest, either qtubuntu-media or media-hub as many different apps could request playing media of unsupported types, so checking that at the service level makes sense. Would be good for media-hub to not crash either but I guess that would be less important if we can ensure that it will never try to play anything it cant' handle.

Revision history for this message
Jim Hodapp (jhodapp) wrote :

@Bill: yes I agree and there is a proper solution to this, I was just trying to give you and Renato an idea of what could be a stop-gap measure until I get the higher priority bugs out of the way. So my question is, do you need/want a temporary solution or can you wait until I tackle the other two large bugs knowing that it could be a couple of weeks before I get to the proper solution?

Jim Hodapp (jhodapp)
Changed in media-hub:
status: New → Triaged
tags: added: ota-1 touch-2014-10-23
removed: rtm14 touch-2014-09-25
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mediaplayer-app - 0.20.5+14.10.20141002-0ubuntu1

---------------
mediaplayer-app (0.20.5+14.10.20141002-0ubuntu1) 14.09; urgency=low

  [ Akiva Avraham ]
  * upgrade: import Ubuntu.Components 1.1 import Ubuntu.Components.xxxx
    1.0 except: import Ubuntu.Components.Extras 0.1 // stayed the same
    because I could not find 1.0 in use in any other projects after a
    google search

  [ Alan Pope ]
  * Fix text.

  [ Ubuntu daily release ]
  * New rebuild forced

  [ Leo Arias ]
  * Skip the seekbar tests on the devices that do not have space for it.
    (LP: #1359040)

  [ Pawel Stolowski ]
  * Added X-Ubuntu-Default-Department-ID key to the desktop file. This
    is required by click scope to support departments for preinstalled
    applications.

  [ Renato Araujo Oliveira Filho ]
  * Added comments for TRANSLATORS.
  * Show a proper message if the video format is not supported. (LP:
    #1365497)
  * Fixed images copyright. (LP: #1194916)
  * Update application icon. Avoid using themed icons for application
    icon. Added symbolic icon. (LP: #1365408)

mediaplayer-app (0.20.5+14.10.20140918-0ubuntu1) utopic; urgency=medium

  [ Ted Gould ]
  * Register for video:/// URLs in URL dispatcher
 -- Ubuntu daily release <email address hidden> Thu, 02 Oct 2014 19:12:00 +0000

Changed in mediaplayer-app (Ubuntu RTM):
status: New → Fix Released
Changed in mediaplayer-app:
status: In Progress → Fix Released
Jim Hodapp (jhodapp)
Changed in mediaplayer-app (Ubuntu):
status: In Progress → Fix Released
Jim Hodapp (jhodapp)
Changed in media-hub:
status: Triaged → In Progress
Jim Hodapp (jhodapp)
Changed in media-hub:
status: In Progress → Fix Released
Changed in media-hub (Ubuntu RTM):
status: New → Fix Committed
assignee: nobody → Jim Hodapp (jhodapp)
affects: media-hub → ubuntu
affects: ubuntu → media-hub (Ubuntu)
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

we were tracking the dupe

Changed in canonical-devices-system-image:
importance: Undecided → High
milestone: none → ww07-2015
status: New → Fix Released
Jim Hodapp (jhodapp)
Changed in media-hub (Ubuntu RTM):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.