GStreamer: status of Python bindings and encoding video with mixed audio

别说谁变了你拦得住时间么 提交于 2019-12-24 05:23:07

问题


I am hoping to find a way to write generated video (non-real time) from Python and mix it with external audio file (MP3) simultaneously.

  • What's the current status of GStreamer Python bindings, are they up-to-date?

  • Would it be possible to write MPEG-4 output with GStreamer and feed raw image frames from Python

  • Is it possible to construct pipeline so that GStreamer would also read MP3 audio and mix it into the container, so that I do not need to reprocess the resulting video track with ffmpeg etc. external tools to have the audio track

  • Are there any up-to-date tutorials for using GStreamer with Python? (I couldn't find anything dated since 2006-2009)

(my old question: did not really give good pointers Writing video with OpenCV + Python + Mac )


回答1:


Whether or not the binding are "up-to-date" really depends on what version of Python you're using. As for Python 2.7, I am using GStreamer without incident.

I have been fighting a major bug in developing with Python 2.7 and GStreamer on Windows 7 (WinBuilds installers), but I'm able to work with GStreamer just fine on Ubuntu.

GStreamer does have mp3 codecs, but there are some legal matters surrounding their legality in some countries. I'd do a Google search on that before using them.

As for tutorials, no luck. All the same, the existing tutorials do quite well for the modern version, especially this one and this one.

In regards to writing MPEG-4 output and feeding raw images, I do not know. That would be a good stand-alone question, in all honesty.



来源:https://stackoverflow.com/questions/6963302/gstreamer-status-of-python-bindings-and-encoding-video-with-mixed-audio

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