ChinaFFmpeg

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 13991|回复: 3

[Linux] ffmpeg命令视频转换异常:Invalid NAL unit size (0 > 6246).

[复制链接]
发表于 2020-3-20 18:10:01 | 显示全部楼层 |阅读模式
视频执行命令如下:
/usr/local/bin/ffmpeg -y -v error -i media_202084503224901606.mp4 -pass 1 -passlogfile c4e25f1a-1e4f-486d-b77b-58ee71b08c0f -strict experimental -f mp4 -vcodec libx264 -movflags faststart -r 25/1 -b:v 1000000 -an -sn /dev/null

视频转换出现如下异常:
[h264 @ 0x7fc0d100b400] error while decoding MB 16 20, bytestream -15
[h264 @ 0x7fc0d100d000] Invalid NAL unit size (0 > 6246).
[h264 @ 0x7fc0d100d000] Error splitting the input into NAL units.
[h264 @ 0x7fc0d4014200] Invalid NAL unit size (0 > 8484).
[h264 @ 0x7fc0d4014200] Error splitting the input into NAL units.
[h264 @ 0x7fc0d4014800] Invalid NAL unit size (0 > 9366).
[h264 @ 0x7fc0d4014800] Error splitting the input into NAL units.
[h264 @ 0x7fc0d4014e00] Invalid NAL unit size (0 > 6205).
[h264 @ 0x7fc0d4014e00] Error splitting the input into NAL units.
[h264 @ 0x7fc0d4015400] Invalid NAL unit size (0 > 4062).
[h264 @ 0x7fc0d4015400] Error splitting the input into NAL units.
[h264 @ 0x7fc0d4015a00] Invalid NAL unit size (0 > 7741).
[h264 @ 0x7fc0d4015a00] Error splitting the input into NAL units.
[h264 @ 0x7fc0d4016000] Invalid NAL unit size (0 > 2167).
[h264 @ 0x7fc0d4016000] Error splitting the input into NAL units.
[h264 @ 0x7fc0d4016600] Invalid NAL unit size (0 > 3356).
[h264 @ 0x7fc0d4016600] Error splitting the input into NAL units.
Error while decoding stream #0:1: Invalid data found when processing input

之前别的视频没有出现过这种问题,想知道这种问题的原因是什么呢?求大神帮忙 @孙悟空
回复

使用道具 举报

 楼主| 发表于 2020-3-21 12:27:00 | 显示全部楼层
本帖最后由 排骨瘦肉丁 于 2020-3-21 12:30 编辑

播放的时候依然是类似的错误:播放到几秒钟的时候音频正常播放,视频就卡住了ffplay -vcodec h264 media_202084503224901606.mp4
ffplay version 4.1.4 Copyright (c) 2003-2019 the FFmpeg developers
  built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.4_1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-12.0.1.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-12.0.1.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'media_202084503224901606.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isom
    creation_time   : 2020-03-13T06:57:54.000000Z
  Duration: 00:00:14.74, start: 0.000000, bitrate: 1212 kb/s
    Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      creation_time   : 2020-03-13T06:57:54.000000Z
    Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, unknown/bt470bg/unknown), 544x960, 1083 kb/s, 28.98 fps, 29 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      creation_time   : 2020-03-13T06:57:54.000000Z
      encoder         : JVT/AVC Coding
[h264 @ 0x7f88ab811e00] error while decoding MB 16 20, bytestream -15
[h264 @ 0x7f88ab811e00] concealing 1393 DC, 1393 AC, 1393 MV errors in I frame
[h264 @ 0x7f88ad800a00] Invalid NAL unit size (0 > 6246).0B f=0/0   
[h264 @ 0x7f88ad800a00] Error splitting the input into NAL units.
[h264 @ 0x7f88ad025200] Invalid NAL unit size (0 > 8484).0B f=0/0   
[h264 @ 0x7f88ad025200] Error splitting the input into NAL units.
[h264 @ 0x7f88ad036c00] Invalid NAL unit size (0 > 9366).0B f=0/0   
[h264 @ 0x7f88ad036c00] Error splitting the input into NAL units.
[h264 @ 0x7f88ad037200] Invalid NAL unit size (0 > 6205).0B f=0/0   
[h264 @ 0x7f88ad037200] Error splitting the input into NAL units.
[h264 @ 0x7f88ad037800] Invalid NAL unit size (0 > 4062).0B f=0/0   
[h264 @ 0x7f88ad037800] Error splitting the input into NAL units.
[h264 @ 0x7f88ad07ca00] Invalid NAL unit size (0 > 7741).0B f=0/0   
[h264 @ 0x7f88ad07ca00] Error splitting the input into NAL units.
[h264 @ 0x7f88ad07d000] Invalid NAL unit size (0 > 2167).0B f=0/0   
[h264 @ 0x7f88ad07d000] Error splitting the input into NAL units.
[h264 @ 0x7f88aa82a600] Invalid NAL unit size (0 > 3356).0B f=0/0   
[h264 @ 0x7f88aa82a600] Error splitting the input into NAL units.
[h264 @ 0x7f88ab811e00] Invalid NAL unit size (0 > 5093).0B f=0/0   
[h264 @ 0x7f88ab811e00] Error splitting the input into NAL units.
[h264 @ 0x7f88ad800a00] Invalid NAL unit size (0 > 2962).
[h264 @ 0x7f88ad800a00] Error splitting the input into NAL units.
[h264 @ 0x7f88ad025200] Invalid NAL unit size (0 > 5410).
[h264 @ 0x7f88ad025200] Error splitting the input into NAL units.
[h264 @ 0x7f88ad036c00] Invalid NAL unit size (0 > 3107).
[h264 @ 0x7f88ad036c00] Error splitting the input into NAL units.
[h264 @ 0x7f88ad037200] Invalid NAL unit size (0 > 6237).
[h264 @ 0x7f88ad037200] Error splitting the input into NAL units.
[h264 @ 0x7f88ad037800] Invalid NAL unit size (0 > 3125).
[h264 @ 0x7f88ad037800] Error splitting the input into NAL units.
[h264 @ 0x7f88ad07ca00] Invalid NAL unit size (0 > 4611).
[h264 @ 0x7f88ad07ca00] Error splitting the input into NAL units.
[h264 @ 0x7f88ad07d000] Invalid NAL unit size (0 > 3556).
[h264 @ 0x7f88ad07d000] Error splitting the input into NAL units.
[h264 @ 0x7f88aa82a600] Invalid NAL unit size (0 > 4434).
[h264 @ 0x7f88aa82a600] Error splitting the input into NAL units.
[h264 @ 0x7f88ab811e00] Invalid NAL unit size (0 > 3387).
[h264 @ 0x7f88ab811e00] Error splitting the input into NAL units.
[h264 @ 0x7f88ad800a00] Invalid NAL unit size (0 > 5158).
[h264 @ 0x7f88ad800a00] Error splitting the input into NAL units.
[h264 @ 0x7f88ad025200] Invalid NAL unit size (0 > 3922).
[h264 @ 0x7f88ad025200] Error splitting the input into NAL units.
[h264 @ 0x7f88ad036c00] Invalid NAL unit size (0 > 4436).
[h264 @ 0x7f88ad036c00] Error splitting the input into NAL units.
[h264 @ 0x7f88ad037200] Invalid NAL unit size (0 > 3317).
[h264 @ 0x7f88ad037200] Error splitting the input into NAL units.
[h264 @ 0x7f88ad037800] Invalid NAL unit size (0 > 2351).
[h264 @ 0x7f88ad037800] Error splitting the input into NAL units.
[h264 @ 0x7f88ad07ca00] Invalid NAL unit size (0 > 4576).
[h264 @ 0x7f88ad07ca00] Error splitting the input into NAL units.
[h264 @ 0x7f88ad07d000] Invalid NAL unit size (0 > 4571).
[h264 @ 0x7f88ad07d000] Error splitting the input into NAL units.
[h264 @ 0x7f88aa82a600] Invalid NAL unit size (0 > 2254).
[h264 @ 0x7f88aa82a600] Error splitting the input into NAL units.
[h264 @ 0x7f88ab811e00] Invalid NAL unit size (0 > 4304).
[h264 @ 0x7f88ab811e00] Error splitting the input into NAL units.
[h264 @ 0x7f88ad800a00] Invalid NAL unit size (0 > 1693).
[h264 @ 0x7f88ad800a00] Error splitting the input into NAL units.
[h264 @ 0x7f88ad025200] Invalid NAL unit size (0 > 4726).
[h264 @ 0x7f88ad025200] Error splitting the input into NAL units.
[h264 @ 0x7f88ad036c00] Invalid NAL unit size (0 > 16181).
[h264 @ 0x7f88ad036c00] Error splitting the input into NAL units.
[h264 @ 0x7f88ad037200] Invalid NAL unit size (0 > 2841).
[h264 @ 0x7f88ad037200] Error splitting the input into NAL units.
[h264 @ 0x7f88ad037800] Invalid NAL unit size (0 > 8978).
[h264 @ 0x7f88ad037800] Error splitting the input into NAL units.
[h264 @ 0x7f88ad07ca00] Invalid NAL unit size (0 > 6035).
[h264 @ 0x7f88ad07ca00] Error splitting the input into NAL units.
[h264 @ 0x7f88ad07d000] Invalid NAL unit size (0 > 2976).
[h264 @ 0x7f88ad07d000] Error splitting the input into NAL units.
[h264 @ 0x7f88aa82a600] Invalid NAL unit size (0 > 3365).
[h264 @ 0x7f88aa82a600] Error splitting the input into NAL units.
[h264 @ 0x7f88ab811e00] Invalid NAL unit size (0 > 4828).
[h264 @ 0x7f88ab811e00] Error splitting the input into NAL units.




回复 支持 反对

使用道具 举报

发表于 2020-3-21 20:34:08 | 显示全部楼层
解析视频的时候出现问题了,解码问题
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-3-22 11:04:11 | 显示全部楼层
孙悟空 发表于 2020-3-21 20:34
解析视频的时候出现问题了,解码问题

那这个视频是不是就解不了,播不了啊?是不是所有播放器都播不了呢?
原因是因为:encoder         : JVT/AVC Coding这个吗?还是跟major_brand     : mp42有关呢?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|Archiver|ChinaFFmpeg

GMT+8, 2024-12-27 13:50 , Processed in 0.046941 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表