Disable codec/bitrate settings

Appearently neither Jellyfin nor Emby support user-defined bitrates (see https://emby.media/community/index.php?/topic/65896-change-audio-bitrate-of-transcoder/ and https://github.com/jellyfin/jellyfin/issues/1124. These issues must be fixed first before any attempt at user control over bitrate and codecs can be considered.
This commit is contained in:
Lei Nelissen
2020-08-09 18:29:17 +02:00
parent 0712e6b8ca
commit 52146a6e12
3 changed files with 7 additions and 3 deletions

View File

@@ -15,7 +15,6 @@ This is a [React Native](https://reactnative.dev/)-based audio streaming app for
### Features being considered
* Downloading music for offline playback
* Support for codec selection (lossy/lossless) and bitrate
* Searching based on track names
## Getting Started

View File

@@ -45,12 +45,13 @@ export default function Settings() {
<Input placeholder="deadbeefdeadbeefdeadbeef" value={jellyfin?.user_id} editable={false} />
</InputContainer>
<Button title="Set Jellyfin server" onPress={handleClick} color={THEME_COLOR} />
<InputContainer>
{/* The bitrate setting is hidden for now, since Jellyfin does not appear to support custom bitrates */}
{/* <InputContainer>
<Text style={colors.text}>Bitrate</Text>
<Picker selectedValue={bitrate}>
<Picker.Item label="320kbps" value={140000000} />
</Picker>
</InputContainer>
</InputContainer> */}
</View>
</SafeAreaView>
</ScrollView>

View File

@@ -15,6 +15,8 @@ function generateConfig(credentials: Credentials): RequestInit {
const baseTrackOptions: Record<string, string> = {
// Not sure where this number refers to, but setting it to 140000000 appears
// to do wonders for making stuff work
// NOTE: Apparently setting a bitrate is as of yet unsupported in the
// Jellyfin core, and hence this value is not used
MaxStreamingBitrate: '140000000',
MaxSampleRate: '48000',
// This must be set to support client seeking
@@ -44,6 +46,8 @@ export function generateTrack(track: AlbumTrack, credentials: Credentials): Trac
};
const trackParams = new URLSearchParams(trackOptions).toString();
const url = encodeURI(`${credentials?.uri}/Audio/${track.Id}/universal.mp3?${trackParams}`);
console.log(url);
return {
id: track.Id,