[英]gstreamer convert mp3 to wav
I'm trying to convert an mp3 file to wav with gstreamer. 我正在尝试使用gstreamer将mp3文件转换为wav。 Here's the pipeline:
这是管道:
gst-launch-1.0 filesrc location=audio.mp3 ! gst-launch-1.0 filesrc location = audio.mp3! audio/mpeg !
音频/ mpeg! mpg123audiodec !
mpg123audiodec! wavenc !
wavenc! filesink location=audio.wav
filesink location = audio.wav
Also, I'd like the output to be 24 bit/48kHz 另外,我希望输出为24 bit / 48kHz
I get this error: 我收到此错误:
ERROR: from element /GstPipeline:pipeline0/GstCapsFilter:capsfilter0: Filter caps do not completely specify the output format 错误:来自元素/ GstPipeline:pipeline0 / GstCapsFilter:capsfilter0:过滤器上限未完全指定输出格式
There was another similar thread that I saw here and tried to comment, but I had to have 50 points or whatever;) 我在这里看到了另一个类似的话题并试图发表评论,但我得得50分或其他分数;)
I would make use of the bins to make your life easier. 我会利用垃圾桶使您的生活更轻松。 I came up with this:
我想出了这个:
gst-launch-1.0 filesrc location=in.mp3 ! decodebin ! audioresample ! audioconvert ! \
audio/x-raw,format=S24LE,rate=48000 ! wavenc ! filesink location=out.wav
Which gives me this result: 这给了我这个结果:
$ file out.wav
out.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 24 bit, stereo 48000 Hz
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.