Commit Graph

19 Commits

Author SHA1 Message Date
Serge Tkatchouk
616b152fed feat(encode): add hi-gain RG and upsampling support 2021-09-13 16:56:43 +01:00
Serge Tkatchouk
5444d40018 fix(encode): Strip EBU R128 gain tags when using forced-RG transcoding (#145) 2021-06-20 18:42:06 +01:00
George Hilliard
7100b2b241 feat: Support WMA files, including those with embedded album art (#143)
The tag library supports WMA, so add the mimetype.

Some wma files have embedded album art encoded as a video stream
alongside the audio:

```
Input #0, asf, from '01. Emergency Pulloff.wma':
  Metadata:
    (snip)
  Duration: 00:03:11.47, start: 0.000000, bitrate: 129 kb/s
    Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 200x200 [SAR 96:96 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
    Metadata:
      comment         : Cover (front)
    Stream #0:1: Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, stereo, fltp, 128 kb/s
Output #0, opus, to '/tmp/output.opus':
Output file #0 does not contain any stream
```

The `-map 0:0` passed to ffmpeg is selecting the video stream to
transcode, then `-vn` says not to transcode video, so the whole process
returns an error code:

```
2021/05/28 18:59:09 transcoding according to transcoding profile of 96k
2021/05/28 18:59:09 serving transcode `02. Cotton Patch Rag.wma`: cache [opus/96k] miss!
2021/05/28 18:59:09 serving transcode `02. Cotton Patch Rag.wma`: error: starting transcode: running ffmpeg: exit status 1
```

I believe the correct solution here is to use an _audio_ stream
specifier, as in `-map 0🅰️0`.  Doing this selects the audio and
successfully performs the transcode.
2021-06-04 19:03:19 +01:00
sentriz
ce96b9f6fa don't hardcode ffmpeg path
fixes #113
2021-01-27 19:57:48 +00:00
Serge Tkatchouk
794a2043e3 Make golangci-lint happy 2020-12-16 21:52:08 +00:00
Serge Tkatchouk
67ce861718 Mark cache files as partial until ffmpeg finishes without errors 2020-12-16 21:52:08 +00:00
sentriz
57798a473c add some style changes 2020-09-25 13:23:50 +01:00
fijam
6c9b122a24 Appease the linter 2020-09-25 13:23:50 +01:00
fijam
74f3c5a015 Revamp the transcoding decision tree 2020-09-25 13:23:50 +01:00
sentriz
2ee1b4d978 abstract away some of the encode internals 2020-05-08 18:42:45 +01:00
sentriz
c65606ba1f add some go-critic suggestions 2020-05-07 04:31:47 +01:00
sentriz
ee9335f71e remove globals 2020-05-07 03:24:50 +01:00
sentriz
b02ade3415 update golangci lint linter list 2020-05-02 04:22:26 +01:00
sentriz
31b2b65ea6 move from pkg/errors to go1.13 errors 2020-05-01 21:35:24 +01:00
sentriz
60a906c6fc add author comments to encode and jukebox 2020-04-18 23:18:23 +01:00
sentriz
acb9625f34 inline encode err checks 2020-03-14 17:02:06 +00:00
sentriz
3a8e5b9205 run gofumpt / format comments / comment blocks 2020-03-12 15:17:36 +00:00
sentriz
eec0b0bf1f use user selected profile for transcoding 2020-03-12 01:25:24 +00:00
sentriz
cb6f3757a4 move encode package up a level 2020-03-12 01:25:24 +00:00