Opened 4 years ago

Last modified 4 years ago

#3729 new enhancement

FFMPEG should show warnings when FLAC encoder produce non-subset stream

Reported by: Vika Apelsinova Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: flac
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

FFMPEG should show warning message "The encoding parameters specified do not conform to the FLAC Subset and may not be streamable or playable in hardware devices." when one of the following statements is true:

  1. sample size in bits = not (8 or 12 or 16 or 20 or 24)

or

  1. min_partition_order > 8

or

  1. max_partition_order > 8

or

  1. min_prediction_order > 12 and samplerate <= 48000

or

  1. max_prediction_order > 12 and samplerate <= 48000

or

  1. frame_size > 4608 and samplerate <= 48000

or

  1. frame_size > 16384

Change History (7)

comment:1 Changed 4 years ago by cehoyos

  • Component changed from undetermined to avcodec
  • Keywords subset removed
  • Priority changed from normal to wish
  • Type changed from defect to enhancement

Which hardware device fails for any of these conditions?

comment:2 follow-up: Changed 4 years ago by Vika Apelsinova

FLAC project specifies a subset of itself FLAC format as the Subset format. The purpose of this is to ensure that any streams encoded according to the Subset are truly "streamable", meaning that a decoder that cannot seek within the stream can still pick up in the middle of the stream and start decoding. It also makes hardware decoder implementations more practical by limiting the encoding parameters such that decoder buffer sizes and other resource requirements can be easily determined. Reference FLAC encoder generates Subset streams by default unless the "--lax" command-line option is used.

There are hardware decoders that can't decode non-subset stream (especially streams with sample size in bits > 24). There are also software players that can't decode non-subset stream (e.g. please see https://code.google.com/p/android/issues/detail?id=35348).

comment:3 in reply to: ↑ 2 ; follow-up: Changed 4 years ago by cehoyos

Replying to Vika Apelsinova:

Reference FLAC encoder generates Subset streams by default unless the "--lax" command-line option is used.

This sounds as if FFmpeg would not create Subset streams by default: Could you provide a sample command line including complete, uncut console output if FFmpeg by default creates streams that do not conform to the subset?

There are hardware decoders that can't decode non-subset stream (especially streams with sample size in bits > 24).

Which isn't supported by FFmpeg.
Please name the affected hardware decoders.

There are also software players that can't decode non-subset stream (e.g. please see https://code.google.com/p/android/issues/detail?id=35348).

This report doesn't sound very informative: Do you have a sample file that cannot be played by the Android player?

comment:4 in reply to: ↑ 3 ; follow-up: Changed 4 years ago by Vika Apelsinova

Replying to cehoyos:

Please name the affected hardware decoders.

Sandisk Sansa Fuze, hardware version 1.

comment:5 in reply to: ↑ 4 ; follow-up: Changed 4 years ago by cehoyos

Replying to Vika Apelsinova:

Replying to cehoyos:

Please name the affected hardware decoders.

Sandisk Sansa Fuze, hardware version 1.

How can I create a stream that does not work on this device?

comment:6 in reply to: ↑ 5 Changed 4 years ago by Vika Apelsinova

Replying to cehoyos:

How can I create a stream that does not work on this device?

This device starts to stutter mildly when files have LPC blocks with a order larger than 12.

E.g. by using "-compression_level 11" or "-compression_level 12" presets.

comment:7 Changed 4 years ago by cehoyos

Could you provide the ffmpeg command line to produce a file that stutters on the Sandisk player together with the console output?

Note: See TracTickets for help on using tickets.