-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add FFmpeg support to open video files #30
Commits on Jan 8, 2019
-
Add FFmpeg support to open video files
This fix adds a preliminary video file support (`VideoDataset`) by linking and using FFmpeg's libraries. The `video.VideoDataset` takes input of filename list, and generates outputs of RGB24 images (`uint8`) in `(height, width, 3)`. The reason to link against FFmpeg's libraries is because FFmpeg has a LGPL 2.1+ license. On Ubuntu 18.04, FFmpeg libraries consists of: ``` libavformat.so.57 libavcodec.so.57 libavutil.so.55 libswscale.so.4 ``` Because FFmpeg only guarantee's major version conpatibility, linking to a lower version (e.g., libavformat.so.54 on Ubuntu 14.04) may not work. To support multiple versions of Ubuntu, multiple copies of header file combined with linking to different versions of .so might be needed. It needs to be fully tested though and only limited major version should be supported. At the moment, only ffmpeg libraries in Ubuntu 18.04 are used. To install required libraries on Ubuntu 18.04: ``` apt-get -y -qq install libavformat57 libavcodec57 libavutil55 libswscale4 ``` To build the pip package: ``` bazel build -s --verbose_failures build_pip_pkg ``` Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for 8a88f15 - Browse repository at this point
Copy the full SHA 8a88f15View commit details -
Add python wrapper for video.VideoDataset
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for 9a500e5 - Browse repository at this point
Copy the full SHA 9a500e5View commit details -
Add test case for video.VideoDataset
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for fdf7499 - Browse repository at this point
Copy the full SHA fdf7499View commit details -
Add BUILD file for tensorflow_io.video
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for cd22417 - Browse repository at this point
Copy the full SHA cd22417View commit details -
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for 6dcdaa5 - Browse repository at this point
Copy the full SHA 6dcdaa5View commit details -
Update BUILD file to include video.VideoDataset
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for 15b2c43 - Browse repository at this point
Copy the full SHA 15b2c43View commit details -
Disable -//tensorflow_io/video:video_py_test test on Ubuntu 14.04
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for 1df47e2 - Browse repository at this point
Copy the full SHA 1df47e2View commit details -
Update ffmpeg to use stub .so files
So that build could always succeed. In runtime system .so files will be used. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for 738b8ea - Browse repository at this point
Copy the full SHA 738b8eaView commit details -
Add Travis CI for Ubuntu 18.04, use
docker run
as Travis does not h……ave Ubuntu 18.04 support directly. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for d218d35 - Browse repository at this point
Copy the full SHA d218d35View commit details -
Disable sandboxed mode in bazel and use --spawn_strategy standalone
Encountered quite some issues with ``` Use --sandbox_debug to see verbose messages from the sandbox /usr/bin/ld.gold: error: cannot find libavformat.so.57 /usr/bin/ld.gold: error: cannot find libavcodec.so.57 /usr/bin/ld.gold: error: cannot find libavutil.so.55 /usr/bin/ld.gold: error: cannot find libswscale.so.4 collect2: error: ld returned 1 exit status Target //tensorflow_io/video:video_py_test failed to build ``` Believe it is related to (or similiar): https://stackoverflow.com/questions/52386530/linker-fails-in-sandbox-when-running-through-bazel-but-works-when-sandboxed-comm?rq=1 Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for a53ddf6 - Browse repository at this point
Copy the full SHA a53ddf6View commit details -
Use python as base vm image for Travis CI Ubuntu 18.04
(By default Travis CI uses Ruby) Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for 29bb7dc - Browse repository at this point
Copy the full SHA 29bb7dcView commit details -
Only Enable Video on Travis CI for Ubuntu 18.04, as it is inside cont…
…ainer Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for f26e4ee - Browse repository at this point
Copy the full SHA f26e4eeView commit details -
Add Ubuntu 16.04 support, by build separate so with ffmpeg 2.8
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for a113c69 - Browse repository at this point
Copy the full SHA a113c69View commit details -
Fix additional issue in ffmpeg 3.4 where cached packet should just ig…
…nore error Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for bdb85d3 - Browse repository at this point
Copy the full SHA bdb85d3View commit details -
Add Ubuntu 14.04 support, with libav 9.20 built in.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for f3884ae - Browse repository at this point
Copy the full SHA f3884aeView commit details -
Add libav dependency and enable video test on Ubuntu 14.04
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for ccc8a20 - Browse repository at this point
Copy the full SHA ccc8a20View commit details -
Enable Ubuntu 16.04 for video.VideoDataset
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for a5cbf32 - Browse repository at this point
Copy the full SHA a5cbf32View commit details -
Defined a bazel rule of
cc_import_library
to only accepts system li……brary and use `cc_import_library` rule to prevent including GPL code. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for 10a402d - Browse repository at this point
Copy the full SHA 10a402dView commit details -
Reduce verbose logging output by bazel
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for 4da4dd2 - Browse repository at this point
Copy the full SHA 4da4dd2View commit details