From 95956c9b814b3cfb611ebb7f5d86f6babcadd783 Mon Sep 17 00:00:00 2001 From: Waldemar Kozaczuk Date: Tue, 3 Sep 2019 23:50:42 -0400 Subject: [PATCH] ffmpeg: added version that takes binaries from host Signed-off-by: Waldemar Kozaczuk --- ffmpeg-from-host/Makefile | 11 +++++++++++ ffmpeg-from-host/README.md | 12 ++++++++++++ ffmpeg-from-host/module.py | 4 ++++ 3 files changed, 27 insertions(+) create mode 100644 ffmpeg-from-host/Makefile create mode 100644 ffmpeg-from-host/README.md create mode 100644 ffmpeg-from-host/module.py diff --git a/ffmpeg-from-host/Makefile b/ffmpeg-from-host/Makefile new file mode 100644 index 000000000..0f23a7cdd --- /dev/null +++ b/ffmpeg-from-host/Makefile @@ -0,0 +1,11 @@ +.PHONY: module clean + +SRC = $(shell readlink -f ../..) + +ffmpeg_path = $(shell realpath $$(which ffmpeg)) + +module: + $(SRC)/scripts/manifest_from_host.sh $(ffmpeg_path) > usr.manifest + +clean: + rm -rf usr.manifest diff --git a/ffmpeg-from-host/README.md b/ffmpeg-from-host/README.md new file mode 100644 index 000000000..1d28f080c --- /dev/null +++ b/ffmpeg-from-host/README.md @@ -0,0 +1,12 @@ +Open source audio & video processing framework - https://www.ffmpeg.org/ + +The default command prints list of supported formats. + +Examples: +- get details of video - ./scripts/run.py -e '/ffmpeg -i http://clips.vorwaerts-gmbh.de/VfE_html5.mp4' +- extract 10 seconds of video starting at 10 seconds offset - ./scripts/run.py -e '/ffmpeg -i http://clips.vorwaerts-gmbh.de/VfE_html5.mp4 -ss 00:00:10 -codec copy -t 10 output.mp4' +- extract png image for each second of video - ./scripts/run.py -e '/ffmpeg -i http://clips.vorwaerts-gmbh.de/VfE_html5.mp4 -r 1 -f image2 image-%2d.png + +For more examples read https://www.ostechnix.com/20-ffmpeg-commands-beginners/ + +There are number of test videos of different formats you can use from here - https://standaloneinstaller.com/blog/big-list-of-sample-videos-for-testers-124.html diff --git a/ffmpeg-from-host/module.py b/ffmpeg-from-host/module.py new file mode 100644 index 000000000..f5432d661 --- /dev/null +++ b/ffmpeg-from-host/module.py @@ -0,0 +1,4 @@ +from osv.modules import api + +api.require("libz") +default = api.run("/ffmpeg -formats")