当我转换摄像头的录像时,报错
ffmpeg -i 2019052408100008111.mp4 -vcodec libx265 -vcodec libx264 mp4.mp4
ffmpeg -i 2019052408100008111.mp4 -vcodec libx264 mp4.mp4
ffmpeg -i 2019052408100008111.mp4 -vcodec h264 mp4.mp4
都是相同错误。
摄像头的录像格式很特别吗?ffmpeg是源码编译的。版本 3.4+
我用之前的 apt install的ffmpeg 成功的。版本 2.2
和ffmpeg的版本有关?
编译缺少选项?
deployer@deployer-PowerEdge-T630:~/GenMp4/src/untitled1$ ffmpeg -i 2019052408100008111.mp4 -vcodec libx265 -vcodec libx264 mp4.mp4
...
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2019052408100008111.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf57.71.100
Duration: 00:05:03.60, start: 0.000000, bitrate: 1723 kb/s
Stream #0:0(und): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv), 2592x1944, 1723 kb/s, 5 fps, 5 tbr, 1200k tbn, 5 tbc (default)
Metadata:
handler_name : VideoHandler
File 'mp4.mp4' already exists. Overwrite ? [y/N] y
[hevc @ 0x2d17240] Invalid NAL unit size in extradata.
Stream mapping:
Stream #0:0 -> #0:0 (hevc (native) -> h264 (libx264))
Error while opening decoder for input stream #0:0 : Invalid data found when processing input