fixing .avi duration

930 views
Skip to first unread message

Vincent Prevosto

unread,
Aug 17, 2016, 3:59:29 PM8/17/16
to Bonsai Users
Hi,
I have a few .avi movies recorded with Bonsai that have an incorrect indicated duration (as written in their header), but contain all the frames past this erroneous "end". This is probably due to an incorrect stop of the workflow by the experimenter. I'm exporting clips from those movies (as in https://groups.google.com/d/topic/bonsai-users/uiUcQdKxpj4/discussion ), but the clips generated from the files with the wrong duration are just 1 frame long after the supposed "end" of the movie. The same issue occurs in Matlab. A workaround is to open those files in VLC, which isn't fooled by the incorrect duration header, and re-export them. From there the Bonsai workflow works as expected, although the command windows display this error for every extracted clip:
[h264 @ 000000002E354EB0] illegal reordering_of_pic_nums_idc
[h264 @ 000000002E354EB0] decode_slice_header error

I'd like to avoid using the VLC workaround, though, so I'm wondering if there would be any quick way to fix .avi duration.
Any thoughts?
Thanks!

Vincent Prevosto

unread,
Aug 17, 2016, 8:27:05 PM8/17/16
to Bonsai Users
Never mind. I've found that re-saving the file from VLC with "Keep original video track" checked in the Codec conversion parameter does the trick, and it's very fast. Feel free to remove those posts.

goncaloclopes

unread,
Aug 18, 2016, 2:34:57 AM8/18/16
to Bonsai Users
On the contrary, this is great info! I've marked your answer as best, as I think this will be very helpful to other users.
Thanks for investigating :-)
Reply all
Reply to author
Forward
0 new messages