这是我用来转换视频的命令。
ffmpeg -skip_frame nokey -i input.3gp -vsync vfr -frame_pts true output.png
(该命令无法修改,因为这是从一个 Google 测试用例中捕获的代码片段。)
我收到了以下消息。
ffmpeg version 4.2.7 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration:
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'VID_20240327_034002_0_LOW_176x144.3gp':
Metadata:
major_brand : 3gp4
minor_version : 0
compatible_brands: isom3gp4
creation_time : 2024-03-27T07:40:05.000000Z
com.android.version: 13
Duration: 00:00:02.95, start: 0.000000, bitrate: 144 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt470bg/bt470bg/smpte170m), 176x144, 137 kb/s, 29.97 fps, 29.92 tbr, 90k tbn, 180k tbc (default)
Metadata:
creation_time : 2024-03-27T07:40:05.000000Z
handler_name : VideoHandle
Stream #0:1(eng): Audio: amr_nb (samr / 0x726D6173), 8000 Hz, mono, flt, 12 kb/s (default)
Metadata:
creation_time : 2024-03-27T07:40:05.000000Z
handler_name : SoundHandle
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> png (native))
Press [q] to stop, [?] for help
[swscaler @ 0x55ccaac84dc0] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to 'output.png':
Metadata:
major_brand : 3gp4
minor_version : 0
compatible_brands: isom3gp4
com.android.version: 13
encoder : Lavf58.29.100
Stream #0:0(eng): Video: png, rgb24, 176x144, q=2-31, 200 kb/s, 29.92 fps, 29.92 tbn, 29.92 tbc (default)
Metadata:
creation_time : 2024-03-27T07:40:05.000000Z
handler_name : VideoHandle
encoder : Lavc58.54.100 png
[image2 @ 0x55ccaaa36c40] Cannot write filename by pts of the frames.av_interleaved_write_frame(): Invalid argument
frame= 3 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.33 bitrate=N/A speed=24.7x
video:17kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!
我已经尝试了其他版本的 ffmpeg,但它们都无法正常工作。有没有类似的问题或解决方案可以解决这个问题?
提前致谢。问候。