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 回答