[FFmpeg-user] Using FFMPEG to segment audio files

Dominicans Interactive luuk at dominicansinteractive.com
Wed May 9 12:28:28 CEST 2012


Thanks for the reply.
This is the console output:

LDs-MacBook-Pro:6 Luuk$ ffmpeg -i encoded.ts -y -c copy -flags global_header -map 0 -f segment -segment_time 10 -segment_list fileList.txt -segment_format mpegts segment_%05d.ts
ffmpeg version 0.10.2.git-d3d5e84 Copyright (c) 2000-2012 the FFmpeg developers
  built on May  2 2012 19:00:38 with clang 3.0 (tags/Apple/clang-211.10.1)
  configuration: --prefix=/opt/local --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libxvid --enable-libx264 --enable-libvpx --enable-libspeex --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --arch=x86_64 --enable-yasm
  libavutil      51. 44.100 / 51. 44.100
  libavcodec     54. 12.100 / 54. 12.100
  libavformat    54.  3.100 / 54.  3.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 66.101 /  2. 66.101
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 10.100 /  0. 10.100
  libpostproc    52.  0.100 / 52.  0.100
[mpegts @ 0x7ff478849800] max_analyze_duration 5000000 reached at 5016000
Input #0, mpegts, from 'encoded.ts':
  Duration: 00:02:27.24, start: 0.000000, bitrate: 70 kb/s
  Program 1 
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Audio: mp3 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16, 64 kb/s
[mpegts @ 0x7ff478850600] muxrate VBR, pcr every 4 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, segment, to 'segment_%05d.ts':
  Metadata:
    encoder         : Lavf54.3.100
    Stream #0:0: Audio: mp3 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, 64 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size=       0kB time=00:02:27.52 bitrate=   0.0kbits/s    
video:0kB audio:1153kB global headers:0kB muxing overhead -100.000000%

This results in one file:
LDs-MacBook-Pro:6 Luuk$ ffmpeg -i segment_00000.ts 
ffmpeg version 0.10.2.git-d3d5e84 Copyright (c) 2000-2012 the FFmpeg developers
  built on May  2 2012 19:00:38 with clang 3.0 (tags/Apple/clang-211.10.1)
  configuration: --prefix=/opt/local --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libxvid --enable-libx264 --enable-libvpx --enable-libspeex --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --arch=x86_64 --enable-yasm
  libavutil      51. 44.100 / 51. 44.100
  libavcodec     54. 12.100 / 54. 12.100
  libavformat    54.  3.100 / 54.  3.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 66.101 /  2. 66.101
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 10.100 /  0. 10.100
  libpostproc    52.  0.100 / 52.  0.100
[mpegts @ 0x7fb923049800] max_analyze_duration 5000000 reached at 5016000
Input #0, mpegts, from 'segment_00000.ts':
  Duration: 00:02:27.24, start: 0.000000, bitrate: 70 kb/s
  Program 1 
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Audio: mp3 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16, 64 kb/s


On 9 May 2012, at 11:18, Carl Eugen Hoyos wrote:

> Dominicans Interactive <luuk <at> dominicansinteractive.com> writes:
> 
>> This works great for video files, but when trying to do it 
>> for an audio-only file I end up with one big file instead 
>> of separate segments. The command I use is:
>> 
>> ffmpeg -i encoded.ts -y -c copy -flags global_header -map 0 
>> -f segment -segment_time 10 -segment_list
>> fileList.txt -segment_format mpegts segment_%05d.ts
> 
> Please add complete, uncut console output.
> 
> Carl Eugen
> 
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user



More information about the ffmpeg-user mailing list