Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

我想将其他格式的音频转成spx格式的,但是日志提示我自动选择编码器失败 #21

Open
FFFmark opened this issue Aug 1, 2020 · 10 comments

Comments

@FFFmark
Copy link

FFFmark commented Aug 1, 2020

No description provided.

@FFFmark
Copy link
Author

FFFmark commented Aug 1, 2020

Automatic encoder selection failed for output stream #0:0. Default encoder for format spx (codec speex) is probably disabled. Please choose an encoder manually.

@FFFmark
Copy link
Author

FFFmark commented Aug 1, 2020

我改转码去手动选择,或者去添加这个编码器,在这个框架下面

@AnJoiner
Copy link
Owner

AnJoiner commented Aug 1, 2020

我改转码去手动选择,或者去添加这个编码器,在这个框架下面

确认一下,你使用的是哪一个?第一个全部编码都包含

// 全部编解码-体积较大
implementation 'com.coder.command:ffmpeg:${latestVersion}'
// 部分常用编解码-体积较小,比上面引入减少大约6M
implementation 'com.coder.command:ffmpeg-mini:${latestVersion}'

@FFFmark
Copy link
Author

FFFmark commented Aug 3, 2020

implementation 'com.coder.command:ffmpeg:1.1.5'
应用的是这个包,因为他说这个全部编解码,考虑到spx不一定常见,所以我引用了这个

@AnJoiner
Copy link
Owner

AnJoiner commented Aug 3, 2020

implementation 'com.coder.command:ffmpeg:1.1.5'
应用的是这个包,因为他说这个全部编解码,考虑到spx不一定常见,所以我引用了这个

把你使用的命令发我一下

@FFFmark
Copy link
Author

FFFmark commented Aug 3, 2020

implementation 'com.coder.command:ffmpeg:1.1.5'
应用的是这个包,因为他说这个全部编解码,考虑到spx不一定常见,所以我引用了这个

把你使用的命令发我一下

val src = obtainSoundFile()?.listFiles()?.get(0)?.absolutePath ?: ""
val target = obtainSoundFile()?.absolutePath + "/test.spx"

            FFmpegCommand.runAsync(FFmpegUtils.transformAudio(src,target), object : IFFmpegCallBack {

                override fun onComplete() {

                }

                override fun onCancel() {

                }

                override fun onProgress(progress: Int) = Unit

                override fun onError(t: Throwable?) {
                    t?.printStackTrace()
                }

                override fun onStart() {

                }
            })

@AnJoiner
Copy link
Owner

AnJoiner commented Aug 3, 2020

implementation 'com.coder.command:ffmpeg:1.1.5'
应用的是这个包,因为他说这个全部编解码,考虑到spx不一定常见,所以我引用了这个

把你使用的命令发我一下

val src = obtainSoundFile()?.listFiles()?.get(0)?.absolutePath ?: ""
val target = obtainSoundFile()?.absolutePath + "/test.spx"

            FFmpegCommand.runAsync(FFmpegUtils.transformAudio(src,target), object : IFFmpegCallBack {

                override fun onComplete() {

                }

                override fun onCancel() {

                }

                override fun onProgress(progress: Int) = Unit

                override fun onError(t: Throwable?) {
                    t?.printStackTrace()
                }

                override fun onStart() {

                }
            })

刚刚查询了一下ffmpeg编译源码,spx的音频编解码库没有加入,所以无法找到执行自动转这种格式的编解码

@FFFmark
Copy link
Author

FFFmark commented Aug 3, 2020

implementation 'com.coder.command:ffmpeg:1.1.5'
应用的是这个包,因为他说这个全部编解码,考虑到spx不一定常见,所以我引用了这个

把你使用的命令发我一下

val src = obtainSoundFile()?.listFiles()?.get(0)?.absolutePath ?: ""
val target = obtainSoundFile()?.absolutePath + "/test.spx"

            FFmpegCommand.runAsync(FFmpegUtils.transformAudio(src,target), object : IFFmpegCallBack {

                override fun onComplete() {

                }

                override fun onCancel() {

                }

                override fun onProgress(progress: Int) = Unit

                override fun onError(t: Throwable?) {
                    t?.printStackTrace()
                }

                override fun onStart() {

                }
            })

刚刚查询了一下ffmpeg编译源码,spx的音频编解码库没有加入,所以无法找到执行自动转这种格式的编解码

😀,那我要怎么弄呢,或者我要往那个方向研究一下呢,刚刚接触转码这个领域

@AnJoiner
Copy link
Owner

AnJoiner commented Aug 3, 2020

那我要怎么弄呢,或者我要往那个方向研究一下呢,刚刚接触转码这个领域

可以自己编译一个,如果你只是想使用编码为.spx后缀的文件,建议你只需要编译【speex】,可以参考这篇文章《Android Speex编译及使用》

@FFFmark
Copy link
Author

FFFmark commented Aug 4, 2020

@AnJoiner 你好,我想再次问一下这个框架能支持那些音频转码,就是说 能转成什么格式的音频呢?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants