Opened 8 months ago

Last modified 8 months ago

#6978 open enhancement

Encode FLAC with seek points

Reported by: vn.khangnt Owned by:
Priority: wish Component: avformat
Version: git-master Keywords: flac
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Hi,
I'm unable to seek when playing FLAC file encoded by FFmpeg because of missing SEEKTABLE metadata.
In FLAC document: https://xiph.org/flac/documentation_tools_flac.html#flac_options_seekpoint,
it has option "--seekpoint=#" to specify sample number for a seek point, but currently FFmpeg FLAC encoder doesn't have similar option to set seek point.
Please consider to make it, thanks!

Change History (3)

comment:1 in reply to: ↑ description Changed 8 months ago by cehoyos

  • Component changed from ffmpeg to undetermined

Replying to vn.khangnt:

I'm unable to seek when playing FLAC file encoded by FFmpeg because of missing SEEKTABLE metadata.

How can I reproduce this?

comment:2 follow-up: Changed 8 months ago by vn.khangnt

You can check FLAC metadata block using FLAC tools https://xiph.org/flac/download.html
This is command result show list metadata blocks of a FLAC file encoded by FFmpeg:

$ metaflac --list test.flac
METADATA block #0
  type: 0 (STREAMINFO)
  is last: false
  length: 34
  minimum blocksize: 4608 samples
  maximum blocksize: 4608 samples
  minimum framesize: 16 bytes
  maximum framesize: 12958 bytes
  sample_rate: 48000 Hz
  channels: 2
  bits-per-sample: 16
  total samples: 9950215
  MD5 signature: c61f54f9ba0ac73fafc6cd3b8315cf23
METADATA block #1
  type: 4 (VORBIS_COMMENT)
  is last: false
  length: 46
  vendor string: Lavf57.71.100
  comments: 1
    comment[0]: encoder=Lavf57.71.100
METADATA block #2
  type: 1 (PADDING)
  is last: true
  length: 8192

It doesn't contain metadata block type 3 (SEEKTABLE): https://xiph.org/flac/format.html#metadata_block_header

comment:3 in reply to: ↑ 2 Changed 8 months ago by jamrial

  • Component changed from undetermined to avformat
  • Priority changed from normal to wish
  • Status changed from new to open
  • Summary changed from Feature request: encode FLAC with seek points to Encode FLAC with seek points
  • Version changed from unspecified to git-master

Replying to vn.khangnt:

You can check FLAC metadata block using FLAC tools https://xiph.org/flac/download.html

He probably means what player/parser doesn't allow you to seek flac files that lack a seektable metadata block, and if it's ffmpeg/libavformat to provide a way to reproduce it.

In any case, this is a feature request ticket. The flac muxer doesn't currently write a Seektable metadata block.

Note: See TracTickets for help on using tickets.