-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Luca Abeni
Sent: Wednesday, December 17, 2008 2:31 PM
To: Libav* user questions and discussions
Subject: Re: [libav-user] Problem in live audio encoding

Peeyush Mishra wrote:
> Hi, 
> 
> I am trying to encode uncompressed audio data into MP2 codec for further
RTP
> streaming , I am able to open /dev/dsp device and read raw data but when I
> pass that data into encoder its not encoding

I think you posted a similar question few days ago, and I explained what was
the problem with the code you posted: after fixing the two bugs I pointed
out,
your previous program (test.c) works correctly.

The code you posted now looks like a bad cut'n'paste from ffmpeg.c and other
programs, and does not even compile (for example, AVOutputStream is a
structure
defined in ffmpeg.c, not a part of the libav* API).


> the reason I found is out put
> AVCodecContext struct is not initialized , Please can anyone help me ,,,,

This is funny, because in your previous example you managed to initialise
it (AFAIK).


> Why we need any circular buffer sort of mechanism to pass data from device
> to encoder ,,, is that implementation is necessary . 

Not necessary, AFAIK.


Summing up, what you need to do is:
        1) Open an input AVFormatContext (see tools/pktdumper.c, for
           example). The file name should probably be "/dev/dsp", and the
           format should be "oss".
        2) Open the input codec (it will be some kind of PCM codec,
           according to the input format)
        3) Open an output AVFormatContext and codec (see output_example.c).
           The output format should be "rtp", and the file name should be
           something like "rtp://<address>:<port>". The output codec should
           be mp2
        4) Enter a loop that reads an input packet, decodes it, encodes the
            output, and writes it to the output format


                                Luca
      Hi can u tell me why this "decodes it" in step 4 is required, I just
dud all the stuff required to encode into MP3 format but now the problem is
the output file is playing so fast. All the patameters are right but still
the problem remains same ,,, 
Can u help me !!
I just opened /dev/dsp through open function and set the device through
ioctl , and used ffmpeg APIs for encoding ,,,,,,,, 



Please tell me what can I do ,,, to improve my application 


Thanks 
Peeyush
________________________________


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

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.552 / Virus Database: 270.9.18 - Release Date: 12/14/2008 12:00
AM
 

No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.552 / Virus Database: 270.10.1/1868 - Release Date: 12/29/2008
10:48 AM
 

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

Reply via email to