[FFmpeg-user] converting to AAC audio duration changes
Jeanne Rich
jrich at laika.com
Tue Sep 17 20:04:03 CEST 2013
So the big issue is doing the concatination. The 2 h.264 movie segments used in the concatenation have audio synced. When I concat the 2 movies with the demux, the audio is late by about 1/2 a frame. I tried using -async 0 this did nothing. This time the audio start is at 0, and the video start is > 0. Here is the ffprobe result:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/laika/tmp/jrich/trans/outVideoSegment1.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
encoder : Lavf55.12.100
Duration: 00:00:01.02, start: 0.021333, bitrate: 44915 kb/s
Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080, 45754 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default)
Metadata:
handler_name : DataHandler
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 130 kb/s (default)
Metadata:
handler_name : DataHandler
[STREAM]
index=0
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
profile=Main
codec_type=video
codec_time_base=1/48
codec_tag_string=avc1
codec_tag=0x31637661
width=1920
height=1080
has_b_frames=0
sample_aspect_ratio=0:1
display_aspect_ratio=0:1
pix_fmt=yuv420p
level=50
timecode=N/A
id=N/A
r_frame_rate=24/1
avg_frame_rate=24/1
time_base=1/12288
start_pts=0
start_time=0.000000
duration_ts=12288
duration=1.000000
bit_rate=45754544
nb_frames=24
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
TAG:language=eng
TAG:handler_name=DataHandler
[/STREAM]
[STREAM]
index=1
codec_name=aac
codec_long_name=AAC (Advanced Audio Coding)
profile=unknown
codec_type=audio
codec_time_base=1/48000
codec_tag_string=mp4a
codec_tag=0x6134706d
sample_fmt=fltp
sample_rate=48000
channels=2
bits_per_sample=0
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/48000
start_pts=-1024
start_time=-0.021333
duration_ts=49024
duration=1.021333
bit_rate=130652
nb_frames=48
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
TAG:language=eng
TAG:handler_name=DataHandler
[/STREAM]
[FORMAT]
filename=/laika/tmp/jrich/trans/outVideoSegment1.mov
nb_streams=2
format_name=mov,mp4,m4a,3gp,3g2,mj2
format_long_name=QuickTime / MOV
start_time=-0.021333
duration=1.022000
size=5737915
bit_rate=44915185
TAG:major_brand=qt
TAG:minor_version=512
TAG:compatible_brands=qt
TAG:encoder=Lavf55.12.100
[/FORMAT]
----- Original Message -----
> Hi Mark
>
> > I believe the other interesting thing about AAC compressed audio is
> > that the audio frames overlap and the output audio is the sum of two
> > overlapping two half frames. That gives a problem at the start (and
> > the end) of the audio where the AAC has to be extended (backwards, for
> > the start) by half a frame such that the start (and end) of the audio
> > is at the right audio level.
>
> So if I try to concat 2 movies together, is that why I am coming up with an
> extra frame?
> and the duration directive in the concat demuxer, basically does nothing in
> this case?
>
> Is there any filter that can be applied to adjust for the overlapping frames?
>
> -jeanne
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
More information about the ffmpeg-user
mailing list