linux – FFmpeg incompatibility – Super User

I start doing my final project with raspberry, in this step professor asked me to take a video with raspberry pi B3+ and convert some feature like codec and container in the raspberry side and then stream it. to do this I use the following command

1.raspivid -t 5000 -o video1.h264

2.ffmpeg -i video1.h264 -c:v vp9 vid1.mp4

3.ffmpeg -I vid1.mp4 -c copy -listen 1 -f mp4

but unfortunately, FFmpeg is not able to stream it while if I write AVI instead of mp4, there would be no problem and it will easily stream.

I would greatly appreciate it if someone can tell me what is the problem and how can I solve it.