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:
@@ -15,7 +15,6 @@ This is a [React Native](https://reactnative.dev/)-based audio streaming app for
|
|||||||
|
|
||||||
### Features being considered
|
### Features being considered
|
||||||
* Downloading music for offline playback
|
* Downloading music for offline playback
|
||||||
* Support for codec selection (lossy/lossless) and bitrate
|
|
||||||
* Searching based on track names
|
* Searching based on track names
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|||||||
@@ -45,12 +45,13 @@ export default function Settings() {
|
|||||||
<Input placeholder="deadbeefdeadbeefdeadbeef" value={jellyfin?.user_id} editable={false} />
|
<Input placeholder="deadbeefdeadbeefdeadbeef" value={jellyfin?.user_id} editable={false} />
|
||||||
</InputContainer>
|
</InputContainer>
|
||||||
<Button title="Set Jellyfin server" onPress={handleClick} color={THEME_COLOR} />
|
<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>
|
<Text style={colors.text}>Bitrate</Text>
|
||||||
<Picker selectedValue={bitrate}>
|
<Picker selectedValue={bitrate}>
|
||||||
<Picker.Item label="320kbps" value={140000000} />
|
<Picker.Item label="320kbps" value={140000000} />
|
||||||
</Picker>
|
</Picker>
|
||||||
</InputContainer>
|
</InputContainer> */}
|
||||||
</View>
|
</View>
|
||||||
</SafeAreaView>
|
</SafeAreaView>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ function generateConfig(credentials: Credentials): RequestInit {
|
|||||||
const baseTrackOptions: Record<string, string> = {
|
const baseTrackOptions: Record<string, string> = {
|
||||||
// Not sure where this number refers to, but setting it to 140000000 appears
|
// Not sure where this number refers to, but setting it to 140000000 appears
|
||||||
// to do wonders for making stuff work
|
// 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',
|
MaxStreamingBitrate: '140000000',
|
||||||
MaxSampleRate: '48000',
|
MaxSampleRate: '48000',
|
||||||
// This must be set to support client seeking
|
// 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 trackParams = new URLSearchParams(trackOptions).toString();
|
||||||
const url = encodeURI(`${credentials?.uri}/Audio/${track.Id}/universal.mp3?${trackParams}`);
|
const url = encodeURI(`${credentials?.uri}/Audio/${track.Id}/universal.mp3?${trackParams}`);
|
||||||
|
|
||||||
|
console.log(url);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: track.Id,
|
id: track.Id,
|
||||||
|
|||||||
Reference in New Issue
Block a user