[FFmpeg-user] Problem: global headers

Gabriel Soltz gabriel at musicuo.com
Fri Jul 11 20:19:52 CEST 2014


Hi, i m having an error while trying to encode with ffmpeg.

f="01.mp3"
bname=`basename "$f" .mp3`
list="$bname.m3u8"

ffmpeg -i "$f" -vn -c:a libfdk_aac -b:a 128k -map 0 -flags:a -global_header
\
-f segment -segment_time 10 -segment_list_size 0 -segment_list "$list"
-segment_format mpegts $bname-%03d.ts

*OUTPUT:*
ffmpeg version git-2014-07-11-6779bf3 Copyright (c) 2000-2014 the FFmpeg
developers
  built on Jul 11 2014 16:25:37 with gcc 4.8.2 (GCC) 20131212 (Red Hat
4.8.2-7)
  configuration: --prefix=/root/ffmpeg_build
--extra-cflags=-I/root/ffmpeg_build/include
--extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin
--extra-libs=-ldl --enable-gpl --enable-nonfree --enable-libfdk_aac
--enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx
--enable-libx264
  libavutil      52. 92.100 / 52. 92.100
  libavcodec     55. 69.100 / 55. 69.100
  libavformat    55. 45.100 / 55. 45.100
  libavdevice    55. 13.102 / 55. 13.102
  libavfilter     4. 10.100 /  4. 10.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100

[mp3 @ 0x21dfe80] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '01.mp3':
  Metadata:
    album           : Favourite worst nightmare
    artist          : Arctic Monkeys
    genre           : Rock
    title           : Brainstorm
    track           : 1
    date            : 2007
  Duration: 00:02:50.48, start: 0.000000, bitrate: 320 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
    Stream #0:1: Video: mjpeg, yuvj420p(pc, bt470bg), 200x178 [SAR 96:96
DAR 100:89], 90k tbr, 90k tbn, 90k tbc
    Metadata:
      title           :
      comment         : Other

[segment @ 0x3c762e0] Using AVStream.codec.time_base as a timebase hint to
the muxer is deprecated. Set AVStream.time_base instead.
*[segment @ 0x3c762e0] Codec for stream 0 does not use global headers but
container format requires global headers*

[mpegts @ 0x3c9d800] Using AVStream.codec.time_base as a timebase hint to
the muxer is deprecated. Set AVStream.time_base instead.
Output #0, segment, to '01-%03d.ts':
  Metadata:
    album           : Favourite worst nightmare
    artist          : Arctic Monkeys
    genre           : Rock
    title           : Brainstorm
    track           : 1
    date            : 2007
    encoder         : Lavf55.45.100
    Stream #0:0: Audio: aac (libfdk_aac), 44100 Hz, stereo, s16, 128 kb/s
    Metadata:
      encoder         : Lavc55.69.100 libfdk_aac
Stream mapping:
  Stream #0:0 -> #0:0 (mp3 (native) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
[mpegts @ 0x3ca2820] Using AVStream.codec.time_base as a timebase hint to
the muxer is deprecated. Set AVStream.time_base instead.
[mpegts @ 0x3d10320] Using AVStream.codec.time_base as a timebase hint to
the muxer is deprecated. Set AVStream.time_base instead.
[mpegts @ 0x3ca2820] Using AVStream.codec.time_base as a timebase hint to
the muxer is deprecated. Set AVStream.time_base instead.
    Last message repeated 1 times
[mpegts @ 0x3ca2820] Using AVStream.codec.time_base as a timebase hint to
the muxer is deprecated. Set AVStream.time_base instead.
    Last message repeated 1 times
[mpegts @ 0x3ca2820] Using AVStream.codec.time_base as a timebase hint to
the muxer is deprecated. Set AVStream.time_base instead.
    Last message repeated 1 times
[mpegts @ 0x3c9f9c0] Using AVStream.codec.time_base as a timebase hint to
the muxer is deprecated. Set AVStream.time_base instead.
[mpegts @ 0x3c9f260] Using AVStream.codec.time_base as a timebase hint to
the muxer is deprecated. Set AVStream.time_base instead.
[mpegts @ 0x3ce14e0] Using AVStream.codec.time_base as a timebase hint to
the muxer is deprecated. Set AVStream.time_base instead.
[mpegts @ 0x3d10320] Using AVStream.codec.time_base as a timebase hint to
the muxer is deprecated. Set AVStream.time_base instead.
[mpegts @ 0x3ca2820] Using AVStream.codec.time_base as a timebase hint to
the muxer is deprecated. Set AVStream.time_base instead.
[mpegts @ 0x3c9f9c0] Using AVStream.codec.time_base as a timebase hint to
the muxer is deprecated. Set AVStream.time_base instead.
[mpegts @ 0x3d10320] Using AVStream.codec.time_base as a timebase hint to
the muxer is deprecated. Set AVStream.time_base instead.
[mpegts @ 0x3c9f260] Using AVStream.codec.time_base as a timebase hint to
the muxer is deprecated. Set AVStream.time_base instead.
    Last message repeated 1 times
*[mp3 @ 0x3c759c0] Header missing*
Error while decoding stream #0:0: Invalid data found when processing input
size=N/A time=00:02:50.29 bitrate=N/A
video:0kB audio:2662kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown

Can someone please can explain whats the problem is ? I dont understand how
to fix the global headers problem. I try with different input files.

Thanks in advance.



Gabriel Soltz | Musicuo


More information about the ffmpeg-user mailing list