Opened 10 years ago

Last modified 10 years ago

#3853 new defect

silence in front of generated audio mpegts

Reported by: mpapp Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Let a.ts be an mpegts with aac encoded audio only.
Then

/ffmpeg/ffmpeg -i a.ts -acodec aac -strict -2 -loglevel debug audio.ts

Input #0, aac, from 'a.ts': Duration: 00:00:05.06, bitrate: 126 kb/s Stream #0:0: Audio: aac, 44100 Hz, stereo, fltp, 126 kb/s

if I convert a.ts and audio.ts into .wav I will get two wav files, one of them has silence in front of it. I used audacity to determine that about 0.031s audio.ts will have some silence.
I can see that a.ts has 215 audio frames and audio.ts 216.

Any explanations why is silence added to ts? As far as I can see it could be a bug.
Summary: the command at top introduces one extra frame to the start of aac stream, making aac longer as it should.

Attachments (2)

audio.ts (90.3 KB ) - added by Carl Eugen Hoyos 10 years ago.
mpegtswithaudioonly.ts (78.6 KB ) - added by Carl Eugen Hoyos 10 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 by mpapp, 10 years ago

The output audio stream is always increased by one frame, even if the encoding frequency changes.

comment:2 by Carl Eugen Hoyos, 10 years ago

I believe this is a duplicate of another ticket but in any case please post your ffmpeg command line together with the complete, uncut console output and provide an input sample to make this a valid ticket.
(Or try to find the other ticket. Since I have troubles understanding the issue, I couldn't choose a good keyword but the creator might have been DonMoir.)

comment:3 by mpapp, 10 years ago

https://trac.ffmpeg.org/ticket/2325
that seems to be similar issue.

comment:4 by mpapp, 10 years ago

../ffmpeg/ffmpeg -y -i mpegtswithaudioonly.ts -acodec aac -strict -2 audio.ts

ffmpeg version N-60562-g3e8b17f Copyright (c) 2000-2014 the FFmpeg developers

built on Aug 13 2014 14:34:41 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
configuration: --enable-libmp3lame --enable-pthreads --extra-cflags='-fPIC -m64' --enable-libx264 --enable-gpl
libavutil 52. 63.101 / 52. 63.101
libavcodec 55. 52.100 / 55. 52.100
libavformat 55. 32.100 / 55. 32.100
libavdevice 55. 9.100 / 55. 9.100
libavfilter 4. 1.102 / 4. 1.102
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100

[aac @ 0x30f19e0] Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from 'mpegtswithaudioonly.ts':

Duration: 00:00:05.15, bitrate: 125 kb/s

Stream #0:0: Audio: aac, 44100 Hz, stereo, fltp, 125 kb/s

Output #0, mpegts, to 'audio.ts':

Metadata:

encoder : Lavf55.32.100
Stream #0:0: Audio: aac, 44100 Hz, stereo, fltp, 128 kb/s

Stream mapping:

Stream #0:0 -> #0:0 (aac -> aac)

Press [q] to stop, ? for help
[adts @ 0x30e02a0] Encoder did not produce proper pts, making some up.
size= 90kB time=00:00:05.01 bitrate= 147.5kbits/s
video:0kB audio:79kB subtitle:0 data:0 global headers:0kB muxing overhead 14.439839%

comment:5 by mpapp, 10 years ago

../ffmpeg/ffprobe mpegtswithaudioonly.ts -show_frames | grep audio | wc -l

ffprobe version N-60562-g3e8b17f Copyright (c) 2007-2014 the FFmpeg developers

built on Aug 13 2014 14:34:41 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
configuration: --enable-libmp3lame --enable-pthreads --extra-cflags='-fPIC -m64' --enable-libx264 --enable-gpl
libavutil 52. 63.101 / 52. 63.101
libavcodec 55. 52.100 / 55. 52.100
libavformat 55. 32.100 / 55. 32.100
libavdevice 55. 9.100 / 55. 9.100
libavfilter 4. 1.102 / 4. 1.102
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100

[aac @ 0x36c6240] Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from 'mpegtswithaudioonly.ts':

Duration: 00:00:05.15, bitrate: 125 kb/s

Stream #0:0: Audio: aac, 44100 Hz, stereo, fltp, 125 kb/s

216
It has 216 frames

../ffmpeg/ffprobe audio.ts -show_frames | grep audio | wc -l

ffprobe version N-60562-g3e8b17f Copyright (c) 2007-2014 the FFmpeg developers

built on Aug 13 2014 14:34:41 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
configuration: --enable-libmp3lame --enable-pthreads --extra-cflags='-fPIC -m64' --enable-libx264 --enable-gpl
libavutil 52. 63.101 / 52. 63.101
libavcodec 55. 52.100 / 55. 52.100
libavformat 55. 32.100 / 55. 32.100
libavdevice 55. 9.100 / 55. 9.100
libavfilter 4. 1.102 / 4. 1.102
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100

Input #0, mpegts, from 'audio.ts':

Duration: 00:00:04.88, start: 1.400000, bitrate: 151 kb/s
Program 1

Metadata:

service_name : Service01
service_provider: FFmpeg

Stream #0:0[0x100]: Audio: aac ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 122 kb/s

217
It has 217 frames

comment:6 by mpapp, 10 years ago

You can download the two files here
www.equinoxbase.com/audio.ts
www.equinoxbase.com/mpegtswithaudioonly.ts

by Carl Eugen Hoyos, 10 years ago

Attachment: audio.ts added

by Carl Eugen Hoyos, 10 years ago

Attachment: mpegtswithaudioonly.ts added
Note: See TracTickets for help on using tickets.