Can i use gifs?

Shotcut tries to discourage users from adding a non-seekable clip to the Playlist or Timeline, but there is a workaround by adding it to the Playlist by clicking + or using Shift+A… Using + prompts you for a duration to prevent the problem you experienced. I just found that the keyboard shortcut does not. Since FFmpeg treats the animated GIF as loopable, it does not determine a duration, and the Shotcut engine interprets this as a live source with a duration of INT_MAX frames. I will have to add that dialog to the Playlist keyboard shortcuts. In the meantime, use + to get a duration prompt.