converting wav to mp3 (and vice versa) using GStreamer

百般思念 提交于 2019-12-04 19:54:02

your pipeline is correct - or more specifically, your choice of elements and properties is correct.

the problem is most likely in another part of your code. have you set the pipeline to gst.STATE_PLAYING?

pipeline = gst.parse_launch("filesrc location=C:\\music.wav ! decodebin ! audioconvert !  lame ! filesink location=C:\\music.mp3")
pipeline.set_state(gst.STATE_PLAYING)

there are numerous other common mistakes that can be made- posting your entire source code would be a great help!

If you didn't get this working I suggest using ffmpeg to convert your files, it's very efficient and opensource, you can find a compiled windows version with WinFF which you can manipulate through the command line.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!