Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#17970 closed enhancement (wontfix)

Build against GStreamer 1.0 by default on Linux

Reported by: slycelote Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: AffectsTails
Cc: intrigeri, angelotheram Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

During playback of mp4 videos I only see a white screen. Firefox on the same machine works fine. Also, webm videos work.
Steps to reproduce: create an HTML document with the following content:

<!doctype html>
<html>
<head>
</head>
<body>
<video src="video.mp4" controls >
</video>
</body>
</html>

Put an mp4 file next to the document and open it.
Tor browser version 5.0.6.

Child Tickets

Change History (22)

comment:1 Changed 5 years ago by cypherpunks

Version: Tor: unspecified

During playback of mp4 videos I only see a white screen. Firefox on the same machine works fine. Also, webm videos work.

Media formats supported by the HTML audio and video elements:

To avoid patent issues, support for MPEG 4, H.264 and MP3 is not built directly into Firefox. Instead it relies on support from the OS or hardware (the hardware also needs to be able to support the profile used to encode the video, in the case of MP4). Firefox supports these formats on the following platforms: Windows Vista+ since Firefox 22.0, Android since Firefox 20.0, Firefox OS since Firefox 15.0, Linux since Firefox 26.0 (relies on GStreamer codecs) and OS X 10.7 since Firefox 35.0.

comment:2 in reply to:  1 Changed 5 years ago by slycelote

Yeah, I saw that page, that's why I mentioned that Firefox works on the same configuration. The problem is in Tor Browser. Latest version is based on Firefox 38, so it should work.

Replying to cypherpunks:

During playback of mp4 videos I only see a white screen. Firefox on the same machine works fine. Also, webm videos work.

Media formats supported by the HTML audio and video elements:

To avoid patent issues, support for MPEG 4, H.264 and MP3 is not built directly into Firefox. Instead it relies on support from the OS or hardware (the hardware also needs to be able to support the profile used to encode the video, in the case of MP4). Firefox supports these formats on the following platforms: Windows Vista+ since Firefox 22.0, Android since Firefox 20.0, Firefox OS since Firefox 15.0, Linux since Firefox 26.0 (relies on GStreamer codecs) and OS X 10.7 since Firefox 35.0.

comment:3 Changed 5 years ago by cypherpunks

Tested ESR-38 and Tor Browser 5.0.6 on the Win7 (default system's DirectShow installation, without any system-wide browser plugins installed.). Works fine for both browsers.

comment:4 Changed 5 years ago by slycelote

Ahh, right, I forgot to mention the OS, it's Trisquel distribution;

Linux trisquel-laptop 3.13.0-74-lowlatency #118+7.0trisquel2 SMP PREEMPT Sat Dec 19 11:50:41 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

comment:5 Changed 5 years ago by cypherpunks

Tor Browser 5.0.6 for Linux using gstreamer 0.10 (?) to play MP4 (if plugins support it was installed), what gstreamer version used by tested Firefox?

comment:6 Changed 5 years ago by cypherpunks

Summary: Only audio in mp4 videosEnable Gstreamer 1.0 support instead of 0.1 by default

comment:7 Changed 5 years ago by slycelote

I have both 0.10 and 1.0 gstreamer installed (see the list below). Not sure how to figure out which one FF uses. BTW, I tested another machine with Ubuntu 14.04 and the behavior is the same.

i   bluez-gstreamer                                                              - Bluetooth GStreamer support                                                            
i A gir1.2-gstreamer-1.0                                                         - Description: GObject introspection data for the GStreamer library                      
i   gstreamer0.10-alsa                                                           - GStreamer plugin for ALSA                                                              
i   gstreamer0.10-fluendo-mp3                                                    - Fluendo mp3 decoder GStreamer 0.10 plugin                                              
i A gstreamer0.10-gconf                                                          - GStreamer plugin for getting the sink/source information from GConf                    
i   gstreamer0.10-gnonlin                                                        - non-linear editing module for GStreamer                                                
i A gstreamer0.10-nice                                                           - ICE library (GStreamer 0.10 plugin)                                                    
i   gstreamer0.10-plugins-bad                                                    - GStreamer plugins from the "bad" set                                                   
i A gstreamer0.10-plugins-base                                                   - GStreamer plugins from the "base" set                                                  
i   gstreamer0.10-plugins-base-apps                                              - GStreamer helper programs from the "base" set                                          
i A gstreamer0.10-plugins-good                                                   - GStreamer plugins from the "good" set                                                  
i   gstreamer0.10-plugins-ugly                                                   - GStreamer plugins from the "ugly" set                                                  
i   gstreamer0.10-pulseaudio                                                     - GStreamer plugin for PulseAudio                                                        
i A gstreamer0.10-tools                                                          - Tools for use with GStreamer                                                           
i   gstreamer0.10-vaapi                                                          - VA-API plugins for GStreamer                                                           
i   gstreamer0.10-x                                                              - GStreamer plugins for X11 and Pango                                                    
i   gstreamer1.0-alsa                                                            - GStreamer plugin for ALSA                                                              
i A gstreamer1.0-clutter                                                         - Clutter PLugin for GStreamer 1.0                                                       
i   gstreamer1.0-crystalhd                                                       - Crystal HD Video Decoder (GStreamer plugin)                                            
i   gstreamer1.0-fluendo-mp3                                                     - Fluendo mp3 decoder GStreamer 1.0 plugin                                               
i A gstreamer1.0-gnonlin                                                         - non-linear editing module for GStreamer                                                
i   gstreamer1.0-libav                                                           - libav plugin for GStreamer                                                             
i   gstreamer1.0-nice                                                            - ICE library (GStreamer plugin)                                                         
i A gstreamer1.0-plugins-bad                                                     - GStreamer plugins from the "bad" set                                                   
i A gstreamer1.0-plugins-bad-faad                                                - GStreamer faad plugin from the "bad" set                                               
i A gstreamer1.0-plugins-bad-videoparsers                                        - GStreamer videoparsers plugin from the "bad" set                                       
i A gstreamer1.0-plugins-base                                                    - GStreamer plugins from the "base" set                                                  
i A gstreamer1.0-plugins-good                                                    - GStreamer plugins from the "good" set                                                  
i   gstreamer1.0-plugins-ugly                                                    - GStreamer plugins from the "ugly" set                                                  
i   gstreamer1.0-pulseaudio                                                      - GStreamer plugin for PulseAudio                                                        
i   gstreamer1.0-tools                                                           - Tools for use with GStreamer                                                           
i   gstreamer1.0-vaapi                                                           - VA-API plugins for GStreamer                                                           
i A gstreamer1.0-x                                                               - GStreamer plugins for X11 and Pango                                                    
i A libgstreamer-plugins-bad0.10-0                                               - GStreamer shared libraries from the "bad" set                                          
i A libgstreamer-plugins-bad1.0-0                                                - GStreamer development files for libraries from the "bad" set                           
i A libgstreamer-plugins-base0.10-0                                              - GStreamer libraries from the "base" set                                                
i A libgstreamer-plugins-base1.0-0                                               - GStreamer libraries from the "base" set                                                
i A libgstreamer-plugins-good1.0-0                                               - GStreamer development files for libraries from the "good" set                          
i A libgstreamer-vaapi0.10                                                       - GStreamer libraries from the "vaapi" set                                               
i A libgstreamer-vaapi1.0-0                                                      - GStreamer libraries from the "vaapi" set                                               
i A libgstreamer0.10-0                                                           - Core GStreamer libraries and elements                                                  
i A libgstreamer1.0-0                                                            - Core GStreamer libraries and elements                                                  

comment:8 in reply to:  7 ; Changed 5 years ago by cypherpunks

Replying to slycelote:

I have both 0.10 and 1.0 gstreamer installed (see the list below). Not sure how to figure out which one FF uses. BTW, I tested another machine with Ubuntu 14.04 and the behavior is the same.

Open about:buildconfig page and look for "--enable-gstreamer=" at "Configure arguments". If absent then 0.10 used else number version specified there.

EDIT: fixed page name.

Last edited 5 years ago by cypherpunks (previous) (diff)

comment:9 in reply to:  8 Changed 5 years ago by slycelote

Thanks! Indeed, it says --enable-gstreamer=1.0 in Firefox and is absent in Tor Browser.

Replying to cypherpunks:

Replying to slycelote:

I have both 0.10 and 1.0 gstreamer installed (see the list below). Not sure how to figure out which one FF uses. BTW, I tested another machine with Ubuntu 14.04 and the behavior is the same.

Open about:buildconfig page and look for "--enable-gstreamer=" at "Configure arguments". If absent then 0.10 used else number version specified there.

EDIT: fixed page name.

comment:10 Changed 5 years ago by cypherpunks

Summary: Enable Gstreamer 1.0 support instead of 0.1 by defaultBuild against GStreamer 1.0 by default on Linux
Type: defectenhancement

name: "torbrowser-linux"
suites:

  • "lucid"
  • "libgstreamer-plugins-base0.10-dev"

There are no 1.0 version in lucid, it's hard to simply change used version. Mozilla closed as wontfix such wishes too, as many distributives in-use still has no anything besides 0.10

And many distributives nuked support for mp4 plugins by gstreamer-0.10. There are no good resolve for this ticket, half of Linux's user base have been affected by any decision for today.

comment:11 Changed 5 years ago by intrigeri

Some data points (I'm still not sure what exactly should be done here):

  • Debian Jessie has GStreamer 1.0, and lacks the ffmpeg plugin for GStreamer 0.10 => MP4 video playback is broken in Tor Browser on Tails 2.0~beta1 (scheduled to become stable at the end of the month), while it worked just fine on Wheezy-based Tails 1.x. Moving to GST 1.0 would improve things.
  • Debian Wheezy has gstreamer1.0 available from the official backports repository. It also has GSTreamer 0.10 in the main repo => moving to GST 1.0 would break things but there is a relatively easy workaround.
  • Among currently supported Ubuntu releases, only 12.04 LTS (Precise) is lacking GStreamer 1.0, and only it has gstreamer1.0-ffmpeg; if we really want to keep supporting video playback on Precise, perhaps a backport would be doable there too: what applies to Debian Wheezy often applies to Ubuntu Precise, which is quite similar. In the current state of things, moving to GST 1.0 would improve things on all supported Ubuntu releases, except it would make them worse on Precise (but a backport would help there).
  • On Arch Linux it seems that gstreamer0.10-ffmpeg is available from the Extras repo only. And of course it has GSTreamer 1.0 too.
  • In the Red Hat world, no such thing like gstreamer0.10-ffmpeg in the official repos; but various third party repos propose that plugin. No idea if people running these distros actually trust and use these repos, so no idea if they currently have working MP4 video in Tor Browser.

With my Tails and Debian hats, of course I would prefer if Tor Browser was built against GSTreamer 1.0. The above data suggests it would not make things worse on Red Hat and Arch.

What other information do we need to make a decision?

comment:12 Changed 5 years ago by intrigeri

Keywords: AffectsTails added

comment:13 Changed 5 years ago by intrigeri

Cc: intrigeri added

comment:14 Changed 5 years ago by FireballDWF

gstreamer dependency has been removed from Firefox 46 according to https://bugzilla.mozilla.org/show_bug.cgi?id=1234092 and may have been removed as early as Firefox 44 according to https://bugzilla.mozilla.org/show_bug.cgi?id=947287

comment:15 Changed 5 years ago by cypherpunks

Yet about switching to GStreamer 1.0:

Note that we've seen tons of crashes with that coming from ubuntu builds that have flipped this switch. I wouldn't recommend people to use it - though for MP3 only it may be fine, the crashes could have been video.

comment:16 Changed 5 years ago by gk

Cc: angelotheram added

#18158 is a duplicate.

comment:17 Changed 5 years ago by angelotheram

Is there a workaround for this under Linux or Tails? I'm willing to run installs from debian etc.

comment:18 in reply to:  14 ; Changed 5 years ago by intrigeri

Replying to FireballDWF:

gstreamer dependency has been removed from Firefox 46 according to https://bugzilla.mozilla.org/show_bug.cgi?id=1234092 and may have been removed as early as Firefox 44 according to https://bugzilla.mozilla.org/show_bug.cgi?id=947287

Thanks. So perhaps it's not worth putting time+energy into changing which version of GStreamer we build against: long term, we'll get the functionality we need via MSE instead.

But it would be nice to have a short-term workaround. It was suggested on the Tails bug tracker to set these prefs:

media.mediasource.enabled true
media.fragmented-mp4.exposed true
media.fragmented-mp4.ffmpeg true
media.fragmented-mp4.gmp true

... and I confirm this fixes MPEG-4 video support for me. Do Tor Browser developers think it's safe to apply these changes in Tails? (and ideally in TBB)

If preferred I can create a dedicated ticket about this short-term workaround topic, so that we can close (as rejected, I guess) this one. Or, we can repurpose this one.

comment:19 in reply to:  18 Changed 5 years ago by gk

Replying to intrigeri:

Replying to FireballDWF:

gstreamer dependency has been removed from Firefox 46 according to https://bugzilla.mozilla.org/show_bug.cgi?id=1234092 and may have been removed as early as Firefox 44 according to https://bugzilla.mozilla.org/show_bug.cgi?id=947287

Thanks. So perhaps it's not worth putting time+energy into changing which version of GStreamer we build against: long term, we'll get the functionality we need via MSE instead.

But it would be nice to have a short-term workaround. It was suggested on the Tails bug tracker to set these prefs:

media.mediasource.enabled true
media.fragmented-mp4.exposed true
media.fragmented-mp4.ffmpeg true
media.fragmented-mp4.gmp true

... and I confirm this fixes MPEG-4 video support for me. Do Tor Browser developers think it's safe to apply these changes in Tails? (and ideally in TBB)

Hm...

446 // We want to enable on non-release  builds and on release windows and mac
447 // but on release builds restrict to YouTube. We don't enable for other
448 // configurations because code for those platforms isn't ready yet.

https://mxr.mozilla.org/mozilla-esr38/source/modules/libpref/init/all.js

comment:20 Changed 5 years ago by intrigeri

OK, so it seems to be too early to enable MSE. Thanks!

This comment has disappeared on the release branch: https://mxr.mozilla.org/mozilla-release/source/modules/libpref/init/all.js which confirms that on ESR45 we won't need GStreamer anymore (https://bugzil.la/947287#c52, https://bugzil.la/1234092). So IMO we should reject this ticket, and things should work just fine once we're based on ESR45 :)

comment:21 Changed 5 years ago by gk

Resolution: wontfix
Status: newclosed

Yes, this is a WONTFIX.

comment:22 Changed 5 years ago by bugzilla

As Mozilla has never built FF against GStreamer 1.0 and says they won't fix it, the enhancement can be resolved as INVALID.
But MSE is not needed to play mp4.

media.fragmented-mp4.ffmpeg
media.fragmented-mp4.gmp

were added specially for Linux version of FF. And they have different defaults in Linux and other versions. IIRC ffmpeg solves the problem.

Note: See TracTickets for help on using tickets.