Opened 13 years ago

Closed 12 years ago

#1290 closed defect (fixed)

Segment muxer does not work with audio-only

Reported by: Carl Eugen Hoyos Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: segment
Cc: luuk_jansen Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

Works fine with -map 0:0 -vcodec mpeg2video.

$ ./ffmpeg -i fate-suite/svq3/Vertical400kbit.sorenson3.mov -flags global_header -f segment -segment_time 5 -segment_list fileList.txt -segment_format mpegts -map 0:1 -acodec mp2 segment_%05d.ts
ffmpeg version N-40513-gf8b536a Copyright (c) 2000-2012 the FFmpeg developers
  built on May  9 2012 07:39:47 with gcc 4.3.2
  configuration: --cc=/usr/local/gcc-4.3.2/bin/gcc --enable-gpl
  libavutil      51. 50.100 / 51. 50.100
  libavcodec     54. 21.100 / 54. 21.100
  libavformat    54.  4.100 / 54.  4.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 72.105 /  2. 72.105
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 11.100 /  0. 11.100
  libpostproc    52.  0.100 / 52.  0.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x8eec3c0] max_analyze_duration 5000000 reached at 5000998
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'fate-suite/svq3/Vertical400kbit.sorenson3.mov':
  Metadata:
    creation_time   : 2001-03-20 16:17:18
    title           : Vertical Online SV3 Demo
    title-eng       : Vertical Online SV3 Demo
    artist          : Logan Kelsey
    artist-eng      : Logan Kelsey
    copyright       : © Vertical Online 2001
    copyright-eng   : © Vertical Online 2001
    encoder         : Sorenson Video 3
    encoder-eng     : Sorenson Video 3
  Duration: 00:00:43.57, start: 0.000000, bitrate: 580 kb/s
    Stream #0:0(eng): Video: svq3 (SVQ3 / 0x33515653), yuvj420p, 320x240, 391 kb/s, 30.02 fps, 30 tbr, 600 tbn, 600 tbc
    Metadata:
      creation_time   : 2001-03-20 16:17:18
      handler_name    : Apple Alias Data Handler
    Stream #0:1(eng): Audio: adpcm_ima_qt (ima4 / 0x34616D69), 44100 Hz, 1 channels, s16, 176 kb/s
    Metadata:
      creation_time   : 2001-03-20 16:17:18
      handler_name    : Apple Alias Data Handler
Guessed Channel Layout for  Input Stream #0.1 : mono
[mpegts @ 0x8ef4140] muxrate VBR, pcr every 3 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, segment, to 'segment_%05d.ts':
  Metadata:
    creation_time   : 2001-03-20 16:17:18
    title           : Vertical Online SV3 Demo
    title-eng       : Vertical Online SV3 Demo
    artist          : Logan Kelsey
    artist-eng      : Logan Kelsey
    copyright       : © Vertical Online 2001
    copyright-eng   : © Vertical Online 2001
    encoder-eng     : Sorenson Video 3
    encoder         : Lavf54.4.100
    Stream #0:0(eng): Audio: mp2, 44100 Hz, mono, s16, 128 kb/s
    Metadata:
      creation_time   : 2001-03-20 16:17:18
      handler_name    : Apple Alias Data Handler
Stream mapping:
  Stream #0:1 -> #0:0 (adpcm_ima_qt -> mp2)
Press [q] to stop, [?] for help
Input stream #0:1 frame changed from rate:44100 fmt:s16 ch:1 chl:0x0 to rate:44100 fmt:s16 ch:1 chl:0x4
Multiple frames in a packet from stream 1
size=       0kB time=00:00:43.58 bitrate=   0.0kbits/s
video:0kB audio:681kB global headers:0kB muxing overhead -100.000000%
$ cat fileList.txt
segment_00000.ts

Change History (2)

comment:1 by Carl Eugen Hoyos, 13 years ago

Cc: luuk_jansen added

comment:2 by Stefano Sabatini, 12 years ago

Analyzed by developer: set
Reproduced by developer: set
Resolution: fixed
Status: newclosed

Should be fixed in:

commit a1e092ccd36ef0239749c2267104e7e59ee7176e
Author: Stefano Sabatini <stefasab@gmail.com>
Date:   Sat Jan 14 02:40:09 2012 +0100

    lavf/segment: fix logic for segmenting audio-only inputs
    
    Also add a comment for clarifying the logic.
    
    Fix trac ticket #1290.

Works here with command:

ffmpeg -i fate-suite/svq3/Vertical400kbit.sorenson3.mov -f ssegment -segment_time 5 -segment_list fileList.txt -segment_list_size 0 -map 0:1 -acodec mp2 segment_%05d.ts
Note: See TracTickets for help on using tickets.