Hi, I'm trying to split an Mpeg2 video into small segments of 30 secs or less using the below command : ffmpeg -i input.mpg -ss 00:00:00 -t 00:00:20 out.mpg Further, I am trying to process out.mpg to extract motion vectors and run into the "ISO_11172_END_CODE missing(0x0)" error. Is it possible to tell ffmpeg to retain the "end_code" or add the "end_code" while splitting the original mpeg video ? Please pardon me if this is naive question, I'm new to using the field and also to using ffmpeg. Any help regarding this will be immensely helpful. Thanks much, -Hemali
Hemali Majithia wrote:
Hi,
I'm trying to split an Mpeg2 video into small segments of 30 secs or less using the below command :
ffmpeg -i input.mpg -ss 00:00:00 -t 00:00:20 out.mpg
Since you don't specify -vcodec copy, the video will be re-encoded, at 200kbits. (Which shows why you should always post, and read of course, the full output messages)...
Further, I am trying to process out.mpg to extract motion vectors and
... hence you will get the motion vectors as computed by that re-encoding, not the ones in the original MPEG.
run into the "ISO_11172_END_CODE missing(0x0)" error.
With what tool? AFAICS this message is *not* from ffmpeg.
Is it possible to tell ffmpeg to retain the "end_code" or add the "end_code" while splitting the original mpeg video ?
The END_CODE is omitted because otherwise MPEG files can no longer be concatenated (at least not without a special tool). What about passing -strict to the AVFormatContext as well (currently it's for codecs only), then emitting the END_CODE when -strict very or -strict strict? -- Michel Bardiaux Mediaxim NV/SA
participants (2)
-
majithia@streamsage.com -
mbardiaux@mediaxim.be