[Libav-user] about muxing an mp4 with AAC

Person personlin118 at gmail.com
Sat Apr 7 16:21:20 CEST 2012


Hi,

I have to record bit-stream to mp4 format.
What kind of AAC stream could be muxed to mp4?
The VLC player can play video well, but can't decode any AAC frame in my
mp4. (audio decode frames always is zero)
I am sure that audio is in the mp4 file.
I tried to mux to AVI that is got no sound too.

PS: My AAC stream is without ADTS or AU_HEADER.

// read AAC samples from file, and using av_interleaved_write_frame to
write audio frame.
if((fread(audio_outbuf, 1, size_to_read, fv_a)) <= 0)
{
return -1;
}
av_init_packet(&pkt);
pkt.pts = pkt.dts = AV_NOPTS_VALUE;
pkt.flags |= AV_PKT_FLAG_KEY;
pkt.stream_index = st->index;
pkt.data = audio_outbuf;
pkt.size = size_to_read;

/* write the compressed frame in the media file */
if (av_interleaved_write_frame(oc, &pkt) != 0) {
fprintf(stderr, "Error while writing audio frame\n");
exit(1);
}

// I use mp4box to dump file info
MP4Box -info test.mp4
* Movie Info *
Timescale 1000 - Duration 00:00:23.500
Fragmented File no - 2 track(s)
File Brand isom - version 512
Created: GMT Sat Apr  7 13:58:17 2012

File has no MPEG4 IOD/OD

iTunes Info:
Encoder Software: Lavf53.31.100

Track # 1 Info - TrackID 1 - TimeScale 25 - Duration 00:00:12.040
Media Info: Language "Undetermined" - Type "vide:avc1" - 301 samples
Visual Track layout: x=0 y=0 width=352 height=288
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 352 x 288
AVC Info: 1 SPS - 1 PPS - Profile Baseline @ Level 2
NAL Unit length bits: 32
Self-synchronized


Best Regards,
Person
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120407/59642c65/attachment.html>


More information about the Libav-user mailing list