I would like to modify my code to convert a folder with FFMPEG instead of converting a whole list of files, and loop this list:
#!/bin/bash
while true;
do
ffmpeg -re -i /myfolder/10.mp4 -vcodec copy -acodec copy -r 30 -s 1280x720 -f flv rtmp://localhost/live/output;
ffmpeg -re -i /myfolder/11.mp4 -vcodec copy -acodec copy -r 30 -s 1280x720 -f flv rtmp://localhost/live/output;
ffmpeg -re -i /myfolder/12.mp4 -vcodec copy -acodec copy -r 30 -s 1280x720 -f flv rtmp://localhost/live/output;
ffmpeg -re -i /myfolder/13.mp4 -vcodec copy -acodec copy -r 30 -s 1280x720 -f flv rtmp://localhost/live/output;
done
my code for convert the folder :
#!/bin/bash
while true;
do
stream1=/myfolder/*.mp4
ffmpeg -re -i $stream1 -vcodec copy -acodec copy -r 30 -s 1280x720 -f flv rtmp://localhost/live/output;
done
This code produces an error:
File '/myfolder/11.mp4' already exists. Overwrite ? [y/N]