比特流过滤器“h264_mp4toannexb”不支持编解码器“mpeg4”(12)

比特流过滤器“h264_mp4toannexb”不支持编解码器“mpeg4”(12)
rohit@rohit:~/Desktop/hyland$ ffmpeg -y -i sample.mov -codec copy -bsf h264_mp4toannexb -map 0 -f segment -segment_time 5 -segment_format mpegts -segment_list "segments/prog_index.m3u8" -segment_list_type m3u8 segments/fileSequence%d.ts
ffmpeg version n4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --prefix= --prefix=/usr --disable-debug --disable-doc --disable-static --enable-cuda --enable-cuda-sdk --enable-cuvid --enable-libdrm --enable-ffplay --enable-gnutls --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libmp3lame --enable-libnpp --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopus --enable-libpulse --enable-sdl2 --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxvid --enable-nonfree --enable-nvenc --enable-omx --enable-openal --enable-opencl --enable-runtime-cpudetect --enable-shared --enable-vaapi --enable-vdpau --enable-version3 --enable-xlib
  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
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sample.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 512
    compatible_brands: qt  
    encoder         : Lavf58.17.101
  Duration: 00:00:52.08, start: 0.000000, bitrate: 1674 kb/s
    Stream #0:0(eng): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1544 kb/s, 24 fps, 24 tbr, 12288 tbn, 24 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc58.22.101 mpeg4
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[h264_mp4toannexb @ 0x5626984d8740] Codec 'mpeg4' (12) is not supported by the bitstream filter 'h264_mp4toannexb'. Supported codecs are: h264 (27) 
Error initializing bitstream filter: h264_mp4toannexb
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
    Last message repeated 1 times

答案1

使用

ffmpeg -i file.container -c:v copy -f mpeg2video out.mpg

对于 mpeg4video,也使用 mpeg2video。

这就是 Mpeg4/2 的附件 B 的样子...与更复杂的 AV1、VP9、HEVC 和 AVC 相比,这并不重要。

相关内容