On 02/04/2008, at 5:37 AM, Vladimir Eremeev wrote:

>
> How should I set the output->stream[1]->codec that it has the same  
> parameters?
>
> Currently I copy all fields from the input codec to the output. I've  
> copied a
> code from ffmpeg.c
>
> However, the dump_format shows
>
> Output #0, dvd, to 'filename':
> Stream #0.0: Video: mpeg2video, yuv420p, 720x576, q=2-31, 3409 kb/s,  
> 25.00 tb(c)
> Stream #0.1: Audio: 0x0000, 48000 Hz, stereo, 192 kb/s

I had exactly the same issue trying to write a generic avi/mov/mpg  
muxer.

I discovered the issue is that the mpeg audio decoder WAS different to  
the encoder.
because I just read this in the header file:

/* CODEC_ID_MP3LAME is obsolete */
#define CODEC_ID_MP3LAME CODEC_ID_MP3

And I remember that I've installed an updated ffmpeg library.
Check your avcodec.h to see if mp3lame is obsolete, if not, try  
installing a newer ffmpeg library.

I've tried rebuilding my executable, with the new library, and it  
still exhibits the same issue.

Input #1, m4v, from 'ChinaAir.m4v':
  Duration: N/A, bitrate: N/A
    Stream #1.0: Video: mpeg4, yuv420p, 320x240 [PAR 1:1 DAR 4:3],  
25.00 tb(r)
video format: m4v
Input #2, mp3, from 'ChinaAir.mp3':
  Duration: 00:00:11.4, start: 0.000000, bitrate: 64 kb/s
    Stream #2.0: Audio: mp3, 32000 Hz, stereo, 64 kb/s
audio format: mp3
Output #0, avi, to 'test.avi':
    Stream #0.0: Video: mpeg4, yuv420p, 320x240 [PAR 1:1 DAR 4:3],  
q=2-31, 25.00 tb(c)
    Stream #0.1: Audio: 0x0000, 32000 Hz, stereo, 64 kb/s

Without the correct audio codec, the file will not mux properly as the  
packetiser doesn't know what the output audio format it.

Does anyone else know what the output codec should be?

Mark

_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to