Opened 12 years ago
Closed 11 years ago
#1872 closed defect (invalid)
aac bitstream not in adts format and extradata missing
Reported by: | yogesh | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | ffserver |
Version: | git-master | Keywords: | aac |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | yes |
Description
ffserver generated error "aac bitstream not in adts format and extradata missing" when I tried to stream mpegts with aac audio.
I am feeding ffserver with following command:
ffmpeg -i temp.mpg -vcodec libx264 -b:v 800k -acodec aac -strict
experimental -flags -global_header http://10.112.47.12:8091/feed1.ffm
I am using following command to play the stream:
ffplay http://10.112.47.12:8091/test.ts
When I give above command I just see the first frame and then video
freezes. FFServer produces error message "aac bitstream not in adts
format and extradata missing".
My ffserver.conf is given below?
Port 8091
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 100
MaxBandwidth 1000000
CustomLog -
NoDaemon
<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 150M
ACL allow 127.0.0.1
</Feed>
<Stream test.ts>
Feed feed1.ffm
Format mpegts
AudioCodec aac
AudioBitRate 128k
AudioChannels 2
AudioSampleRate 48000
AVOptionAudio flags +global_header
VideoCodec libx264
VideoBitRate 400k
VideoFrameRate 15
VideoSize 720x480
AVOptionVideo coder 0
AVOptionVideo bf 0
AVOptionVideo flags2 +mixed_refs+fastpskip
AVOptionVideo flags +loop
AVOptionVideo cmp +chroma
AVOptionVideo partitions +parti8x8+parti4x4+partp8x8+partb8x8
AVOptionVideo me_method hex
AVOptionVideo subq 7
AVOptionVideo me_range 16
AVOptionVideo g 250
AVOptionVideo keyint_min 10
AVOptionVideo sc_threshold 40
AVOptionVideo i_qfactor 0.71
AVOptionVideo b_strategy 1
AVOptionVideo qcomp 0.6
AVOptionVideo qmin 10
AVOptionVideo qmax 51
AVOptionVideo qdiff 4
AVOptionVideo refs 3
AVOptionVideo directpred 1
AVOptionVideo trellis 1
AVOptionVideo flags2 +mixed_refs+fastpskip
AVOptionVideo wpredp 0
AVOptionVideo flags +global_header
AVOptionVideo bsf h264_mp4toannexb
VideoGopSize 12
Preroll 15
StartSendOnKey
</Stream>
<Stream stat.html>
Format status
ACL allow 127.0.0.1
</Stream>
<Redirect index.html>
URL stat.html
</Redirect>
complete uncut command line output of ffserver:
./ffserver_g
ffmpeg version N-45215-g949acef Copyright (c) 2000-2012 the FFmpeg developers
built on Oct 10 2012 15:45:20 with gcc 4.6.3 (GCC) 20120306 (Red Hat 4.6.3-2)
configuration: --prefix=/usr --libdir=/usr/lib --enable-shared
libavutil 51. 74.100 / 51. 74.100
libavcodec 54. 65.100 / 54. 65.100
libavformat 54. 31.100 / 54. 31.100
libavdevice 54. 3.100 / 54. 3.100
libavfilter 3. 19.102 / 3. 19.102
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 16.100 / 0. 16.100
Tue Oct 30 16:43:25 2012
Tue Oct 30 16:43:25 2012
Tue Oct 30 16:43:25 2012
Tue Oct 30 16:43:25 2012
Tue Oct 30 16:43:25 2012 FFserver started.
Tue Oct 30 16:43:28 2012
Tue Oct 30 16:43:28 2012
Tue Oct 30 16:43:28 2012
Tue Oct 30 16:43:28 2012
Tue Oct 30 16:43:28 2012 muxrate VBR, pcr every 1 pkts, sdt every 200,
pat/pmt every 40 pkts
Tue Oct 30 16:43:31 2012
Tue Oct 30 16:43:31 2012
Tue Oct 30 16:43:31 2012 127.0.0.1 - - [GET] "/feed1.ffm HTTP/1.1" 200 4149
Tue Oct 30 16:43:31 2012
Tue Oct 30 16:43:31 2012 aac bitstream not in adts format and extradata missing
Tue Oct 30 16:43:31 2012 Error writing frame to output
Tue Oct 30 16:43:31 2012 10.112.47.18 - - [GET] "/test.ts HTTP/1.1" 200 8715
Tue Oct 30 16:43:47 2012 127.0.0.1 - - [POST] "/feed1.ffm HTTP/1.1" 200 2162688
Change History (8)
comment:1 by , 12 years ago
Version: | 0.9.2 → git-master |
---|
comment:3 by , 12 years ago
Is it possible that this is the same problem as ticket #1970?
Ie, is the problem that -flags -global_header is ignored and does it work with FFmpeg version 896e597?
comment:4 by , 12 years ago
ticket 1970 is not related to this ticket.I didn't face any issue of
ffmpeg ignoring -flags -global_header.
I am able to compile FFMpeg version 896e597.It produces following error:
make: *** No rule to make target `libavfilter/all_channel_layouts.inc', needed by `libavfilter/formats.o'. Stop.
comment:6 by , 12 years ago
Yes It compiled.Thanks.
I am getting even more errors with FFMpeg version 896e597.
Following is the log of ffserver.
./ffserver -f /etc/ffserver.conf
ffserver version N-31423-g896e597, Copyright (c) 2000-2011 the FFmpeg developers
built on Dec 6 2012 17:04:11 with gcc 4.4.5
configuration: --enable-libx264 --enable-gpl --enable-static --disable-shared
libavutil 51. 11. 0 / 51. 11. 0
libavcodec 53. 7. 0 / 53. 7. 0
libavformat 53. 5. 0 / 53. 5. 0
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 24. 4 / 2. 24. 4
libswscale 2. 0. 0 / 2. 0. 0
libpostproc 51. 2. 0 / 51. 2. 0
Thu Dec 6 17:49:02 2012 FFserver started.
Thu Dec 6 17:49:05 2012 muxrate VBR, pcr every 1 pkts, sdt every 200, pat/pmt every 40 pkts
Thu Dec 6 17:49:05 2012 aac bitstream not in adts format and extradata missing
Thu Dec 6 17:49:05 2012 Error writing frame to output
Thu Dec 6 17:49:17 2012 10.112.47.18 - - [GET] "/feed1.ffm HTTP/1.1" 200 4149
Thu Dec 6 17:49:17 2012 aac bitstream not in adts format and extradata missing
Thu Dec 6 17:49:17 2012 Error writing frame to output
Thu Dec 6 17:49:17 2012 h264 bitstream malformated, no startcode found, use -vbsf h264_mp4toannexb
Thu Dec 6 17:49:17 2012 Error writing frame to output
Thu Dec 6 17:49:17 2012 aac bitstream not in adts format and extradata missing
Thu Dec 6 17:49:17 2012 Error writing frame to output
Thu Dec 6 17:49:17 2012 10.112.62.79 - - [GET] "/test.ts HTTP/1.1" 200 1947
Thu Dec 6 17:49:33 2012 10.112.47.18 - - [POST] "/feed1.ffm HTTP/1.1" 200 2162688
comment:7 by , 11 years ago
Reproduced by developer: | set |
---|---|
Status: | new → open |
Reproducible with configuration:
Port 8090 BindAddress 0.0.0.0 MaxClients 100 MaxBandwidth 60000 CustomLog - <Feed test.ffm> File test.ffm ACL allow localhost </Feed> <Stream test> Feed test.ffm AudioCodec aac Format mpegts NoVideo </Stream> <Stream status> Format status </Stream>
ffserver -f ffserver.test.conf ffmpeg -re -i INPUT -vn -c:a aac -strict experimental -flags:a -global_header -override_ffserver http://localhost:8090/test.ffm ffplay http://localhost:8090/test
If I change the AAC encoder (to libfdk_aac or libfaac) the problem is not reproducible. If -flags:a
+global_header is specified it works fine.
comment:8 by , 11 years ago
Analyzed by developer: | set |
---|---|
Keywords: | aac added |
Resolution: | → invalid |
Status: | open → closed |
The issue is not directly related to ffserver.
The native AAC encoder will output to raw AAC format, which is not expected by the mpegts muxer. Using the switch -flags +gloabal_header will force the encoder output to ADTS AAC format.
Closing as the issue seems due to a configuration error, please reopen if you think it is not.
Is this problem only reproducible with ffserver or also with the following command line?