<div dir="ltr"><div dir="ltr">Hi. I am trying to re-encode a video and have encountered a problem.<br><br>The new file is set to .mp4 format with the MPEG4 encoder. The encoding process works without trouble,<br>but the resulting file is unreadable by my own application as well as some others (though VLC plays it fine).<br><br>Strangely, when I set the format to .avi there are no issues.<br><br>These are the errors reported by ffmpeg debug log for my application when it tries to read the .mp4 file:<br><br><br>[2018-10-27 11:24:06.392] [ffmpeglog] [info] [mov,mp4,m4a,3gp,3g2,mj2 @ 000001d20ea67180] max_analyze_duration 5000000 reached at 5022508 microseconds st:0<br><br>[2018-10-27 11:24:06.392] [ffmpeglog] [info] [mov,mp4,m4a,3gp,3g2,mj2 @ 000001d20ea67180] decoding for stream 0 failed<br><br>[2018-10-27 11:24:06.392] [ffmpeglog] [info] [mov,mp4,m4a,3gp,3g2,mj2 @ 000001d20ea67180] stream 0: start_time: 0.032 duration: 10.677<br><br>[2018-10-27 11:24:06.392] [ffmpeglog] [info] [mov,mp4,m4a,3gp,3g2,mj2 @ 000001d20ea67180] format: start_time: 0.032 duration: 10.677 bitrate=2499 kb/s<br><br>[2018-10-27 11:24:06.392] [ffmpeglog] [info] [mov,mp4,m4a,3gp,3g2,mj2 @ 000001d20ea67180] Could not find codec parameters for stream 0 (Video: mpeg4, 1 reference frame (mp4v / 0x7634706D), yuv420p(left), 2496 kb/s): unspecified size<br>Consider increasing the value for the 'analyzeduration' and 'probesize' options<br><br>[2018-10-27 11:24:06.392] [ffmpeglog] [info] [mov,mp4,m4a,3gp,3g2,mj2 @ 000001d20ea67180] After avformat_find_stream_info() pos: 2063025 bytes read:2119035 seeks:2 frames:151<br><br>[2018-10-27 11:24:06.397] [ffmpeglog] [info] [mpeg4 @ 000001d20ea64d00] time_increment_bits 4 is invalid in relation to the current bitstream, this is likely caused by a missing VOL header<br><br>[2018-10-27 11:24:06.397] [ffmpeglog] [info] [mpeg4 @ 000001d20ea64d00] time_increment_bits set to 15 bits, based on bitstream analysis<br><br>[2018-10-27 11:24:06.397] [ffmpeglog] [info] [mpeg4 @ 000001d20ea64d00] looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag<br><br>[2018-10-27 11:24:06.397] [ffmpeglog] [info] [mpeg4 @ 000001d20ea64d00] Format yuv420p chosen by get_format().<br><br>[2018-10-27 11:24:06.397] [ffmpeglog] [info] [mpeg4 @ 000001d20ea64d00] [IMGUTILS @ 00000046f8cfcc20] Picture size 0x0 is invalid<br><br>[2018-10-27 11:24:06.397] [ffmpeglog] [info] [mpeg4 @ 000001d20ea64d00] video_get_buffer: image parameters invalid<br><br>[2018-10-27 11:24:06.397] [ffmpeglog] [info] [mpeg4 @ 000001d20ea64d00] get_buffer() failed<br><br>[2018-10-27 11:24:06.397] [ffmpeglog] [info] [mpeg4 @ 000001d20ea64d00] thread_get_buffer() failed<br><br>[2018-10-27 11:24:06.397] [ffmpeglog] [info] [mpeg4 @ 000001d20ea64d00] get_buffer() failed (-22 0000000000000000)<br><br>[2018-10-27 11:24:06.397] [ffmpeglog] [info] [mpeg4 @ 000001d20ea64d00] [IMGUTILS @ 00000046f8cfcc20] Picture size 0x0 is invalid<br><br>[2018-10-27 11:24:06.397] [ffmpeglog] [info] [mpeg4 @ 000001d20ea64d00] video_get_buffer: image parameters invalid<br><br>[2018-10-27 11:24:06.397] [ffmpeglog] [info] [mpeg4 @ 000001d20ea64d00] get_buffer() failed<br><br>[2018-10-27 11:24:06.397] [ffmpeglog] [info] [mpeg4 @ 000001d20ea64d00] thread_get_buffer() failed<br><br>[2018-10-27 11:24:06.397] [ffmpeglog] [info] [mpeg4 @ 000001d20ea64d00] get_buffer() failed (-22 0000000000000000)<br><br>[2018-10-27 11:24:06.397] [ffmpeglog] [info] [mpeg4 @ 000001d20ea64d00] low_delay flag set incorrectly, clearing it<br><br>[2018-10-27 11:24:06.397] [ffmpeglog] [info] [mpeg4 @ 000001d20ea64d00] [IMGUTILS @ 00000046f8cfcc20] Picture size 0x0 is invalid<br><br>[2018-10-27 11:24:06.397] [ffmpeglog] [info] [mpeg4 @ 000001d20ea64d00] video_get_buffer: image parameters invalid<br><br>[2018-10-27 11:24:06.397] [ffmpeglog] [info] [mpeg4 @ 000001d20ea64d00] get_buffer() failed<br><br>[2018-10-27 11:24:06.397] [ffmpeglog] [info] [mpeg4 @ 000001d20ea64d00] thread_get_buffer() failed<br><br>[2018-10-27 11:24:06.397] [ffmpeglog] [info] [mpeg4 @ 000001d20ea64d00] get_buffer() failed (-22 0000000000000000)<br><br>[2018-10-27 11:24:06.397] [ffmpeglog] [info] [mpeg4 @ 000001d20ea64d00] [IMGUTILS @ 00000046f8cfcc20] Picture size 0x0 is invalid<br><br><br><br></div></div>