[FFmpeg-trac] #4905(undetermined:new): Splitting a flac file using -ss and -t creates chunks with wrong duration

FFmpeg trac at avcodec.org
Sun Oct 4 12:08:25 CEST 2015


#4905: Splitting a flac file using -ss and -t creates chunks with wrong duration
-------------------------------------+-------------------------------------
             Reporter:  cdrsgi       |                     Type:  defect
               Status:  new          |                 Priority:  important
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:  flac, split  |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 When i try to split a large flac files with ffmpeg, created chunks still
 have the large file's duration and sample count.
 How to reproduce:
 {{{
 ffmpeg -v 9 -loglevel 99 -ss 0 -y -i "D:\1.flac" -vn -c:a copy -t 77.222
 "C:\1_1.flac"
 Exit code: 0
 Console output:
 ffmpeg version N-75563-g235381e Copyright (c) 2000-2015 the FFmpeg
 developers
   built with gcc 4.9.3 (GCC)
   configuration: --disable-static --enable-shared --enable-gpl --enable-
 version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-
 fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass
 --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec
 --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc
 --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
 --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-
 librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex
 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-
 aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
 --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink
 --enable-zlib
   libavutil      55.  2.100 / 55.  2.100
   libavcodec     57.  3.100 / 57.  3.100
   libavformat    57.  2.100 / 57.  2.100
   libavdevice    57.  0.100 / 57.  0.100
   libavfilter     6.  8.100 /  6.  8.100
   libswscale      4.  0.100 /  4.  0.100
   libswresample   2.  0.100 /  2.  0.100
   libpostproc    54.  0.100 / 54.  0.100
 Splitting the commandline.
 Reading option '-v' ... matched as option 'v' (set logging level) with
 argument '9'.
 Reading option '-loglevel' ... matched as option 'loglevel' (set logging
 level) with argument '99'.
 Reading option '-ss' ... matched as option 'ss' (set the start time
 offset) with argument '0'.
 Reading option '-y' ... matched as option 'y' (overwrite output files)
 with argument '1'.
 Reading option '-i' ... matched as input file with argument 'D:\Mp3\Pearl
 Jam\Pearl Jam\1991 - Ten\01 - Pearl Jam - Once.flac'.
 Reading option '-vn' ... matched as option 'vn' (disable video) with
 argument '1'.
 Reading option '-c:a' ... matched as option 'c' (codec name) with argument
 'copy'.
 Reading option '-t' ... matched as option 't' (record or transcode
 "duration" seconds of audio/video) with argument '77.222'.
 Reading option 'C:\1_1.flac' ... matched as output file.
 Finished splitting the commandline.
 Parsing a group of options: global .
 Applying option v (set logging level) with argument 9.
 Applying option y (overwrite output files) with argument 1.
 Successfully parsed a group of options.
 Parsing a group of options: input file D:\Mp3\Pearl Jam\Pearl Jam\1991 -
 Ten\01 - Pearl Jam - Once.flac.
 Applying option ss (set the start time offset) with argument 0.
 Successfully parsed a group of options.
 Opening an input file: D:\Mp3\Pearl Jam\Pearl Jam\1991 - Ten\01 - Pearl
 Jam - Once.flac.
 Probing aac score:1 size:2048
 Probing flac score:50 size:2048
 [flac @ 00000000002e2f60] Format flac probed with size=2048 and score=50
 [flac @ 00000000002e2f60] Before avformat_find_stream_info() pos: 1973
 bytes read:32768 seeks:0
 [flac @ 00000000002ecc00] sample/frame number mismatch in adjacent frames
     Last message repeated 14 times
 [flac @ 00000000002e2f60] All info found
 [flac @ 00000000002e2f60] 0: start_time: 0.000 duration: 10.216
 [flac @ 00000000002e2f60] stream: start_time: 0.000 duration: 231.667
 bitrate=919 kb/s
 [flac @ 00000000002e2f60] After avformat_find_stream_info() pos: 19381
 bytes read:32768 seeks:0 frames:1
 [flac @ 00000000002e2f60] read_seek: 0 0
 [flac @ 00000000002e2f60] gen_seek: 0 0
 [NULL @ 00000000002ecc00] sample/frame number mismatch in adjacent frames
     Last message repeated 14 times
 Input #0, flac, from 'D:\Mp3\Pearl Jam\Pearl Jam\1991 - Ten\01 - Pearl Jam
 - Once.flac':
   Metadata:
     ALBUM           : Ten
     ALBUMARTISTSORT : Pearl Jam
     ARTIST          : Pearl Jam
     ARTISTSORT      : Pearl Jam
     CATALOGNUMBER   : 88697398492
     COMMENT         : Track 1
     DATE            : 2009-03-23
     disc            : 1
     GENRE           : Grunge
     LABEL           : Bertelsmann Music Group
     LANGUAGE        : eng
     MEDIA           : CD
     MUSICBRAINZ_ALBUMARTISTID: 83b9cbe7-9857-49e2-ab8e-b57b01038103
     MUSICBRAINZ_ALBUMID: 06fc304e-d70a-4846-93e5-544d6aa618d6
     MUSICBRAINZ_ARTISTID: 83b9cbe7-9857-49e2-ab8e-b57b01038103
     MUSICBRAINZ_TRACKID: 94bed552-376f-492d-8e87-f470aa7fda0c
     MUSICIP_PUID    : 15ee9b0f-beda-b60f-cb39-e59d719d9f67
     ORIGINALDATE    : 1991-08-27
     RELEASECOUNTRY  : GB
     RELEASESTATUS   : official
     RELEASETYPE     : album
     SCRIPT          : Latn
     TITLE           : Once
     track           : 01
     REPLAYGAIN_ALBUM_GAIN: -5.72 dB
     REPLAYGAIN_ALBUM_PEAK: 1.119748
     REPLAYGAIN_TRACK_GAIN: -6.22 dB
     REPLAYGAIN_TRACK_PEAK: 0.950928
     ENCODEDBY       : Easy CD-DA Extractor (http://www.poikosoft.com)
     TOTALTRACKS     : 11
     TOTALDISCS      : 2
     album_artist    : Pearl Jam
   Duration: 00:03:51.67, start: 0.000000, bitrate: 919 kb/s
     Stream #0:0, 1, 1/44100: Audio: flac, 44100 Hz, stereo, s16
     Side data:
       replaygain: track gain - -6.220000, track peak - 0.000022, album
 gain - -5.720000, album peak - 0.000026,
 Successfully opened the file.
 Parsing a group of options: output file C:\1_1.flac.
 Applying option vn (disable video) with argument 1.
 Applying option c:a (codec name) with argument copy.
 Applying option t (record or transcode "duration" seconds of audio/video)
 with argument 77.222.
 Successfully parsed a group of options.
 Opening an output file: C:\1_1.flac.
 Successfully opened the file.
 Output #0, flac, to 'C:\1_1.flac':
   Metadata:
     ALBUM           : Ten
     ALBUMARTISTSORT : Pearl Jam
     ARTIST          : Pearl Jam
     ARTISTSORT      : Pearl Jam
     CATALOGNUMBER   : 88697398492
     DESCRIPTION     : Track 1
     DATE            : 2009-03-23
     DISCNUMBER      : 1
     GENRE           : Grunge
     LABEL           : Bertelsmann Music Group
     LANGUAGE        : eng
     MEDIA           : CD
     MUSICBRAINZ_ALBUMARTISTID: 83b9cbe7-9857-49e2-ab8e-b57b01038103
     MUSICBRAINZ_ALBUMID: 06fc304e-d70a-4846-93e5-544d6aa618d6
     MUSICBRAINZ_ARTISTID: 83b9cbe7-9857-49e2-ab8e-b57b01038103
     MUSICBRAINZ_TRACKID: 94bed552-376f-492d-8e87-f470aa7fda0c
     MUSICIP_PUID    : 15ee9b0f-beda-b60f-cb39-e59d719d9f67
     ORIGINALDATE    : 1991-08-27
     RELEASECOUNTRY  : GB
     RELEASESTATUS   : official
     RELEASETYPE     : album
     SCRIPT          : Latn
     TITLE           : Once
     TRACKNUMBER     : 01
     REPLAYGAIN_ALBUM_GAIN: -5.72 dB
     REPLAYGAIN_ALBUM_PEAK: 1.119748
     REPLAYGAIN_TRACK_GAIN: -6.22 dB
     REPLAYGAIN_TRACK_PEAK: 0.950928
     ENCODEDBY       : Easy CD-DA Extractor (http://www.poikosoft.com)
     TOTALTRACKS     : 11
     TOTALDISCS      : 2
     ALBUMARTIST     : Pearl Jam
     encoder         : Lavf57.2.100
     Stream #0:0, 0, 1/44100: Audio: flac, 44100 Hz, stereo (16 bit)
     Side data:
       replaygain: track gain - -6.220000, track peak - 0.000022, album
 gain - -5.720000, album peak - 0.000026,
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
 Press [q] to stop, [?] for help
 [NULL @ 00000000002ecc00] sample/frame number mismatch in adjacent frames
     Last message repeated 1678 times
 No more output streams to write to, finishing.
 size=    7284kB time=00:01:17.18 bitrate= 773.1kbits/s
 video:0kB audio:7275kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 0.123952%
 Input file #0 (D:\Mp3\Pearl Jam\Pearl Jam\1991 - Ten\01 - Pearl Jam -
 Once.flac):
   Input stream #0:0 (audio): 833 packets read (7461572 bytes);
   Total: 833 packets (7461572 bytes) demuxed
 Output file #0 (C:\1_1.flac):
   Output stream #0:0 (audio): 832 packets muxed (7449633 bytes);
   Total: 832 packets (7449633 bytes) muxed
 0 frames successfully decoded, 0 decoding errors
 [AVIOContext @ 00000000002f5860] Statistics: 2 seeks, 834 writeouts
 [AVIOContext @ 00000000002ec740] Statistics: 7569408 bytes read, 0 seeks

 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/4905>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list