FFMPEG“分段错误"被称为“分段错误".与网络流源 [英] FFMPEG "Segmentation fault" with network stream source

查看:61
本文介绍了FFMPEG“分段错误"被称为“分段错误".与网络流源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的发行版:4.2.2(静态)来自" https://johnvansickle.com/ffmpeg/"

I use release: 4.2.2 (static) from "https://johnvansickle.com/ffmpeg/"

最终代码将显示在"Amazon AWS lambda"上

Final code will be on "Amazon AWS lambda"

目标:使用网址流并添加watermak

Goal: use a url stream and add watermak

链接到视频: https://feoval.fr/519.mp4

链接到Watermak: https://feoval.fr/watermark.png

Link to Watermak: ​https://feoval.fr/watermark.png

./ffmpeg -i "https://feoval.fr/519.mp4" -i "./watermark.png" -filter_complex "overlay=W-w-10:H-h-10:format=rgb" -f "mp4" -movflags "frag_keyframe+empty_moov" -pix_fmt "yuv420p" test.mp4

返回细分错误"

我的计算机和AWS Lambda服务器上都存在相同的错误

I have the same error on my computer and on AWS Lambda server

./ffmpeg -i "https://feoval.fr/519.mp4" -f "mp4" -movflags "frag_keyframe+empty_moov" -pix_fmt "yuv420p" test.mp4

工作(但不行watermak)

work (but not watermak)

./ffmpeg -i "./519.mp4" -i "./watermark.png" -filter_complex "overlay=W-w-10:H-h-10:format=rgb" -f "mp4" -movflags "frag_keyframe+empty_moov" -pix_fmt "yuv420p" test.mp4

工作(但不支持流)

非常感谢您!

第一个返回分段错误"的情况的日志:

Logs for the first case who return "Segmentation fault":

...
Stream mapping:
Stream #0:0 (h264) -> overlay:main (graph 0)
Stream #1:0 (png) -> overlay:overlay (graph 0)
overlay (graph 0) -> Stream #0:0 (libx264)
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, ? for help
[libx264 @ 0x742e480] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x742e480] profile High, level 3.1, 4:2:0, 8-bit
[libx264 @ 0x742e480] 264 - core 159 r2991 1771b55 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - ​http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'test.mp4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: isommp41mp42
encoder : Lavf58.29.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 480x848, q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
Metadata:
encoder : Lavc58.54.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
creation_time : 2020-01-13T08:54:26.000000Z
handler_name : Core Media Audio
encoder : Lavc58.54.100 aac
Segmentation fault (core dumped)

推荐答案

与johnvansickle.com的内部版本打包在一起的 readme.txt 一样:

According to readme.txt that is packaged with the build from johnvansickle.com:

静态链接glibc的局限性在于DNS的丢失解析度.通过软件包管理器安装nscd可以修复这个.

A limitation of statically linking glibc is the loss of DNS resolution. Installing nscd through your package manager will fix this.

解决方案是安装并启动nscd服务.

替代解决方案:

  • 编译您自己的ffmpeg(在 ./configure 期间启用gnutls,openssl,libtls或mbedtls以支持HTTPS).
  • 在您的存储库中使用ffmpeg
  • 下载输入文件,然后在ffmpeg中使用它
  • 使用IP地址代替域名
  • Compile your own ffmpeg (during ./configure enable gnutls, openssl, libtls or mbedtls for HTTPS support).
  • Use ffmpeg from your repository
  • Download the input file before using it in ffmpeg
  • Use IP address instead of domain name

这篇关于FFMPEG“分段错误"被称为“分段错误".与网络流源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆