从NALU创建的带有4个字节的起始代码0x000001的MP4的无效NAL单元大小

如何解决从NALU创建的带有4个字节的起始代码0x000001的MP4的无效NAL单元大小

我有一个mp4混合器,当H264 NALU具有4字节的起始代码(0x00000001)时,它可以正常工作。我正在对其进行修改以支持3字节的起始代码(0x000001),但是我遇到了无法识别的错误。生成的MP4在VLC和MediaPlayer中打开,但未显示视频。在VLC中,统计数据表明它正在解码块,但显示的帧数为0。

然后我使用ffmpeg(ffmpeg -v错误-i myvideo.mp4 -f null-2> error.log运行错误分析器,向我显示以下输出:

[h264 @ 0x7fa3b5003200] Invalid NAL unit size (158559 > 158558).
[h264 @ 0x7fa3b5003200] Error splitting the input into NAL units.
[h264 @ 0x7fa3b5003200] Invalid NAL unit size (9338 > 9337).
[h264 @ 0x7fa3b5003200] Error splitting the input into NAL units.
[h264 @ 0x7fa3b5003200] Invalid NAL unit size (6582 > 6581).
[h264 @ 0x7fa3b5003200] Error splitting the input into NAL units.
[h264 @ 0x7fa3b5003200] Invalid NAL unit size (8300 > 8299).
[h264 @ 0x7fa3b5003200] Error splitting the input into NAL units.
[h264 @ 0x7fa3b5003200] Invalid NAL unit size (9336 > 9335).
[h264 @ 0x7fa3b5003200] Error splitting the input into NAL units.
[h264 @ 0x7fa3b5003200] Invalid NAL unit size (9422 > 9421).
[h264 @ 0x7fa3b5003200] Error splitting the input into NAL units.
[h264 @ 0x7fa3b5003200] Invalid NAL unit size (10448 > 10447).
[h264 @ 0x7fa3b5003200] Error splitting the input into NAL units.
[h264 @ 0x7fa3b5003200] Invalid NAL unit size (9208 > 9207).
[h264 @ 0x7fa3b5003200] Error splitting the input into NAL units.
[h264 @ 0x7fa3b5003200] Invalid NAL unit size (8776 > 8775).
[h264 @ 0x7fa3b5003200] Error splitting the input into NAL units.
[h264 @ 0x7fa3b5003200] Invalid NAL unit size (11376 > 11375).
[h264 @ 0x7fa3b5003200] Error splitting the input into NAL units.
[h264 @ 0x7fa3b5003200] Invalid NAL unit size (158311 > 158310).
[h264 @ 0x7fa3b5003200] Error splitting the input into NAL units.
[h264 @ 0x7fa3b5003200] Invalid NAL unit size (9164 > 9163).
[h264 @ 0x7fa3b5003200] Error splitting the input into NAL units.
[h264 @ 0x7fa3b5003200] Invalid NAL unit size (7994 > 7993).
[h264 @ 0x7fa3b5003200] Error splitting the input into NAL units.
[h264 @ 0x7fa3b5003200] Invalid NAL unit size (9974 > 9973).
[h264 @ 0x7fa3b5003200] Error splitting the input into NAL units.
[h264 @ 0x7fa3b5003200] Invalid NAL unit size (9282 > 9281).
[h264 @ 0x7fa3b5003200] Error splitting the input into NAL units.
[h264 @ 0x7fa3b5003200] Invalid NAL unit size (9656 > 9655).
[h264 @ 0x7fa3b5003200] Error splitting the input into NAL units.

我试图找出为什么它在所有mdat框中抱怨1个字节的差异。另外,较小的值(例如158558)比mdat标头中写入的大小小12个字节。

任何人都可以帮助指出为什么发生此错误?相同的代码可以很好地创建具有4字节NALU起始代码的MP4。

更新:我运行了 ffprobe ,它提供了更多详细信息,更具体地说是说找不到“编解码器参数”:

$ ffprobe -analyzeduration 2147483647 -probesize 2147483647 -i myvideo.mp4 
ffprobe version 4.3.1 Copyright (c) 2007-2020 the FFmpeg developers
  built with Apple clang version 11.0.3 (clang-1103.0.32.62)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --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-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (147087 > 147086).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (8104 > 8103).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9752 > 9751).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12058 > 12057).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9026 > 9025).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12032 > 12031).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12566 > 12565).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (7906 > 7905).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9758 > 9757).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12840 > 12839).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (146771 > 146770).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (7708 > 7707).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9524 > 9523).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12230 > 12229).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9080 > 9079).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12164 > 12163).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12650 > 12649).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (7916 > 7915).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9736 > 9735).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (13086 > 13085).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (147143 > 147142).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (8218 > 8217).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9908 > 9907).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12450 > 12449).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (7806 > 7805).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9598 > 9597).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12692 > 12691).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9782 > 9781).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12930 > 12929).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12750 > 12749).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (146911 > 146910).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (8182 > 8181).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9494 > 9493).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12268 > 12267).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (8898 > 8897).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11946 > 11945).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12622 > 12621).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (8108 > 8107).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9754 > 9753).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12110 > 12109).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (147067 > 147066).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (7726 > 7725).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9424 > 9423).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12078 > 12077).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (8976 > 8975).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11686 > 11685).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11940 > 11939).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9274 > 9273).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11950 > 11949).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11702 > 11701).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (147021 > 147020).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (7686 > 7685).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9572 > 9571).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11810 > 11809).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11584 > 11583).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9116 > 9115).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11986 > 11985).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11390 > 11389).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9008 > 9007).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11768 > 11767).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (147347 > 147346).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (7618 > 7617).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9266 > 9265).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12046 > 12045).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11562 > 11561).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (8898 > 8897).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11672 > 11671).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11458 > 11457).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (8850 > 8849).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11452 > 11451).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (147213 > 147212).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (7540 > 7539).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9610 > 9609).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12302 > 12301).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9154 > 9153).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11868 > 11867).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12054 > 12053).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (7508 > 7507).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9136 > 9135).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11812 > 11811).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (147089 > 147088).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (7800 > 7799).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9482 > 9481).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12244 > 12243).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9198 > 9197).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11962 > 11961).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12386 > 12385).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (7618 > 7617).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (8996 > 8995).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11800 > 11799).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (147135 > 147134).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (7934 > 7933).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9742 > 9741).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12398 > 12397).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (7540 > 7539).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9130 > 9129).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12482 > 12481).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12002 > 12001).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11710 > 11709).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11886 > 11885).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (147303 > 147302).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (7620 > 7619).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9316 > 9315).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12138 > 12137).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9056 > 9055).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11968 > 11967).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11942 > 11941).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9072 > 9071).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11546 > 11545).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (11368 > 11367).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (147363 > 147362).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (7578 > 7577).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9466 > 9465).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (12230 > 12229).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[h264 @ 0x7fa85f800e00] Invalid NAL unit size (9248 > 9247).
[h264 @ 0x7fa85f800e00] Error splitting the input into NAL units.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fa85f000000] decoding for stream 0 failed
[mov,mj2 @ 0x7fa85f000000] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661),none,1280x960,1717 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0,mov,mj2,from 'myvideo.mp4':
  Metadata:
    major_brand     : iso5
    minor_version   : 512
    compatible_brands: iso6mp41
  Duration: 00:00:13.22,start: 0.000000,bitrate: 1726 kb/s
    Stream #0:0(und): Video: h264 (avc1 / 0x31637661),1717 kb/s,8.70 fps,9.25 tbr,90k tbn,180k tbc (default)
    Metadata:
      handler_name    : VideoHandle

解决方法

“无效的NAL单位大小”是指Moof-> Traf-> Trun“样本大小”,其值不同于实际的mdat有效负载大小(mdat有效负载= mdat框,不含前8个字节,即长度和“ mdat”名称)。

之所以发生这种情况,是因为我的复用器接收到H264块并将该块大小用作“样本大小”,而不是计算实际的mdat有效负载大小。仅当我的多路复用器接收到的H264块没有4字节的NALU起始代码(因为我为每个NALU长度大小使用4个字节)时,该错误才可见。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 <select id="xxx"> SELECT di.id, di.name, di.work_type, di.updated... <where> <if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 <property name="dynamic.classpath" value="tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams['font.sans-serif'] = ['SimHei'] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -> systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping("/hires") public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate<String
使用vite构建项目报错 C:\Users\ychen\work>npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-