beetbox / beetbox/beets

web plugin: OGG Vorbis audio not really streaming

Open
#2,483 5 comments 0 reactions 0 assignees View on GitHub
feature web
Dominant language
Python
Stars
15.7k
Forks
2.1k
Avg merge
4d 21h
Merged PRs (30d)
31

Description

### Problem

My music collection includes OGG Vorbis and MP3 files. I'm using beets web plugin to access my music while I'm at work. MP3 files are streaming fine: when I click the "play" icon, music starts as soon as a portion of file is downloaded. Then the music plays while the file is still downloading. This is what I expect.

There's a problem with OGG Vorbis files, though. They don't really stream: they are downloaded first, and only start playing once entire file is downloaded.

I tested this in several browsers and operating systems:
- Mozilla Firefox (Linux and Windows): MP3 streams correctly, OGG Vorbis is downloaded before it plays
- Google Chrome (Windows): MP3 and OGG Vorbis are both streaming
- Google Chrome (Android): MP3 and OGG Vorbis are both streaming
- I also tried the Tomahawk player with beets plugin. MP3 is streaming, OGG Vorbis is downloaded first.

To be honest, I'm not sure it's the fault of beets. I'm posting this in hope that maybe someone knows what's going on. Maybe some kind of workaround exists? What kind of infomation could I provide to help investigate this?

This is what I get in the console when I'm trying to stream OGG Vorbis file:

```sh
$ > beet -vv web
user configuration: /home/arcctgx/.config/beets/config.yaml
data directory: /home/arcctgx/.config/beets
plugin paths:
Sending event: pluginload
library database: /home/arcctgx/.config/beets/database
library directory: /home/arcctgx/music
Sending event: library_opened
* Running on http://0.0.0.0:52231/ (Press CTRL+C to quit)
37.248.164.60 - - [20/Mar/2017 00:37:22] "GET / HTTP/1.1" 200 -
37.248.164.60 - - [20/Mar/2017 00:37:41] "GET /item/query/artist%3Alull/title%3Acontinue HTTP/1.1" 200 -
37.248.164.60 - - [20/Mar/2017 00:37:44] "GET /item/1406/file HTTP/1.1" 200 -
```
Nothing special here. At this point the file is downloading, but music is not playing. Output when playing MP3 files is pretty much the same, with the exception that the audio is streaming.

### Setup

* OS: Gentoo Linux
* Python version: 2.7.12
* beets version: 1.4.3
* Turning off plugins made problem go away (yes/no): no

My configuration (output of `beet config`) is:

```yaml
web:
host: 0.0.0.0
port: 52231
cors: ''
play:
command: /usr/bin/audacious
use_folders: no
raw: no
warning_threshold: 100
relative_to:

plugins: web play
directory: ~/music

import:
copy: no
write: no
autotag: no
library: ~/.config/beets/database
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.