I finally found out how to do it!
ffmpeg -f concat -safe 0 -i VIDEOFILES.txt -filter_complex \
"[0:v] fps=32, scale=1920:1080, vflip, hflip, setpts=0.25*PTS, fifo [v0]; \
[0:v] fps=32, scale=1920:1080, vflip, hflip, setpts=0.25*PTS, fifo [v1];
[v0][v1]concat=n=2:v=1[out]" -map "[out]" -crf 14 -vcodec libx264 -vb 20M -loglevel error video_out_01.avi
- concat: concetrate files
- VIDEOFILES.txt: video files with path
included, eg. file '/path/a.mp4' (including file)
- fps=32, scale=1920:1080: drop to 32 frames, and reducing video resolution
- vflip, hflip: 180 degrees rotation of the video
- setpts=0.25*PTS: Four times speeder
- fifo: a ffmpeg filter that it says to wait frame
to be fully processed before it is given to the next process --- due
to some filter process frame quicker than others e.g. due to frame
- crf 14: High quality ensured (0 = uncompressed)
- vcodec libx264: codec to compress the video file
- vb 20M: video bitrate (a high one)
- loglevel error: ffmpeg output information only errors will be displayed
A) I tried to reverse the order of filters eg.
[0:v] setpts=0.25*PTS, fps=32, scale=1920:1080, vflip, hflip, fifo [v0]
However, it was extremely low.
The commands are executed seriasly? Then, why I must recode every frame, when only 1/4 of them will be kept? How can I do that in order to gain recoding speed?
B) Why I need FIFO eventually. This must be not the default behavior? All frames that are kept must be processed from all filters! Right? Why then ffmpeg drop frames without being processed? this is the meaning of FIFO? Right?