Code Monkey home page Code Monkey logo

ffmpeg's Introduction

FFmpeg Docker image

Docker Stars Docker pulls Docker Automated build Github Container Registry Images gitlab pipeline status Azure Build Status

This project prepares a minimalist Docker image with FFmpeg. It compiles FFmpeg from sources following instructions from the Compilation Guide.

You can install the latest build of this image by running docker pull jrottenberg/ffmpeg:${VERSION}-${VARIANT} or docker pull ghcr.io/jrottenberg/ffmpeg:${VERSION}-${VARIANT}.

This image can be used as a base for an encoding farm.

Builds

There are different builds available:

  • alpine based images ffmpeg:<version>-alpine or ffmpeg:<version>-alpine313 (old versions with ffmpeg:<version>-alpine312 , ffmpeg:<version>-alpine311)
    • alpine based scratch images ffmpeg:<version>-scratch or ffmpeg:<version>-scratch313 (old versions with ffmpeg:<version>-scratch312 , ffmpeg:<version>-scratch311)
  • ubuntu based images ffmpeg:<version>-ubuntu or ffmpeg:<version>-ubuntu2004 (old versions with ffmpeg:<version>-ubuntu1804 , ffmpeg:<version>-ubuntu1604)
    • ubuntu based nvidia images ffmpeg:<version>-nvidia or ffmpeg:<version>-nvidia2004 (old versions with ffmpeg:<version>-nvidia1804, ffmpeg:<version>-nvidia1604)
    • ubuntu based vaapi images ffmpeg:<version>-vaapi1804 or ffmpeg:<version>-vaapi2004 (old versions with ffmpeg:<version>-vaapi1804, ffmpeg:<version>-nvidia1604)

<version> can be one of the following:

  • 3.2
  • 3.3
  • 3.4
  • 4.0
  • 4.1
  • 4.2
  • 4.3
  • 4.4

Generate list of recent images

You can use the following command to generate a list of current images:

$ curl --silent https://hub.docker.com/v2/repositories/jrottenberg/ffmpeg/tags/?page_size=500 | jq -cr ".results|sort_by(.name)|reverse[]|.sz=(.full_size/1048576|floor|tostring+\"mb\")|[.name,( (20-(.name|length))*\" \" ),.sz,( (8-(.sz|length))*\" \"),.last_updated[:10]]|@text|gsub(\"[,\\\"\\\]\\\[]\";null)"

If you want to compare the one you have locally, use the following command:

$ docker images | grep ffmpeg | sort | awk '{print $1 ":" $2 "\t" $7 $8}'

Please use Github issues to report any bug or missing feature.

Test

ffmpeg version N-98740-ga72d529 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-fontconfig --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libbluray --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-libsrt --enable-libaribb24 --enable-vaapi --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
  libavutil      56. 58.100 / 56. 58.100
  libavcodec     58.100.100 / 58.100.100
  libavformat    58. 51.100 / 58. 51.100
  libavdevice    58. 11.101 / 58. 11.101
  libavfilter     7. 87.100 /  7. 87.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100

  configuration:
    --disable-debug
    --disable-doc
    --disable-ffplay
    --enable-shared
    --enable-avresample
    --enable-libopencore-amrnb
    --enable-libopencore-amrwb
    --enable-gpl
    --enable-libass
    --enable-fontconfig
    --enable-libfreetype
    --enable-libvidstab
    --enable-libmp3lame
    --enable-libopus
    --enable-libtheora
    --enable-libvorbis
    --enable-libvpx
    --enable-libwebp
    --enable-libxcb
    --enable-libx265
    --enable-libxvid
    --enable-libx264
    --enable-nonfree
    --enable-openssl
    --enable-libfdk_aac
    --enable-postproc
    --enable-small
    --enable-version3
    --enable-libbluray
    --enable-libzmq
    --extra-libs=-ldl
    --prefix=/opt/ffmpeg
    --enable-libopenjpeg
    --enable-libkvazaar
    --enable-libaom
    --extra-libs=-lpthread
    --enable-libsrt
    --enable-libaribb24
    --enable-vaapi
    --extra-cflags=-I/opt/ffmpeg/include
    --extra-ldflags=-L/opt/ffmpeg/lib

Capture output from the container to the host running the command

 docker run jrottenberg/ffmpeg:4.4-alpine \
            -i http://url/to/media.mp4 \
            -stats \
            $ffmpeg_options  - > out.mp4

Examples

Extract 5s @00:49:42 into a GIF

 docker run jrottenberg/ffmpeg:4.4-alpine -stats  \
        -i http://archive.org/download/thethreeagesbusterkeaton/Buster.Keaton.The.Three.Ages.ogv \
        -loop 0  \
        -final_delay 500 -c:v gif -f gif -ss 00:49:42 -t 5 - > trow_ball.gif

Convert 10bits MKV into a 10Bits MP4

 docker run -v $(pwd):$(pwd) -w $(pwd) jrottenberg/ffmpeg:4.4-scratch \
        -stats \
        -i http://www.jell.yfish.us/media/jellyfish-20-mbps-hd-hevc-10bit.mkv \
        -c:v libx265 -pix_fmt yuv420p10 \
        -t 5 -f mp4 test.mp4

The image has been compiled with X265 Multilib. Use the pixel format switch to change the number of bits per pixel by suffixing it with 10 for 10bits or 12 for 12bits.

Convert a local GIF into a mp4

Let's assume original.gif is located in the current directory :

 docker run -v $(pwd):$(pwd) -w $(pwd)\
        jrottenberg/ffmpeg:4.4-scratch -stats \
        -i original.gif \
        original-converted.mp4

Use ZeroMQ to toggle filter value on-fly

Let's start some process continuously writing some radio music, and listen it:

docker run --rm -d -v $(pwd):$(pwd) -w $(pwd) -p 11235:11235 \
        --name radio-writer jrottenberg/ffmpeg:4.4-alpine \
        -i http://radio.casse-tete.solutions/salut-radio-64.mp3 \
        -filter_complex '[0:a]volume@vol=1,azmq=bind_address=tcp\\\://0.0.0.0\\\:11235[out]' \
        -map '[out]' ./salut-radio.mp3

docker run -it -v $(pwd):$(pwd) -w $(pwd) --entrypoint=ffprobe jrottenberg/ffmpeg:4.4-alpine -v quiet  -show_streams salut-radio.mp3

Now, just toggle its volume on-fly, and hear how it changes:

docker run --rm --network=host --entrypoint sh jrottenberg/ffmpeg:4.4-ubuntu -c \
        'echo "volume@vol volume 2" | zmqsend -b tcp://127.0.0.1:11235'

Send a stream over SRT

Let's send video.mp4 to srt-listener on port 9000 over SRT protocol.

docker run -v $(pwd):$(pwd) jrottenberg/ffmpeg:4.4-centos \
       -re -i $(pwd)/video.mp4 -acodec copy -vcodec copy -f mpegts srt://srt-listener:9000?pkt_size=1316

Use hardware acceleration enabled build

Thanks to qmfrederik for the vaapi ubuntu based variant

jrottenberg/ffmpeg:vaapi or jrottenberg/ffmpeg:${VERSION}-vaapi

  • Run the container with the device attached /dev/dri from your host into the container :

docker run --device /dev/dri:/dev/dri -v $(pwd):$(pwd) -w $(pwd) jrottenberg/ffmpeg:4.4-vaapi [...]

  • Have the Intel drivers up and running on your host. You can run vainfo (part of vainfo package on Ubuntu) to determine whether your graphics card has been recognized correctly.
  • Run ffmpeg with the correct parameters, this is the same as when running ffmpeg natively.

Use nvidia hardware acceleration enabled build

Thanks to ShaulMyplay for the nvidia based variant

Supports nvenc only on all ffmpeg versions, and hardware decoding and scaling on ffmpeg >= 4.0

Hardware encoding only example:

docker run --runtime=nvidia jrottenberg/ffmpeg:4.4-nvidia -i INPUT -c:v nvenc_h264 -preset hq OUTPUT Full hardware acceleration example: docker run --runtime=nvidia jrottenberg/ffmpeg:4.4-nvidia -hwaccel cuvid -c:v h264_cuvid -i INPUT -vf scale_npp=-1:720 -c:v h264_nvenc -preset slow OUTPUT

See what's inside the beast
docker run -it --entrypoint='bash' jrottenberg/ffmpeg:4.4-ubuntu

for i in ogg amr vorbis theora mp3lame opus vpx xvid fdk x264 x265;do echo $i; find /usr/local/ -name *$i*;done

Keep up to date

See Dockerfile-env to update a version

Contribute

See the contributing guide

Legal

Those docker images use code of FFmpeg licensed under the LGPLv2.1 and their source can be downloaded on github.com/jrottenberg/ffmpeg.

ffmpeg's People

Contributors

arpagon avatar arpu avatar arputcu avatar eikowagenknecht avatar floriandejonckheere avatar gnaphrong avatar hvindin avatar ic avatar ilovepie avatar jaketame avatar jalle19 avatar jidckii avatar jrottenberg avatar msuksong avatar mys721tx avatar pdiaz avatar phil-mitchell avatar plainbanana avatar qmfrederik avatar ramannanda avatar rottj006 avatar rubenrua avatar scribblemaniac avatar shaulfl avatar stephentuso avatar tedder avatar tuomas2 avatar tyranron avatar vitalis avatar zmwangx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ffmpeg's Issues

ffplay is missing

I'm not sure is it intended to be like that or it's disabled by some non-obvious option?

-vf subtitles doesn't work (because no fonts are installed)

b892353 introduced support for libass, but there is no /usr/share/fonts dir at all so the feature just doesn't work.

jrottenberg/ffmpeg:3.3-alpine image:

/ $ ls -l /usr/share/
total 12
drwxr-xr-x    3 root     root          4096 Jul 30 18:23 ca-certificates
drwxr-xr-x    2 root     root          4096 Jun 25 17:52 man
drwxr-xr-x    2 root     root          4096 Jun 25 17:52 misc
/ $

Adding ttf-liberation package to the image makes it possible to render subs into video.

Multi-stage docker builds

Would it be possible to create a set of images where FFmpeg is not dynamically linked to its shared libraries? My reasoning is that then you could use docker's multi-stage build process to simply copy the FFmpeg / FFprobe binaries out of this container and into any other container. E.g:

FROM jrottenberg/ffmpeg AS ffmpeg

FROM python

# Copy in FFmpeg and FFprobe
COPY --from=ffmpeg /usr/local/bin/ffmpeg /usr/local/bin/

Currently doing this means calls to FFmpeg give the message

ffmpeg: error while loading shared libraries: libavdevice.so.57: cannot open shared object file: No such file or directory

It would be a nice alternative to changing the FROM as suggested #90 .

I'm sure this is much more complicated than I am imagining!

How to use custom font?

I have tried -v "/mnt/user/media/fonts/":"/usr/share/fonts" but I have

Fontconfig error: Cannot load default config file
[Parsed_ass_0 @ 0x82fb60] No usable fontconfig configuration file found, using fallback.
Fontconfig error: Cannot load default config file

Container will not stay running: ffmpeg exits with code 0

I must be missing something - but I cannot seam to get this container to run.

No matter how I try to initiate it with docker it just exits with code 0

Tried :
docker run jrottenberg/ffmpeg
and - docker run --name ffmpeg -d jrottenberg/ffmpeg
and docker-compose.yml with:
ffmpeg:
image: jrottenberg/ffmpeg

Even tried centos and alpine versions.
Here is a screen cap showing the exit code after running docker-compose up and how it continually restarting when using restart: always in my docker-compose.yml
ffmpeg-exits-with-code-0

Currently ffmpeg is the only thing in this compose file!

Is this not meant to keep running in the background like it would be if ffmpeg was installed directly to a server outside of docker?

I have docker running on a GCP compute instance running Centos 7 and out of all the active containers this is the only one I can't seam to get working. The VM should have more than enough resources dedicated to it to make it work fine - n1-highmem-4 (4 vCPUs, 26 GB memory) and plenty of hard drive space

Any assistance here would be greatly appreciated!

Thank You..

add --enable-libass

Thank you for excelent image for ffmpeg.

I want to use -vf ass option to burn ass subtitle.
Please add --enable-libass when exec coufigure command.

best regard.

Pipe output to stdout

How can I pipe the generated image from this command to stdout?

-i https://s3-eu-west-1.amazonaws.com/.../original.mp4 -c:a copy -f mjpeg -preset ultrafast -an -c:v mjpeg -vf \"select='not(mod(n\\,29))',yadif,scale=480:-1,crop=iw:270,tile=1x50\" -q:v 20 -vframes 1

Getting 'Connection Reset By Peer' errors when using the image on ec2

While streaming to an FB rtmp for FB live my stream gets randomly interrupted after a while with a connection reset by peer.

Probably not the image's fault but a network issue and just was curious to see that no-one reported the issue. There might be a workaround possible with the image I am not sure yet.

is ffprobe included?

I need to use ffprobe to get the total frames before I use ffmpeg. Is this command available through you image?

Label docker images of latest version with only the flavor name

For example, I'm trying to reduce downloaded size, so I'll always want the alpine based image. Currently, to download the latest alpine based image, I have to pull jrottenberg/ffmpeg:3.4-alpine. I'll have to keep track of new releases and update the image tag. I'd much prefer being able to pull jrottenberg/ffmpeg:latest-alpine or just jrottenberg/ffmpeg:alpine to be always working with the latest alpine based image.

Copy /usr/local/include headers

It would be really handy if, when compiling ffmpeg, its (development) headers could be copied.

This would allow the easier compilation of applications that link against ffmpeg.

Synology Theroa compilation pb

Hello
I am trying to compile your Dockerfile on my Synology but Im'getting this error:
checking pkg-config is at least version 0.9.0... yes
checking for OGG... no
checking for Ogg... no
*** Could not run Ogg test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means Ogg was incorrectly installed
*** or that you have moved Ogg since it was installed.
configure: error:
libogg is required to build this package!
please see http://www.xiph.org/ for how to
obtain a copy.

The command '/bin/sh -c DIR=/tmp/theora && mkdir -p ${DIR} && cd ${DIR} && curl -sLO http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.gz && tar -zx --strip-components=1 -f libtheora-${THEORA_VERSION}.tar.gz && ./configure --prefix="${PREFIX}" --with-ogg="${PREFIX}" --enable-shared && make && make install && rm -rf ${DIR}' returned a non-zero code: 1

Do you know why?

optimise speed instead of size?

I don't know what difference this makes in practice, but please consider building this image for speed instead of size?

--enable-small optimize for size instead of speed

Thanks!

newtek ndi support

any chance to include ndi support for future releases? it's getting attention now it's out and it's very useful for live transcoding and related tasks.

Trouble starting container using Docker remote API

I'm trying to start this container using Docker remote API but the stream seems to be invalid. I think that this has nothing to do with this Docker image but I'm reaching here :)

I'm trying to stream to input using -i pipe:0 and then stream the output via pipe:1 but this is what ffmpeg tells me in the logs:

ffmpeg version 3.3.2 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.3.0 (Alpine 5.3.0)
  configuration: --bindir=/usr/local/bin --disable-debug --disable-doc --disable-ffplay --disable-static --enable-avresample --enable-gpl --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfdk_aac --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-nonfree --enable-openssl --enable-postproc --enable-shared --enable-small --enable-version3 --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --extra-libs=-ldl --prefix=/usr/local
  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libavresample   3.  5.  0 /  3.  5.  0
  libswscale      4.  6.100 /  4.  6.100
  libswresample   2.  7.100 /  2.  7.100
  libpostproc    54.  5.100 / 54.  5.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55dd87f5cce0] stream 0, offset 0x30: partial file
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55dd87f5cce0] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 1280x720, 3986 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55dd87f5cce0] Could not find codec parameters for stream 1 (Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, 2 channels, s16p, 128 kb/s): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pipe:0':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.12.102
  Duration: 00:00:01.19, bitrate: N/A
    Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), none, 1280x720, 3986 kb/s, 23.98 fps, 23.98 tbr, 11988 tbn, 23976 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, s16p, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55dd87f5cce0] stream 0, offset 0x30: partial file
pipe:0: Invalid data found when processing input
Finishing stream 0:0 without any data written to it.
Nothing was written into output file 0 (pipe:), because at least one of its streams received no packets.
frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)

Do you have any idea whats going on here? If not, any idea how I can see the complete command used for starting, log the input stream or something?

Cheers

ffmpeg hangs to convert audio hls to aac

In 3.3 Ubuntu image.

I have a m3u8 playlist with corresponding .ts files that have been recorded with ffmpeg on my Mac.
The codec is aac.

In the docker image, when I try to mux the m3u8 and .ts into a standalone .aac, ffmpeg is stuck on the first segment:

ffmpeg -i index.m3u8 test.aac

[hls,applehttp @ 0x1bdfec0] Opening 'index0.ts' for reading <- never process.

ubuntu ffmpeg will not build

I try to build and it fails at step 20. I am on ubuntu 16.04.

`Step 20/45 : RUN DIR=/tmp/opencore-amr && mkdir -p ${DIR} && cd ${DIR} && curl -sL https://10gbps-io.dl.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-${OPENCOREAMR_VERSION}.tar.gz | tar -zx --strip-components=1 && ./configure --prefix="${PREFIX}" --enable-shared && make && make install && rm -rf ${DIR}
---> Running in 67c287050b6d

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
`

using ffmpeg with fenics

First, thank you very much for putting this together and sharing it.

Second, I have a question on how I can use your library with another library, FEniCS:

https://fenics.readthedocs.io/projects/containers/en/latest/jupyter.html

The above link shows how to start jupyter notebooks and I am learning to embed movies but this needs ffmpeg. When I try running my code it doesn't work because it can't find ffmpeg. Is there a way to get my fenics docker to use my ffmpeg docker?

docker logs -tf xxx does not show ffmpeg status

docker logs -tf xxx does not show ffmpeg status
if docker runs in daemon mode
like
frame= 450 fps= 73 q=-1.0 Lsize= 6562kB time=00:00:17.91 bitrate=3000.1kbits/s speed=2.91x
any idea how this can be fixed?

"3.1-ubuntu" tag doesn't exist

Something is wrong with tags description

$ docker pull jrottenberg/ffmpeg:3.1-ubuntu
Pulling repository docker.io/jrottenberg/ffmpeg
Tag 3.1-ubuntu not found in repository docker.io/jrottenberg/ffmpeg

Shared library (libgomp.so) missing/error on run

ffmpeg: error while loading shared libraries: libgomp.so.1: cannot open shared object file: No such file or directory

With either 3.2 or 3.3.

Executing : bash -c docker run -v=/Users/rriel/projects/poka/in-house-transcoding/__temp/:/tmp/ffmpeg jrottenberg/ffmpeg:3.2 -i /tmp/ffmpeg/tmpp8t70ih3/input -c:a libfdk_aac -b:a 64k -ac 2 -vf "scale=w=trunc((iw*min(1\,min(min(200\,iw)/iw\,min(200\,ih)/ih)))/2)*2:-2" -c:v libx264 -x264-params keyint=90 -b:v 136k -refs 1 -preset slow -profile:v baseline -pix_fmt yuv420p -level 3.0 -hls_init_time 10 -hls_time 10 -hls_list_size 0 -hls_segment_filename "/tmp/ffmpeg/tmpp8t70ih3/output/out_200K%05d.ts" /tmp/ffmpeg/tmpp8t70ih3/output/out_200K.m3u8

Return code : 127

Output: 
3.2: Pulling from jrottenberg/ffmpeg
d5c6f90da05d: Already exists
bbbe761fcb56: Already exists
7afa5ede606f: Already exists
f6b7253b56f4: Already exists
2b8db33536d4: Already exists
6f5ab11f8bba: Pulling fs layer
9043ea512e45: Pulling fs layer
9043ea512e45: Verifying Checksum
9043ea512e45: Download complete
6f5ab11f8bba: Verifying Checksum
6f5ab11f8bba: Download complete
6f5ab11f8bba: Pull complete
9043ea512e45: Pull complete
Digest: sha256:eb5378b1ae2064fd51f2644f8258b065128e551f9107f53ff6c5b1fe91941754
Status: Downloaded newer image for jrottenberg/ffmpeg:3.2
ffmpeg: error while loading shared libraries: libgomp.so.1: cannot open shared object file: No such file or directory

Is there possible to add ffprobe in this image?

Tool ffprobe is important in ffmpeg which probe media file information and is useful. I found that ffprobe wasn't in current docker image. I'm wondering that whether it can be added in? Thanks.

arm support

has anyone attempted to get this to build on ARM64? I don't want to spend hours just find out something is blocking.

Suggest to use "apk add --no-cache" in alpine

It might not actually make a difference in your setup, as you are clearing caches in your last line anyways, but there is the apk add --no-cache switch, which you could use to prevent caches from being created in the first place.

Great work!
My best regards,
Markus

Does'n work converting on MP4 container

Have a command like:

docker run jrottenberg/ffmpeg -stats -i http://url/file.mp4 -b 640k -c:v libx264 -profile:v high -preset medium -f mp4 - > /tmp/out.mp4

On output i have:

Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
[libx264 @ 0x2ef8b20] final ratefactor: 24.75
[aac @ 0x2e65f80] Qavg: -nan

You have not encountered a similar problem for the mp4 container?
i found http://superuser.com/questions/760056/receiving-ffmpeg-error-22-when-piping-data-to-stdout

ffprobe -show_streams "profile" field output is numeric instead of string

Current behaviour:

# docker run -it --entrypoint=/bin/sh jrottenberg/ffmpeg:3.4
# ffprobe -v error -show_streams test.mp4 | grep profile
profile=1
profile=578

Expected behaviour: (ffmpeg 3.4 installed on alpine, macOS, and Ubuntu)

# ffprobe -show_streams -v error test.mp4 | grep profile
profile=LC
profile=Constrained Baseline

Build with static linking

As this container is only meant to run ffmpeg and its other programs, I believe shared libs do not really make a lot of sense here. I would like to suggest to build the binaries statically.

As Docker now allows for multistage builds, this would come in very handy, if one would like to use the result of your great build in another container. This can now be done as follows:

FROM jrottenberg/ffmpeg:3.3-alpine as ffmpeg

FROM node:alpine
COPY --from=ffmpeg /usr/local/bin/ff* /usr/local/bin/

Since ff* binaries are not compiled with static linking however, this becomes a lot more complicated.

jrottenberg/ffmpeg:4.0-alpine does not output to stdout

I use this command with jrottenberg/ffmpeg:3.3-alpine which works fine but using the 4.0 release does not produce any output?

docker run jrottenberg/ffmpeg:4.0-alpine -stats -i http://techslides.com/demos/sample-videos/small.mp4 -f mjpeg -vf select='not(mod(n\,3))',yadif,scale=480:-1,crop=iw:270,tile=1x50 -q:v 5 -vframes 1 - > scrub.jpg

How to create .ogg video file?

This works:

sd run -it -rm -v $(pwd):/v jrottenberg/ffmpeg -i /v/video.mp4 -movflags faststart /v/video.webm

This does not work:

sd run -it -rm -v $(pwd):/v jrottenberg/ffmpeg -i /v/video.mp4 -movflags faststart /v/video.ogg

Error:

Encoder (codec theora) not found for output stream #0:0

How do I encode to OGG Theora?

How to implement into a different docker image?

Hello. I am running a Homebridge Docker image and I need for it to be able to use ffmpeg. So inside the other dockerfile can I copy and paste the run code? I am fairly new to Docker , will having it install and compile for Ubuntu work in every use case scenario without having to worry about the host os that has Docker installed on it? Or is there someway for docker to pick up the host os and install the correct version of ffmpeg? Or is there some way to pull the package that is already built since this takes a long time to build?

gpg: keyserver timed out

gpg: requesting key D67658D8 from hkp server ha.pool.sks-keyservers.net
gpg: keyserver timed out

He tried to use the version 3.3 Dockerfile and I get this error, tried a change ha.pool.sks-keyservers.net by pool.sks-keyservers.net and it works correctly

2.7 tag no longer available on docker hub

My company uses docker for developer VMs, and one of these extends FROM jrottenberg/ffmpeg:2.7. Today I noticed that the 2.7 tag is no longer available on docker hub. Do you know why that is? Was it removed by you, or does docker hub have an automatic expiration on old tags?

Thanks!

Run command from stdin (pipe:0) fails with invalid data exception

I'm trying to get the number of frames using this command below bu it generates an invalid data exception when processing the input.

ffprobe version 3.3.2 Copyright (c) 2007-2017 the FFmpeg developers
  built with gcc 5.3.0 (Alpine 5.3.0)
  configuration: --bindir=/usr/local/bin --disable-debug --disable-doc --disable-ffplay --disable-static --enable-avresample --enable-gpl --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfdk_aac --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-nonfree --enable-openssl --enable-postproc --enable-shared --enable-small --enable-version3 --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --extra-libs=-ldl --prefix=/usr/local
  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libavresample   3.  5.  0 /  3.  5.  0
  libswscale      4.  6.100 /  4.  6.100
  libswresample   2.  7.100 /  2.  7.100
  libpostproc    54.  5.100 / 54.  5.100
{
pipe:0: Invalid data found when processing input

}

This is the command I'm using

cat big_buck_bunny.mp4 | docker run --entrypoint ffprobe jrottenberg/ffmpeg:3.3-alpine -i pipe:0 -print_format json -select_streams v:0 -show_entries stream=nb_frames

I have also tried using ffmpeg from the container but that doesn't work either.

cat big_buck_bunny.mp4 | docker run jrottenberg/ffmpeg:3.3-alpine -i pipe:0

Produces

ffmpeg version 3.3.2 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.3.0 (Alpine 5.3.0)
  configuration: --bindir=/usr/local/bin --disable-debug --disable-doc --disable-ffplay --disable-static --enable-avresample --enable-gpl --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfdk_aac --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-nonfree --enable-openssl --enable-postproc --enable-shared --enable-small --enable-version3 --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --extra-libs=-ldl --prefix=/usr/local
  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libavresample   3.  5.  0 /  3.  5.  0
  libswscale      4.  6.100 /  4.  6.100
  libswresample   2.  7.100 /  2.  7.100
  libpostproc    54.  5.100 / 54.  5.100
pipe:0: Invalid data found when processing input

Saving output into AWS S3

Hello, is it possible to provide simple example of saving transcoding output into AWS S3 Bucket?
It would be superusefull. Thank you! :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.