對於一個項目,我必須逐幀對視頻幀進行一些操作(如視頻上的繪製元素)。有沒有方法可以讓我在Android上逐幀執行操作?Android逐幀方法
回答
如果您有框架,您可以使用Android的逐幀動畫技術。
- 將圖像(幀)放入可繪製文件夾中。
- 創建文件夾繪製,即一個新的文件,frames.xml
- 然後把這個代碼在它
<!-- Animation frames are wheel0.png through wheel5.png files inside the res/drawable/ folder --> <animation-list android:id="@+id/selected" android:oneshot="false"> <item android:drawable="@drawable/wheel0" android:duration="50" /> <item android:drawable="@drawable/wheel1" android:duration="50" /> <item android:drawable="@drawable/wheel2" android:duration="50" /> <item android:drawable="@drawable/wheel3" android:duration="50" /> <item android:drawable="@drawable/wheel4" android:duration="50" /> <item android:drawable="@drawable/wheel5" android:duration="50" /> </animation-list>
使用的ImageView玩這些框架。
ImageView img =(ImageView)findViewById(R.id.spinning_wheel_image); img.setBackgroundResource(R.drawable.spin_animation); AnimationDrawable frameAnimation =(AnimationDrawable)img.getBackground();
//開始動畫(默認循環播放)。 frameAnimation.start();
參考。
https://developer.android.com/reference/android/graphics/drawable/AnimationDrawable.html
- 1. Android - 逐幀動畫,超過100幀的解決方法?
- 2. Android動畫 - 逐幀?
- 3. 逐幀動畫
- 4. 逐幀動畫
- 5. 逐幀動畫
- 6. css3動畫幀逐幀
- 7. 視頻幀逐幀查找
- 8. CSS逐幀淡入
- 9. CSS3動畫(逐幀)
- 10. 逐幀視頻庫
- 11. 逐幀播放mp3
- 12. Android的幀逐幀視頻播放前進/後退和捕捉
- 13. 將熊貓數據幀逐行組合的高效方法
- 14. VideoView和逐步播放(逐幀)
- 15. 動態壁紙上的幀逐幀
- 16. 在錄製Android 4時逐幀處理Android視頻
- 17. 逐幀播放視頻 - Kivy
- 18. 逐幀動畫與UIGestureRecognizer
- 19. AxWindowsMediaPlayer逐幀來回跳轉
- 20. Xcode 6逐幀動畫
- 21. 逐幀按鈕動畫
- 22. HTTP視頻流逐幀
- 23. SurfaceView上的逐幀動畫
- 24. iOS - 逐幀更改圖像
- 25. ontouch上逐幀動畫
- 26. MacOs中的逐幀動畫
- 27. 逐行數據幀分割
- 28. 問題關於逐幀動畫的具體android問題
- 29. 使用Android中的服務使用音頻逐幀動畫
- 30. 如何在Android上進行逐幀動畫?
不行,我必須做一個REST請求視頻的每一幀視頻運行時 – Quarillion