tree: 236d498a7df2dc588763c5cd58696c91d0f80ebb [path history] [tgz]
  1. default/
  2. testdata/
  3. __init__.py
  4. BUILD
  5. decode_audio_op.cc
  6. decode_audio_op_test.py
  7. decode_video_op.cc
  8. decode_video_op_test.py
  9. encode_audio_op.cc
  10. encode_audio_op_test.py
  11. ffmpeg_lib.h
  12. ffmpeg_ops.py
  13. README.md
tensorflow/contrib/ffmpeg/README.md

FFmpeg TensorFlow integration

Decoding audio files can be done using a new op that uses FFmpeg to convert various audio file formats into tensors.

tf.audio.decode_audio accepts MP3, WAV, and OGG file formats.

FFmpeg must be installed before these ops can be used. The ops will look for the ffmpeg binary somewhere in $PATH. When the binary is unavailable, the error FFmpeg must be installed to run this op. FFmpeg can be found at http://www.ffmpeg.org. will be returned.

Testing

In addition to the regular tests, the integration tests should also be run on this code. First, install docker. Then run the integration tests:

export TF_BUILD_CONTAINER_TYPE=CPU  # or GPU
export TF_BUILD_PYTHON_VERSION=PYTHON2  # or PYTHON3
export TF_BUILD_IS_OPT=OPT
export TF_BUILD_IS_PIP=PIP
export TF_BUILD_INTEGRATION_TESTS=1
tensorflow/tools/ci_build/ci_parameterized_build.sh