我正在尝试转换视频,这要归功于API (using the transcoding example),我调整了很少(如5行)并强制编解码器为MJPEG
。它编码3或4帧,然后退出Invalid pts (3) <= last (3)
。这是完整的痕迹:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/thomas/test.mov':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2014-09-05 15:42:24
Duration: 00:00:29.70, start: 0.000000, bitrate: 943 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 935 kb/s, SAR 1:1 DAR 16:9, 60 fps, 60 tbr, 6k tbn, 50 tbc (default)
Metadata:
creation_time : 2014-09-05 15:42:24
handler_name : Core Media Data Handler
encoder : H.264
timecode : 00:00:00:00
Stream #0:1(und): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
Metadata:
creation_time : 2014-09-05 15:42:24
handler_name : Core Media Data Handler
timecode : 00:00:00:00
Output #0, mov, to '/Users/thomas/test_MJPEG.mov':
Stream #0:0: Video: mjpeg, yuvj420p, 1280x720, q=2-31, 128 kb/s, 50 tbc
Stream #0:1: Data: none (tmcd / 0x64636D74), 0 kb/s
[mov @ 0x7ffd6202e600] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
[mov @ 0x7ffd6202e600] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
[swscaler @ 0x7ffd6204d000] deprecated pixel format used, make sure you did set range correctly
Pushing decoded frame to filters
Pulling filtered frame from filters
Encoding frame
Pulling filtered frame from filters
Pushing decoded frame to filters
Pulling filtered frame from filters
Encoding frame
Pulling filtered frame from filters
Pushing decoded frame to filters
Pulling filtered frame from filters
Encoding frame
Pulling filtered frame from filters
Pushing decoded frame to filters
Pulling filtered frame from filters
Encoding frame
Pulling filtered frame from filters
Pushing decoded frame to filters
Pulling filtered frame from filters
Encoding frame
[mjpeg @ 0x7ffd6202ec00] Invalid pts (3) <= last (3)
Error occurred: Operation not permitted
我不知道如何解决这个问题,我使用无效设置吗?
Here's the movie I'm working with
仅供参考,我希望实现与命令ffmpeg -i test.mov -vcodec mjpeg testMJPEG.mov