Warn when skipping files with video, especially Ogg files with Theora streams
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 2.1k
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 31
Description
### Problem
Importing to beets misses some ogg vorbis and opus files.
Running this command in verbose (`-vv`) mode (with an empty database):
```sh
$ beet -vv import "Tim Gray/Polyhedrons/Tim Gray - Polyhedrons - 01 Pentahedron.ogg"
user configuration: /home/elpfen/.config/beets/config.yaml
data directory: /home/elpfen/.config/beets
plugin paths:
Sending event: pluginload
library database: /home/elpfen/tempmusic.db
library directory: /run/media/elpfen/150F-3829/done
Sending event: library_opened
Sending event: import_begin
No files imported from /run/media/elpfen/150F-3829/Tim Gray/Polyhedrons/Tim Gray - Polyhedrons - 01 Pentahedron.ogg
Sending event: import
Sending event: cli_exit
```
Led to this problem:
It doesn't see the file.
They're all copyrighted so I can't include them. There are quite a few of them not being seen. I've also noticed that they all have a theora video stream alongside a vorbis/opus audio stream so fixing this is pretty easy on my end, just strip out the video channel. It'd be nice if beets was able to see this automatically and include them as it's pretty common for oggs.
```
ffmpeg -loglevel error -hide_banner -y -i "$1" -acodec libopus -b:a 144k -vbr on -compression_level 10 "$1".ogg
ffmpeg -loglevel fatal -hide_banner -y -i "$1" -vn -threads 0 -codec:a libvorbis -qscale:a 5 "$1".ogg
```
example ffmpeg -f ffmetadata:
```
Input #0, ogg, from 'Tim Gray - Polyhedrons - 01 Pentahedron.ogg':
Duration: 00:19:02.10, start: 0.000000, bitrate: 136 kb/s
Stream #0:0: Video: theora, yuv444p, 700x700 [SAR 1:1 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
Metadata:
comment : Cover (front)
ENCODER : Lavc57.48.101 libtheora
TITLE : Pentahedron
ARTIST : Tim Gray
DATE : 2015
ALBUM : Polyhedrons
track : 1
album_artist : Tim Gray
Stream #0:1: Audio: vorbis, 44100 Hz, stereo, fltp, 192 kb/s
Metadata:
ENCODER : Lavc57.48.101 libvorbis
TITLE : Pentahedron
ARTIST : Tim Gray
DATE : 2015
comment : Visit http://ethernetmusic.bandcamp.com
ALBUM : Polyhedrons
track : 1
album_artist : Tim Gray
```
### Setup
* OS:
Arch Linux - 4.12.8-2-ARCH
* Python version:
2.7.13
* beets version:
1.4.5
* Turning off plugins made problem go away (yes/no):
no
My configuration (output of `beet config`) is:
```
directory: /run/media/elpfen/150F-3829/done
library: ~/tempmusic.db
import:
languages: en
copy: no
move: yes
# plugins: copyartifacts duplicates
# copyartifacts:
# extensions: .cue .log .pdf .m3u
# duplicates:
# tiebreak:
# items: [format,bitrate]
```
Contributor guide
Research direction
Reproduce the report with `beet -vv import` on an Ogg file containing Theora video and Vorbis or Opus audio, then trace the importer path that decides the file is unsupported. The issue names no source files or tests, so inspect the audio-file detection entry point and existing import tests. Done should include clear behavior for skipped video-containing files and coverage for this Ogg case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100