AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[h264](ubuntu)

Martin Hope
Rodrigo Martins de Oliveira
Asked: 2020-11-30 08:32:13 +0800 CST

VLC 仅播放 H.264 和 VP8 视频的音频,尽管所有必要的编解码器都已正确安装

  • 0

使用 H.264 或 VP8 编解码器(可能还有其他编解码器)编码的视频,无论容器(MKV、MP4、WEBM 等)如何,都只会在 VLC 中播放音频,至少在 Ubuntu 20.04 中是这样。有趣的是,GNOME Video 应用程序可以很好地播放这些文件。

我试过重启电脑,让 VLC 单独运行,没有任何其他用户程序同时运行以避免干扰。我已经安装并重新安装了vlc, ubuntu-restricted-extras, ffmpeg, libdvdnav,libdvdread7和gstreamer1.0-libav其他各种软件包,清除gstreamer了缓存并且没有任何改变。我曾尝试强制 VLC 视频解复用,H264 video demuxer但出现以下错误VLC could not decode the format "h264" (H264 - MPEG-4 AVC (part 10)),导致我在 Google 搜索中陷入死胡同。

我还能尝试什么?我还没有在网上找到任何其他来源解决了与我类似的案例。

video vlc hdpi h264 gnome-tweaks
  • 1 个回答
  • 849 Views
Martin Hope
Monkeybus
Asked: 2020-04-12 17:11:31 +0800 CST

我可以使用 nginx 模块流式传输视频吗?

  • 0

我想将视频从 nginx 流式传输到我的浏览器。

这些视频通常采用 .mp4 格式,但我可以使用 avconv 或 ffmpeg/whatever 即时或提前进行转码。

我可以在 nginx 中安装一个模块,它允许我将视频流式传输到浏览器,而无需服务器/我的 PC 上的任何其他软件?

当然,必须是免费的。

我看过了,得到了很多令人困惑的答案。

非常感谢,伙计们。

nginx mp4 video-streaming h264
  • 1 个回答
  • 942 Views
Martin Hope
Tobia
Asked: 2019-05-28 06:17:25 +0800 CST

ffmpeg h264_nvenc, "未找到支持 NVENC 的设备"

  • 4

我正在尝试让硬件编码在 ffmpeg 上工作。

我正在使用带有默认内核 (4.15.0-50.54)、ffmpeg 包 (3.4.6-0ubuntu0.18.04.1) 和 Nvidia 驱动程序 (390.116-0ubuntu0.18.04.1) 的 Ubuntu 18.04

我的硬件是带有 NVidia Quadro M500M (GM108GLM) 的联想 Thinkpad P40 Yoga,它应该具有 PureVideo HD 6 (VP6)。我没有在这张卡上找到 NVENC 支持的编解码器、像素格式、比特率和分辨率的列表,但它至少应该能够编码简单的 H264 视频。事实上,我过去曾在同一台计算机上成功使用 NVENC 和 OBS(Open Broadcaster Software)。

但是 ffmpeg 给出以下消息:

[h264_nvenc @ 0x562d21d512a0] Loaded Nvenc version 8.1
[h264_nvenc @ 0x562d21d512a0] Nvenc initialized successfully
[h264_nvenc @ 0x562d21d512a0] 1 CUDA capable devices found
[h264_nvenc @ 0x562d21d512a0] [ GPU #0 - < Quadro M500M > has Compute SM 5.0 ]
[h264_nvenc @ 0x562d21d512a0] OpenEncodeSessionEx failed: unsupported device (2)
[h264_nvenc @ 0x562d21d512a0] No NVENC capable devices found
[h264_nvenc @ 0x562d21d512a0] Nvenc unloaded

我能做些什么来修复它?

这是完整的输出:

$ ffmpeg -f lavfi -i testsrc=duration=10:size=1280x720:rate=30 -vcodec h264_nvenc test.mp4 -v 56
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Splitting the commandline.
Reading option '-f' ... matched as option 'f' (force format) with argument 'lavfi'.
Reading option '-i' ... matched as input url with argument 'testsrc=duration=10:size=1280x720:rate=30'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'h264_nvenc'.
Reading option 'test.mp4' ... matched as output url.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '56'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 56.
Successfully parsed a group of options.
Parsing a group of options: input url testsrc=duration=10:size=1280x720:rate=30.
Applying option f (force format) with argument lavfi.
Successfully parsed a group of options.
Opening an input file: testsrc=duration=10:size=1280x720:rate=30.
detected 4 logical cores
[Parsed_testsrc_0 @ 0x562d21d4b660] Setting 'duration' to value '10'
[Parsed_testsrc_0 @ 0x562d21d4b660] Setting 'size' to value '1280x720'
[Parsed_testsrc_0 @ 0x562d21d4b660] Setting 'rate' to value '30'
[Parsed_testsrc_0 @ 0x562d21d4b660] size:1280x720 rate:30/1 duration:10.000000 sar:1/1
[AVFilterGraph @ 0x562d21d4a840] query_formats: 2 queried, 1 merged, 0 already done, 0 delayed
[lavfi @ 0x562d21d498c0] All info found
[lavfi @ 0x562d21d498c0] stream 0: start_time: 0.000 duration: -307445734561825856.000
[lavfi @ 0x562d21d498c0] format: start_time: 0.000 duration: -9223372036854.775 bitrate=0 kb/s
Input #0, lavfi, from 'testsrc=duration=10:size=1280x720:rate=30':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0, 1, 1/30: Video: rawvideo, 1 reference frame (RGB[24] / 0x18424752), rgb24, 1280x720 [SAR 1:1 DAR 16:9], 0/1, 30 tbr, 30 tbn, 30 tbc
Successfully opened the file.
Parsing a group of options: output url test.mp4.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument h264_nvenc.
Successfully parsed a group of options.
Opening an output file: test.mp4.
[file @ 0x562d21d6d720] Setting default whitelist 'file,crypto'
Successfully opened the file.
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_nvenc))
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[rawvideo @ 0x562d21d4f740] PACKET SIZE: 2764800, STRIDE: 3840
[graph 0 input from stream 0:0 @ 0x562d21d6f9e0] Setting 'video_size' to value '1280x720'
[graph 0 input from stream 0:0 @ 0x562d21d6f9e0] Setting 'pix_fmt' to value '2'
[graph 0 input from stream 0:0 @ 0x562d21d6f9e0] Setting 'time_base' to value '1/30'
[graph 0 input from stream 0:0 @ 0x562d21d6f9e0] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 0x562d21d6f9e0] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 0x562d21d6f9e0] Setting 'frame_rate' to value '30/1'
[graph 0 input from stream 0:0 @ 0x562d21d6f9e0] w:1280 h:720 pixfmt:rgb24 tb:1/30 fr:30/1 sar:1/1 sws_param:flags=2
[format @ 0x562d21d6e520] compat: called with args=[yuv420p|nv12|p010le|yuv444p|yuv444p16le|bgr0|rgb0|cuda]
[format @ 0x562d21d6e520] Setting 'pix_fmts' to value 'yuv420p|nv12|p010le|yuv444p|yuv444p16le|bgr0|rgb0|cuda'
[auto_scaler_0 @ 0x562d21d72da0] Setting 'flags' to value 'bicubic'
[auto_scaler_0 @ 0x562d21d72da0] w:iw h:ih flags:'bicubic' interl:0
[format @ 0x562d21d6e520] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_null_0' and the filter 'format'
[AVFilterGraph @ 0x562d21d6e7e0] query_formats: 4 queried, 2 merged, 1 already done, 0 delayed
[auto_scaler_0 @ 0x562d21d72da0] picking rgb0 out of 7 ref:rgb24 alpha:0
[swscaler @ 0x562d21d73b40] Forcing full internal H chroma due to input having non subsampled chroma
[auto_scaler_0 @ 0x562d21d72da0] w:1280 h:720 fmt:rgb24 sar:1/1 -> w:1280 h:720 fmt:rgb0 sar:1/1 flags:0x4
Loaded lib: libcuda.so.1
Loaded sym: cuInit
Loaded sym: cuDeviceGetCount
Loaded sym: cuDeviceGet
Loaded sym: cuDeviceGetName
Loaded sym: cuDeviceComputeCapability
Loaded sym: cuCtxCreate_v2
Loaded sym: cuCtxPushCurrent_v2
Loaded sym: cuCtxPopCurrent_v2
Loaded sym: cuCtxDestroy_v2
Loaded sym: cuMemAlloc_v2
Loaded sym: cuMemFree_v2
Loaded sym: cuMemcpy2D_v2
Loaded sym: cuGetErrorName
Loaded sym: cuGetErrorString
Loaded lib: libnvidia-encode.so.1
Loaded sym: NvEncodeAPICreateInstance
Loaded sym: NvEncodeAPIGetMaxSupportedVersion
[h264_nvenc @ 0x562d21d512a0] Loaded Nvenc version 8.1
[h264_nvenc @ 0x562d21d512a0] Nvenc initialized successfully
[h264_nvenc @ 0x562d21d512a0] 1 CUDA capable devices found
[h264_nvenc @ 0x562d21d512a0] [ GPU #0 - < Quadro M500M > has Compute SM 5.0 ]
[h264_nvenc @ 0x562d21d512a0] OpenEncodeSessionEx failed: unsupported device (2)
[h264_nvenc @ 0x562d21d512a0] No NVENC capable devices found
[h264_nvenc @ 0x562d21d512a0] Nvenc unloaded
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[AVIOContext @ 0x562d21d6d7a0] Statistics: 0 seeks, 0 writeouts
Conversion failed!
hardware-acceleration nvidia ffmpeg h264
  • 1 个回答
  • 9038 Views
Martin Hope
Csaba Toth
Asked: 2018-03-12 21:58:40 +0800 CST

尽管--enable-libx264,当ffmpeg未知解码器'libx264'时如何将视频重新编码为H.264

  • 5

我正在尝试将视频重新编码为 H.264 ffmpeg。我正在使用 Ubuntu Studio 17.10。我也安装了libavcodec-extra,libav-tools已经安装了,我安装了ubuntu-restricted-extras。ffmpeg编译时libx264启用:

$ ffmpeg -c:v libx264 -preset slow -crf 22 -c:a copy -i tmpoHcVBN.mp4 output.mp4
ffmpeg version 3.3.3-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.2.0-8ubuntu2)
  configuration: --prefix=/usr --extra-version=2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  WARNING: library configuration mismatch
  avcodec     configuration: --prefix=/usr --extra-version=2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc --enable-netcdf
  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
Unknown decoder 'libx264'

这是提供的包ffmpeg,我没有自己编译过,因为貌似这个也是编译过的--enable-libx264。我被困住了。

ffmpeg video-conversion h264
  • 1 个回答
  • 5889 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve