0

I'm developing some Video Editing Apps on Android.

the objective of the app is "Editing Videos on Android".

and...

I'm just completed making video file using some images. but.. I can't attach audio into the video.

my method is same as follows.

1.VideoStream, audio stream creation using AVFormatContext

2.Movie encoding in video stream was successful

3.Encode codec open in audio stream was successful

4.Set sample format to AV_SAMPLE_FMT_FLTP

5.Sample rate and channel was set same as source audio

6.Choose appropriate Decoder and read packet

7.Convert packets using swr_converter, setting same as sample format

8.Encode converted data

9.memory deallocation

10.END!


Problem is here:

Video of finally created video file was normally played. but the Audio wasn't.

It heared like weird. It have many noises and plays slowly.

I've googled with many keywords but they only say about "FFmpeg command line usage".

I wanna make with FFMpeg API. not a Command line tool.

Please help.

4

1 に答える 1

0

ffmpegのライブラリを直接使用するとうまくいかないことがたくさんあると信じてください(Windowsではデバッグはありません)。残念ながら、ffmpeg のライブラリは十分に文書化されていないため、通常、ffmpeg のソース コードを読んでそのライブラリを使用することをお勧めします。同等のコマンド ライン オプションを見つけて、必要な機能を実行し、ffmpeg のソースを追跡して、ライブラリの呼び出しを確認します。

于 2013-08-12T20:16:53.550 に答える