当前位置:网站首页>ffmpeg视频剪辑中报错Could not write header for output file #0 (incorrect codec parameters ?): ……
ffmpeg视频剪辑中报错Could not write header for output file #0 (incorrect codec parameters ?): ……
2022-08-01 14:25:00 【小屋*】
原理参考:
ffmpeg和H264视频的编解码
FFmpeg 软编码H.264与H.265
报错:
ffmpeg version 2.8.17-0ubuntu0.1 Copyright 2000-2020 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --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-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --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-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ‘180A0001.mp4’:
Metadata:
major_brand : qt
minor_version : 537331968
compatible_brands: qt CAEP
creation_time : 2018-11-12 12:34:28
Duration: 00:16:01.86, start: 0.000000, bitrate: 31487 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 29944 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc (default)
Metadata:
creation_time : 2018-11-12 12:34:28
timecode : 08:30:34;24
Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s (default)
Metadata:
creation_time : 2018-11-12 12:34:28
timecode : 08:30:34;24
Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
Metadata:
creation_time : 2018-11-12 12:34:28
timecode : 08:30:34;24
[mp4 @ 0x11e7420] Codec for stream 0 does not use global headers but container format requires global headers
[mp4 @ 0x11e7420] Codec for stream 1 does not use global headers but container format requires global headers
[mp4 @ 0x11e7420] Could not find tag for codec pcm_s16le in stream #1, codec not currently supported in container
Output #0, mp4, to ‘180A0001_0.mp4’:
Metadata:
major_brand : qt
minor_version : 537331968
compatible_brands: qt CAEP
encoder : Lavf56.40.101
Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuvj420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 29944 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc (default)
Metadata:
creation_time : 2018-11-12 12:34:28
timecode : 08:30:34;24
Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, 1536 kb/s (default)
Metadata:
creation_time : 2018-11-12 12:34:28
timecode : 08:30:34;24
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
将ffmpeg -i [180A0001.mp4] -vcodec copy -acodec copy -ss [00:00:57] -t [00:00:30] [180A0001_10.mp4]
改用ffmpeg -i [180A0001.mp4] -ss [00:00:57] -t [00:00:30] -c:v libx264 -strict -2 [180A0001_10.mp4]
边栏推荐
- 微服务原生案例搭建
- Amperon IPO meeting: annual revenue of 500 million Tongchuang Weiye and China Mobile Innovation are shareholders
- The little thing about Request reuse.The research is understood, and I will report it to you.
- Gradle系列——Gradle测试,Gradle生命周期,settings.gradle说明,Gradle任务(基于Groovy文档4.0.4)day2-3
- 牛客刷SQL--6
- The default database main key, foreign key, and the only key index
- PAT 1167 Cartesian Tree(30)
- MBI5020 LED驱动
- A Beginner's Guide to Performance Testing
- 使用ffmpeg来查看视频的信息,fps,和width,height
猜你喜欢

Yann LeCun开怼谷歌研究:目标传播早就有了,你们创新在哪里?

「计算复杂性」理论奠基人Juris Hartmanis逝世,曾获93年图灵奖

只知道SQL数据库?又一国产数据库语言诞生了

超全!全国近90所大学考研报录比汇总!

ECCV 2022|R2L: 用数据蒸馏加速NeRF

什么是元编程

预防和制止家庭暴力 人身安全保护令司法解释今起施行

Wovent Bio IPO: Annual revenue of 480 million pension fund is a shareholder

openEuler 社区完成首批顾问专家聘用,共同为社区的发展贡献力量

Longkou united chemical registration: through 550 million revenue xiu-mei li control 92.5% stake
随机推荐
Pytorch - Distributed Model Training
HTB-Shocker
ECCV 2022|R2L: 用数据蒸馏加速NeRF
魔众短链接系统 v3.9.0
Longkou united chemical registration: through 550 million revenue xiu-mei li control 92.5% stake
Performance Optimization - Rendering Optimization Notes
免费使用高性能的GPU和TPU—谷歌Colab使用教程
透过开发抽奖小程序,体会创新与迭代
1161. 最大层内元素和
你真的会测试用户登录吗?
荣信文化通过注册:年营收3.8亿 王艺桦夫妇为实控人
the direction i'm looking for
线性代数的简单应用
什么是混合元编程
D - Draw Your Cards (Simulation)
win10+Qt5.15.2实现低功耗蓝牙控制
HTB-Mirai
Performance Optimization - Animation Optimization Notes
搭建ntp时间服务器(安装sql2000配置服务器失败)
OpenSSL SSL_read: Connection was reset, errno 10054