Applying Video Filters Using LibVLC with Android

*爱你&永不变心* 提交于 2020-05-29 10:13:27

问题


Using LibVLC, I successfully added a VLC player to an Android app. However, I am not sure whether it is possible to apply video filters to a VLC player using LibVLC. Based on questions such as this, I suspect it might not be built-in for any filters, though I am not sure.

Currently, I am attempting to pass in the video filter commands in the playMRL function, though I am simply receiving an unfiltered video. Below is the relevant code:

String videoOptions[] = {"--video-filter=invert"};
this.libVLC.playMRL("http://www.sample-videos.com/video/mp4/240/big_buck_bunny_240p_1mb.mp4", videoOptions);

Thanks.


回答1:


This may or may not work. Passing command-line arguments as MRL options or library instance options usually works, but is absolutely not guaranteed and not documented which option needs to be set on the library or can be set as a more flexible MRL option. This requires an in-depth knowledge of VLC internals and may break anytime.

The proper solution is to add a filter API to libvlc, which we intend to do but eventually didn't come around to yet. The difficulty here is that we don't want to expose every single filter individually in the API (like already done for the adjust filter), but a way of listing the available filters and their options as well as a mean to call those as the list of filters may vary from operating system to operating system even with the same libvlc version.

Hope that explains things a bit and let me know if you want me to guide you through contributing such an API.



来源:https://stackoverflow.com/questions/35587810/applying-video-filters-using-libvlc-with-android

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