ejurgensen
684f55f603
[xcode] Align how ffmpeg API checks are done
2022-10-26 17:22:41 +02:00
ejurgensen
4ff850cd3d
[xcode] A bit of refactoring
2022-10-26 17:22:29 +02:00
whatdoineed2do
94c28386a6
[xcode] Use ffmpeg ch_layout instead of deprecated channel_layout/channels ( #1536 )
...
Co-authored-by: whatdoineed2do/Ray <whatdoineed2do@nospam.gmail.com>
2022-10-06 17:09:01 +02:00
ejurgensen
b5087e110f
[xcode] Modifications for ffmpeg 5 ( fixes #1396 )
2022-01-21 19:25:58 +01:00
ejurgensen
6f0fef6179
[spotify] Reintroduce libspotify support, change spotifyc to librespot-c
...
Select use of either libspotify or librespot-c as streaming backend via config
option.
librespot-c (renamed/improved spotifyc) impl has the following:
- sync interface
- seek support
- honor bitrate config, set client and thread name
- use web access token with "streaming" scope for login
- fix issue with podcast playback
Also say goodbye to file-based Spotify login.
2021-05-31 23:24:58 +02:00
ejurgensen
2bbc5f16c5
[xcode] Add support for seekable custom I/O (evbuffer input to transcode)
2021-05-31 11:55:32 +02:00
ejurgensen
57449a126a
[xcode] Merge avio_evbuffer into transcode
...
Only used by transcode anyway. Makes it easier to add custom seek for evbuffer.
2021-05-31 11:55:32 +02:00
ejurgensen
a67c74ba6c
[spotify] Introduce own spotifyc as replacement for libspotify
2021-05-31 11:54:30 +02:00
ejurgensen
76c52bba3b
[rsp] Add ALAC as a codec Roku supports (ref issue #1182 )
2021-01-29 20:31:53 +01:00
ejurgensen
1977db0319
[xcode] Add profile for ALAC encoding
2021-01-18 00:19:34 +01:00
ejurgensen
506959985b
[xcode] Treat Apple Music like iTunes ( closes #1152 )
2020-12-26 12:57:43 +01:00
ejurgensen
b6a686866a
[xcode] Retry with default probe size if quick probe fails (issue #1126 )
2020-11-21 20:40:30 +01:00
ejurgensen
04fa902b01
[xcode] Change open_input() to return ffmpeg error
2020-11-21 20:40:30 +01:00
ejurgensen
eea3a3bd27
[xcode] Fix memleak on open input error
2020-11-21 20:40:30 +01:00
ejurgensen
7e106aec09
[xcode] Add VP8 encoding profile
2020-11-18 23:13:00 +01:00
ejurgensen
db43d51568
[xcode] Explicitly set the frame duration of OPUS packets to 20 ms
...
Protect against errors in case future versions of ffmpeg change default
2020-11-18 23:13:00 +01:00
ejurgensen
d77927d3c3
[xcode] Fix incorrect error check, unsigned int can't be negative
...
av_find_best_stream() returns an int, with negative being an error
Credit lgtm.com
2020-08-10 22:56:08 +02:00
ejurgensen
e8bdcd2365
[xcode] Use ffmpeg's "image2pipe" muxer instead of "image2"
...
With ffmpeg 4.3 it seems image2 no longer works for non-file output, so use
image2pipe instead.
Closes #1061
2020-07-19 23:52:42 +02:00
ejurgensen
3a897afc44
[xcode] Use smaller probe size for remote tracks for quicker startup
2020-04-07 21:44:52 +02:00
ejurgensen
a8e6522a3c
[xcode] Change workaround in commit a0ac66e
for AIFF issue
...
This solution matches what we do for 'in' filter
2020-04-07 21:24:31 +02:00
ejurgensen
a0ac66e020
[xcode] Workaround for ffmpeg detecting channel_layout = 0 for AIF
2020-04-07 20:55:17 +02:00
ejurgensen
a4f9bb576d
[xcode] Increase read timeout 15s -> 30s (ref. issue #728 )
2019-11-02 08:56:10 -07:00
whatdoineed2do/Ray
c2ba1fdb63
[streaming,conf,xcode] review fixes
2019-09-22 22:58:32 +02:00
whatdoineed2do/Ray
554799ebc3
[streaming/xcode] configurable MP3 streaming bitrate
2019-09-22 22:58:32 +02:00
ejurgensen
a321667201
[xcode] Remove deprecated ffmpeg AVFormatContext filename field
2019-07-02 21:48:34 +02:00
ejurgensen
380f1358d5
[xcode] Disable reconnect_at_eof, does not work with m3u8 ( fixes #745 )
...
Only fixes #745 with newer versions of ffmpeg. With ffmpeg 3.4 playback
will still get interrupted because av_read_frame returns an error.
2019-05-21 21:19:03 +02:00
ejurgensen
7bf90eb8cb
[xcode] Fix for reading mono sources (ref issue #742 )
2019-05-19 22:45:39 +02:00
ejurgensen
b33e2665a1
[xcode] Hardcode png/jpeg pix formats (fix for #717 )
...
ffmpeg changed the behaviour of avcodec_default_get_format() so that it picks
AV_PIX_FMT_MONOBLACK instead of AV_PIX_FMT_RGB24 for the png encoder. That
makes the function of no use to us, so now the pix formats are just hardcoded
in the settings instead.
2019-04-08 21:30:29 +02:00
ejurgensen
53780a7ef3
[xcode] Make sample rate + channels variable
...
This change is preparation to use ffmpeg's resampling capabilities to keep local
audio in sync (by up/downsampling slightly). This requires that sample rates are
not fixed for a transcode profile.
Added benefit of this is that we don't need quite as many xcode profiles.
2019-04-02 22:47:11 +02:00
ejurgensen
992ab90876
[xcode] Fix missing "&"
2019-03-18 23:06:08 +01:00
ejurgensen
9b31264a3c
[xcode] Use av_get_bytes_per_sample instead of av_get_bits_per_sample
...
av_get_bits_per_sample(ctx->settings.audio_codec) may return 0 with some codecs
2019-03-18 23:06:08 +01:00
ejurgensen
1285128b9a
[xcode] Fix incorrect source BPS detection + support for more audio qualities
2019-03-18 23:06:08 +01:00
ejurgensen
201c97fdf8
Fixup 3 - remove small risk of crash if encode_setup called incorrectly
2019-03-18 23:06:08 +01:00
ejurgensen
ad77a42dbb
[xcode] Adapt to allow for new raw PCM input profiles, e.g. 48000/16
2019-03-18 23:06:08 +01:00
ejurgensen
9182597605
[input/xcode] Write to input buffer with the sources native sample rate/format
...
Still WIP at this point since the player and output can't use the use improved
quality yet, and because rtptimes etc. are likely incorrect
2019-03-18 23:06:08 +01:00
ejurgensen
d850c2e691
[xcode] Add OPUS encoding profile for RTP Chromecasting
2019-03-18 23:06:08 +01:00
ejurgensen
5ee0b69d39
[transcode] Set ffmpeg options so that it will attempt to reconnect streams
2018-08-12 19:50:54 +02:00
ejurgensen
ab1ded35e4
[config] Make user_agent configurable + don't use ffmpeg default (ref issue #562 )
2018-08-12 19:49:23 +02:00
ejurgensen
3325b2d9ce
[transcode] Use proper const for avfilter_get_by_name() result
2018-06-06 00:00:22 +02:00
ejurgensen
d84818649a
[transcode] Fix for issue #502 , ffmpeg segfault when jpeg encoding
...
For some reason it seems the Docker version of ffmpeg 3.4 uses "optimal"
Huffman tables (despite not being default), which cause ffmpeg to crash
when mjpeg encoder is encoding artwork jpeg's
2018-04-21 23:19:41 +02:00
ejurgensen
121b812c30
[transcode] Lower log level of "will transcode" messages
2018-03-02 20:51:33 +01:00
ejurgensen
0b3f4dfa15
[transcode] Ignore some errors from avcodec_send_packet(), fixes #483
...
Since the stream can at least in some cases be transcoded anyway
2018-01-26 22:37:28 +01:00
ejurgensen
c75097b02e
[transcode] Log pix_fmt by name instead of enum
2017-09-17 00:00:24 +02:00
ejurgensen
eec98e3b7e
[main/transcode] Fix some libav compability + log what ffmpeg/libav we are using
2017-09-16 23:01:42 +02:00
ejurgensen
548d9ada2e
[transcode] Fixup dead assignment
2017-08-06 22:31:43 +02:00
ejurgensen
f9375ef915
[transcode] More adjustments for libav 12
2017-08-06 22:31:43 +02:00
ejurgensen
6951639d24
[transcode] Adjustments for libav 12
2017-08-06 22:31:43 +02:00
ejurgensen
441ad006a6
[artwork/transcode] Also let transcode.c handle rescaling of non-file Spotify artwork
2017-08-06 22:31:43 +02:00
ejurgensen
e7f888645f
[artwork/transcode] Adjust transcode.c so it can take care of artwork
...
rescaling, meaning we can do without parallel ffmpeg interfaces.
This also moves artwork rescaling from libswscale to libavfilter, which
seems to fix a problem with PNG rescaling.
2017-08-06 22:31:43 +02:00
ejurgensen
1e180b5ce8
[transcode] Call av_write_trailer before cleanup so that any flushed data
...
will be written to encode_ctx->obuf, where it can be passed to the caller
2017-08-06 22:20:44 +02:00