FFMPEG failing in AWS Lambda

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

FFMPEG failing in AWS Lambda

Zaid Amir
Hi,

 

Static builds of FFMPEG are failing in AWS lambda. I am trying to create a
transcoding function for short videos. The function is hosted on AWS Lambda.
The problem is that AWS lambda seems to be missing something that FFMPEG
requires, at least according to Amazon.

 

I contacted Amazon earlier and this is their response to the issue:

 

"We found that the FFMPEG operations require at least libx264 and an acc
library, both of which will have dependencies of their own. To troubleshoot
the issue it will involve diving deeper into the full dependency chain. We
can see that it works in the Amazon Linux environment however, the
environment is similar but not identical to the lambda environment. There
can be some dependencies that exist in Amazon Linux but not in lambda
environment as Lambda runs on the container. Here, as FFmpeg is a third
party software, diving deeper into the dependency chain and verifying the
version compatibilities is very hard to do. Unfortunately going further,
this is bound to go into architecture and code support which is out of AWS
Support scope [1]. I hope you understand our limitations.

However should FFmpeg support have any questions specific to the Lambda
platform, please do let us know and we will be happy to assist. We will be
in better position to investigate further once you receive an update from
the FFmpeg support suggesting an issue from Lambda end."

 

I then went and built a dynamic ffmpeg version making sure to package all
libraries, checked ddl on each one, then made a small lambda function that
looped over all binaries and ddl each one of them, compared that to the
output I got from Amazon Linux and the same dependencies exists on both
lambda and AWS Linux yet ffmpeg still fails on lambda.

 

 

You can find a detailed log file here:
https://www.datafilehost.com/d/6e5e21bb

 

This log is generated when trying to perform an HLS transcoding on this
file: https://www.datafilehost.com/d/999a4492

 

Note that the issue is not related to that file alone nor is it related to
HLS, its general and happen on all videos and any ffmpeg command that tries
to seek the stream, even tried extracting a single frame from a video using
the simplest form possible  for example: 'ffmpeg -ss 00:00:02 -I file.mp4
-vframes 1 -y output.jpg' also fails with the same errors in the attached
log file.

 

Not sure how to debug this further. Tried enabling debug logs with
'-loglevel debug' but did not give me any extra info. Any help or
suggestions

 

Regards

 




Zaid Amir

 


R&D Manager


T:  <tel:+96265517040> +962 6 551 7040


E:  <mailto:[hidden email]> [hidden email]

 

                       
                       
                       
                       

 

                       

 <https://www.facebook.com/ZoolzCloud>    <https://twitter.com/zoolzcloud>
<https://www.linkedin.com/company/zoolz>

W:  <https://free-email-signature.exclaimer.com/bigmind.zoolz.com>
bigmind.zoolz.com


The company accepts no liability for the content of this email, or for the
consequences of any actions taken on the basis of the information provided,
unless that information is subsequently confirmed in writing. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
information is strictly prohibited.

 

 


_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".

image001.png (5K) Download Attachment
image002.jpg (1K) Download Attachment
image003.jpg (1K) Download Attachment
image004.jpg (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: FFMPEG failing in AWS Lambda

Carl Eugen Hoyos-2
2018-09-02 7:49 GMT+02:00, Zaid Amir <[hidden email]>:

> Static builds of FFMPEG are failing in AWS lambda.

This sounds very unlikely.

Please at least provide the console output your binary
produces on your build system and also "ldd ffmpeg"
output.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: FFMPEG failing in AWS Lambda

Zaid Amir
Well its very likely I'm afraid.

Below is the output when converting a single frame to jpg on my build environment, this fails when run in Lambda.

ffmpeg version N-91639-g85c0064 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-28)
  configuration: --prefix=/home/ec2-user/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/ec2-user/ffmpeg_build/include --extra-ldflags=-L/home/ec2-user/ffmpeg_build/lib --extra-libs=-lpthread --extra-libs=-lm --bindir=/home/ec2-user/bin --enable-gpl --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
  libavutil      56. 19.100 / 56. 19.100
  libavcodec     58. 23.100 / 58. 23.100
  libavformat    58. 17.103 / 58. 17.103
  libavdevice    58.  4.101 / 58.  4.101
  libavfilter     7. 26.100 /  7. 26.100
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc    55.  2.100 / 55.  2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/ec2-user/f1.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.83.100
  Duration: 00:05:08.28, start: 0.000000, bitrate: 2693 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 2555 kb/s, 50 fps, 50 tbr, 12800 tbn, 100 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x361c080] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to 'output.jpg':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.17.103
    Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 50 fps, 50 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc58.23.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=    1 fps=0.0 q=6.7 Lsize=N/A time=00:00:00.02 bitrate=N/A speed=0.0578x
video:52kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown



The ldd output is, of course this is only valid for the dynamically linked version which also fails on lambda even though the same binaries are available inside the lambda package and the ldd output is similar to the below:

        linux-vdso.so.1 =>  (0x00007fffe2dde000)
        libm.so.6 => /lib64/libm.so.6 (0x00007ff6d47e1000)
        libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007ff6d4545000)
        libz.so.1 => /lib64/libz.so.1 (0x00007ff6d432f000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff6d4113000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007ff6d3f0f000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007ff6d3b8a000)
        librt.so.1 => /lib64/librt.so.1 (0x00007ff6d3982000)
        libc.so.6 => /lib64/libc.so.6 (0x00007ff6d35b5000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ff6d4ae3000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007ff6d339f000)



Zaid Amir


R&D Manager


T: +962 6 551 7040


E: [hidden email]

















   
W: bigmind.zoolz.com
The company accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.


-----Original Message-----
From: ffmpeg-user <[hidden email]> On Behalf Of Carl Eugen Hoyos
Sent: Tuesday, September 4, 2018 1:41 AM
To: FFmpeg user questions <[hidden email]>
Subject: Re: [FFmpeg-user] FFMPEG failing in AWS Lambda

2018-09-02 7:49 GMT+02:00, Zaid Amir <[hidden email]>:

> Static builds of FFMPEG are failing in AWS lambda.

This sounds very unlikely.

Please at least provide the console output your binary produces on your build system and also "ldd ffmpeg"
output.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email [hidden email] with subject "unsubscribe".

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: FFMPEG failing in AWS Lambda

Carl Eugen Hoyos-2
2018-09-10 10:19 GMT+02:00, Zaid Amir <[hidden email]>:

> Well its very likely I'm afraid.
>
> Below is the output when converting a single frame to jpg on my build
> environment, this fails when run in Lambda.
>
> ffmpeg version N-91639-g85c0064 Copyright (c) 2000-2018 the FFmpeg
> developers
>   built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-28)
>   configuration: --prefix=/home/ec2-user/ffmpeg_build
> --pkg-config-flags=--static
> --extra-cflags=-I/home/ec2-user/ffmpeg_build/include
> --extra-ldflags=-L/home/ec2-user/ffmpeg_build/lib --extra-libs=-lpthread
> --extra-libs=-lm --bindir=/home/ec2-user/bin --enable-gpl
> --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame
> --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264
> --enable-libx265 --enable-nonfree

(The extra-libs look strange and would indicate a bug but cannot hurt.)

>   libavutil      56. 19.100 / 56. 19.100
>   libavcodec     58. 23.100 / 58. 23.100
>   libavformat    58. 17.103 / 58. 17.103
>   libavdevice    58.  4.101 / 58.  4.101
>   libavfilter     7. 26.100 /  7. 26.100
>   libswscale      5.  2.100 /  5.  2.100
>   libswresample   3.  2.100 /  3.  2.100
>   libpostproc    55.  2.100 / 55.  2.100
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/ec2-user/f1.mp4':
>   Metadata:
>     major_brand     : isom
>     minor_version   : 512
>     compatible_brands: isomiso2avc1mp41
>     encoder         : Lavf57.83.100
>   Duration: 00:05:08.28, start: 0.000000, bitrate: 2693 kb/s
>     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
> 1280x720 [SAR 1:1 DAR 16:9], 2555 kb/s, 50 fps, 50 tbr, 12800 tbn, 100 tbc
> (default)
>     Metadata:
>       handler_name    : VideoHandler
>     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo,
> fltp, 128 kb/s (default)
>     Metadata:
>       handler_name    : SoundHandler
> Stream mapping:
>   Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
> Press [q] to stop, [?] for help
> [swscaler @ 0x361c080] deprecated pixel format used, make sure you did set
> range correctly
> Output #0, image2, to 'output.jpg':
>   Metadata:
>     major_brand     : isom
>     minor_version   : 512
>     compatible_brands: isomiso2avc1mp41
>     encoder         : Lavf58.17.103
>     Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 1280x720 [SAR 1:1 DAR
> 16:9], q=2-31, 200 kb/s, 50 fps, 50 tbn, 50 tbc (default)
>     Metadata:
>       handler_name    : VideoHandler
>       encoder         : Lavc58.23.100 mjpeg
>     Side data:
>       cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
> frame=    1 fps=0.0 q=6.7 Lsize=N/A time=00:00:00.02 bitrate=N/A
> speed=0.0578x
> video:52kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
> muxing overhead: unknown
>
> The ldd output is, of course this is only valid for the dynamically linked
> version which also fails on lambda even though the same binaries are
> available inside the lambda package and the ldd output is similar to the
> below:
>
>         linux-vdso.so.1 =>  (0x00007fffe2dde000)
>         libm.so.6 => /lib64/libm.so.6 (0x00007ff6d47e1000)
>         libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007ff6d4545000)
>         libz.so.1 => /lib64/libz.so.1 (0x00007ff6d432f000)
>         libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff6d4113000)
>         libdl.so.2 => /lib64/libdl.so.2 (0x00007ff6d3f0f000)
>         libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007ff6d3b8a000)
>         librt.so.1 => /lib64/librt.so.1 (0x00007ff6d3982000)
>         libc.so.6 => /lib64/libc.so.6 (0x00007ff6d35b5000)
>         /lib64/ld-linux-x86-64.so.2 (0x00007ff6d4ae3000)
>         libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007ff6d339f000)

So you are not testing a "static binary" as you originally claimed
but a dynamic binary.

I start to suspect you do not want to report a portability issue
("my binary does not start because a library is missing") but
a usage issue, am I right? The reason this was unclear was
that you posted an emails explaining such a problem in your
first message.

Please test something like:
$ ffmpeg -f lavfi -i testsrc2 -vframes 10 out%2d.jpg

Then find out if you are really are reading the same file as
on your build machine.

Please learn what top-posting means and avoid it here.
And please remove your email footer.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: FFMPEG failing in AWS Lambda

Zaid Amir
As I explained I tried both static and dynamic.. of course ldd does not work on static binaries.




Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: ffmpeg-user <[hidden email]> on behalf of Carl Eugen Hoyos <[hidden email]>
Sent: Tuesday, September 11, 2018 12:25:22 AM
To: FFmpeg user questions
Subject: Re: [FFmpeg-user] FFMPEG failing in AWS Lambda

2018-09-10 10:19 GMT+02:00, Zaid Amir <[hidden email]>:

> Well its very likely I'm afraid.
>
> Below is the output when converting a single frame to jpg on my build
> environment, this fails when run in Lambda.
>
> ffmpeg version N-91639-g85c0064 Copyright (c) 2000-2018 the FFmpeg
> developers
>   built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-28)
>   configuration: --prefix=/home/ec2-user/ffmpeg_build
> --pkg-config-flags=--static
> --extra-cflags=-I/home/ec2-user/ffmpeg_build/include
> --extra-ldflags=-L/home/ec2-user/ffmpeg_build/lib --extra-libs=-lpthread
> --extra-libs=-lm --bindir=/home/ec2-user/bin --enable-gpl
> --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame
> --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264
> --enable-libx265 --enable-nonfree

(The extra-libs look strange and would indicate a bug but cannot hurt.)

>   libavutil      56. 19.100 / 56. 19.100
>   libavcodec     58. 23.100 / 58. 23.100
>   libavformat    58. 17.103 / 58. 17.103
>   libavdevice    58.  4.101 / 58.  4.101
>   libavfilter     7. 26.100 /  7. 26.100
>   libswscale      5.  2.100 /  5.  2.100
>   libswresample   3.  2.100 /  3.  2.100
>   libpostproc    55.  2.100 / 55.  2.100
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/ec2-user/f1.mp4':
>   Metadata:
>     major_brand     : isom
>     minor_version   : 512
>     compatible_brands: isomiso2avc1mp41
>     encoder         : Lavf57.83.100
>   Duration: 00:05:08.28, start: 0.000000, bitrate: 2693 kb/s
>     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
> 1280x720 [SAR 1:1 DAR 16:9], 2555 kb/s, 50 fps, 50 tbr, 12800 tbn, 100 tbc
> (default)
>     Metadata:
>       handler_name    : VideoHandler
>     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo,
> fltp, 128 kb/s (default)
>     Metadata:
>       handler_name    : SoundHandler
> Stream mapping:
>   Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
> Press [q] to stop, [?] for help
> [swscaler @ 0x361c080] deprecated pixel format used, make sure you did set
> range correctly
> Output #0, image2, to 'output.jpg':
>   Metadata:
>     major_brand     : isom
>     minor_version   : 512
>     compatible_brands: isomiso2avc1mp41
>     encoder         : Lavf58.17.103
>     Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 1280x720 [SAR 1:1 DAR
> 16:9], q=2-31, 200 kb/s, 50 fps, 50 tbn, 50 tbc (default)
>     Metadata:
>       handler_name    : VideoHandler
>       encoder         : Lavc58.23.100 mjpeg
>     Side data:
>       cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
> frame=    1 fps=0.0 q=6.7 Lsize=N/A time=00:00:00.02 bitrate=N/A
> speed=0.0578x
> video:52kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
> muxing overhead: unknown
>
> The ldd output is, of course this is only valid for the dynamically linked
> version which also fails on lambda even though the same binaries are
> available inside the lambda package and the ldd output is similar to the
> below:
>
>         linux-vdso.so.1 =>  (0x00007fffe2dde000)
>         libm.so.6 => /lib64/libm.so.6 (0x00007ff6d47e1000)
>         libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007ff6d4545000)
>         libz.so.1 => /lib64/libz.so.1 (0x00007ff6d432f000)
>         libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff6d4113000)
>         libdl.so.2 => /lib64/libdl.so.2 (0x00007ff6d3f0f000)
>         libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007ff6d3b8a000)
>         librt.so.1 => /lib64/librt.so.1 (0x00007ff6d3982000)
>         libc.so.6 => /lib64/libc.so.6 (0x00007ff6d35b5000)
>         /lib64/ld-linux-x86-64.so.2 (0x00007ff6d4ae3000)
>         libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007ff6d339f000)

So you are not testing a "static binary" as you originally claimed
but a dynamic binary.

I start to suspect you do not want to report a portability issue
("my binary does not start because a library is missing") but
a usage issue, am I right? The reason this was unclear was
that you posted an emails explaining such a problem in your
first message.

Please test something like:
$ ffmpeg -f lavfi -i testsrc2 -vframes 10 out%2d.jpg

Then find out if you are really are reading the same file as
on your build machine.

Please learn what top-posting means and avoid it here.
And please remove your email footer.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: FFMPEG failing in AWS Lambda

Carl Eugen Hoyos-2
2018-09-11 16:17 GMT+02:00, Zaid Amir <[hidden email]>:
> As I explained I tried both static and dynamic.. of course ldd
> does not work on static binaries.

ldd works fine on static binaries, it tells you that they are static
binaries.
The point is that in your original mail, you gave the impression
that FFmpeg would not work (not start) because of a dependency
/ incompatibility issue, that is why I asked for ldd output (it is
very unusual that people know how to build a static binary on
Linux - this is non-trivial - but have to ask for compilation
support here). But as we know now, this is not the issue you
see.
I don't understand the issue you see (iirc, that the same input
file can be read on one system but not the other), but I
suggest you try different command lines (and input sources)
to narrow the issue down.

Stop top-posting here!

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: FFMPEG failing in AWS Lambda

Moritz Barsnick
In reply to this post by Zaid Amir
On Tue, Sep 11, 2018 at 14:17:37 +0000, Zaid Amir wrote:
> As I explained I tried both static and dynamic.. of course ldd does not work on static binaries.

Going one e-mail further back:
2018-09-10 10:19 GMT+02:00, Zaid Amir <[hidden email]>:
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/ec2-user/f1.mp4':

Did you use the *identical* input file in both environments (the
successfull and the failing env)?

Did you use the identical ffmpeg binary in both environments? E.g. the
ffmpeg-4.0.2-static johnvansickle.com build, or your N-91639-g85c0064
build.

If so:
I don't know if it's relevant for this behavior of the h264 decoder,
but can you try restricting the number of threads to one with
"-threads 1"?

I can't see why the decoder should throw
> [h264 @ 0x65c2fc0] concealing 2628 DC, 2628 AC, 2628 MV errors in P frame
on one platform, but not another, unless you have issues physically
reading the input file.

[CEH:]
> Please learn what top-posting means and avoid it here.
And this.

Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: FFMPEG failing in AWS Lambda

Zaid Amir
In reply to this post by Carl Eugen Hoyos-2
Yes I am testing on the same file both on the EC2 instance and lambda function.

Running ' ffmpeg -f lavfi -i testsrc2 -vframes 10 out%2d.jpg' gives this output:

ffmpeg version N-91639-g85c0064 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-28)
configuration: --prefix=/home/ec2-user/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/ec2-user/ffmpeg_build/include --extra-ldflags=-L/home/ec2-user/ffmpeg_build/lib --extra-libs=-lpthread --extra-libs=-lm --bindir=/home/ec2-user/bin --enable-gpl --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
libavutil 56. 19.100 / 56. 19.100
libavcodec 58. 23.100 / 58. 23.100
libavformat 58. 17.103 / 58. 17.103
libavdevice 58. 4.101 / 58. 4.101
libavfilter 7. 26.100 / 7. 26.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100
Input #0, lavfi, from 'testsrc2':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x4387f80] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/tmp/download/trans/file.mp4%2d.jpg':
Metadata:
encoder : Lavf58.17.103
Stream #0:0: Video: mjpeg, yuvj420p(pc), 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
Metadata:
encoder : Lavc58.23.100 mjpeg
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame= 10 fps=0.0 q=16.9 Lsize=N/A time=00:00:00.40 bitrate=N/A speed=34.1x
video:89kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: FFMPEG failing in AWS Lambda

Zaid Amir
In reply to this post by Moritz Barsnick
> Did you use the *identical* input file in both environments (the successfull and the failing env)?

Yes I did, and tried multiple files all fails on lambda but succeed on the EC2 instance.

>Did you use the identical ffmpeg binary in both environments? E.g. the ffmpeg-4.0.2-static johnvansickle.com build, or your N-91639->g85c0064 build.

Yes, tried same static and dynamic binary on both EC2 and lambda

>If so:
>I don't know if it's relevant for this behavior of the h264 decoder, but can you try restricting the number of threads to one with "-threads >?1"?

Tried it, still give the same error.

>on one platform, but not another, unless you have issues physically reading the input file.
I don't think so, ffmpeg is still able to read the file metadata. Besides I other binaries, like ImageMagick, work fine.




_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: FFMPEG failing in AWS Lambda

Carl Eugen Hoyos-2
In reply to this post by Zaid Amir
2018-09-12 8:01 GMT+02:00, Zaid Amir <[hidden email]>:

> Running ' ffmpeg -f lavfi -i testsrc2 -vframes 10 out%2d.jpg'
> gives this output:

Do the jpg files look as expected?
What does not work?
(Is it file input that is not working?)

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: FFMPEG failing in AWS Lambda

Zaid Amir
> Do the jpg files look as expected?

The generated jpegs look identical. Color bars with some scattered pixels and a diagonal bar going through them

> What does not work?

If I provide a valid video, it fails with the errors shown in the logs from the original email.

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: FFMPEG failing in AWS Lambda

Carl Eugen Hoyos-2
2018-09-12 16:27 GMT+02:00, Zaid Amir <[hidden email]>:

>> What does not work?
>
> If I provide a valid video, it fails with the errors shown in
> the logs from the original email.

(And I assume the output is wrong, no?)

Every video file or only certain types?
Can you run "md5sum" on the target system?

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: FFMPEG failing in AWS Lambda

Zaid Amir
> Every video file or only certain types?
I am only interested in H264 encoded files which I have so far tried around 40 of them and they are all failing. Did not try other encodings though as they are of no interest to me.

>Can you run "md5sum" on the target system?
Lambda does no have md5sum installed, I went with python's hashlib md5 and it was similar for the same file on both the EC2 instance and Lambda so we can omit file corruption as the culprit.

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: FFMPEG failing in AWS Lambda

Carl Eugen Hoyos-2
2018-09-13 8:05 GMT+02:00, Zaid Amir <[hidden email]>:
>> Every video file or only certain types?
>
> I am only interested in H264 encoded

I don't know if the issue is the file reading or the demuxer,
feel free to test a few different file types like avi, asf, mov,
mpegts.

> files which I have so far tried around 40 of them and
> they are all failing. Did not try other encodings though
> as they are of no interest to me.
>
>>Can you run "md5sum" on the target system?
>
> Lambda does no have md5sum installed, I went with python's
> hashlib md5 and it was similar for the same file

It was similar? But not identical?

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: FFMPEG failing in AWS Lambda

Zaid Amir
> It was similar? But not identical?

It was the same exact checksum. They were identical, indistinguishable, interchangeable, like two peas in a pod

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".