Skip to content

Commit

Permalink
ffmpeg: added version that takes binaries from host
Browse files Browse the repository at this point in the history
Signed-off-by: Waldemar Kozaczuk <[email protected]>
  • Loading branch information
wkozaczuk committed Sep 4, 2019
1 parent ee9058a commit 95956c9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ffmpeg-from-host/Makefile
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions ffmpeg-from-host/README.md
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions ffmpeg-from-host/module.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from osv.modules import api

api.require("libz")
default = api.run("/ffmpeg -formats")

0 comments on commit 95956c9

Please sign in to comment.