bilibili / ijkplayer

Android/iOS video player based on FFmpeg n3.4, with MediaCodec, VideoToolbox support.
GNU General Public License v2.0
32.54k stars 8.13k forks source link

How to give explicit commands to ffplay like video filters (-vf) or -complex_filters? #4214

Open sunit-poddar-zz opened 6 years ago

sunit-poddar-zz commented 6 years ago

I'm trying to preview videos with ffplay in a video editing application and used ffmpeg for final edits on videos when i came accross IJK-player.

I've been able to play single videos in the videoview as per the example but how to invoke explicit commands for ex changing playback speed - -vf setpts=2*PTS

or cropping the video -vf crop=100:100

I've tried it setting with ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "vf", "setpts=2*PTS");

I've seen #3025 and #3312 for playback speeds but nothing works out. I can work around with playback speed using ijkMediaPlayer.setSpeed(2f) but for overlaying audios over video or transitions between two videos i need ffplay preview in my app

Is is possible in the current releases to invoke ffplay commands explicitly?

TestSmirk commented 5 years ago

same question here

TestSmirk commented 5 years ago

https://testsmirk.com/2019/01/17/video-filter-ffmpeg-android/ @sunit-poddar you can see this.

nikunjparadva commented 5 years ago

any one got solution? how to use -vf command ?

pavelstud commented 4 years ago
  1. vf0 must be used instead of vf. See more for the list of supported options: https://github.com/bilibili/ijkplayer/blob/master/ijkmedia/ijkplayer/ff_ffplay_options.h
  2. Plus, CONFIG_AVFILTER must be set to "1" in the https://github.com/bilibili/ijkplayer/blob/master/ijkmedia/ijkplayer/config.h
  3. ffmpeg must be built with proper filters' support.