0

I am trying to make loop video on Android tablet which has ubuntu 15.04 installed in chroot. There are ffmpeg and all Linux tools are available.
The problem that I have very limited space and ffmpeg uses temp files to recode videos so consuming additional space. Actually i do not need any re-encoding only shrinking and concatenation. For example below command joins two files and sure keeping original ones

ffmpeg -f concat -i /tmp/join.txt -c copy out.mov

Next one cut fragment and remain original input.mov video

ffmpeg -ss 00 -i input.mov -t 90 -c:v copy -c:a copy out.mov

Is it really possible to accomplish such editing without keeping original files ? E.g. when editing taking place, in same time delete finished parts to preserve space.

UPD. According to below answers and my searches it is not possible. Thanks for participating.

0

To delete your unwanted source files after each successful FFmpeg operation, you can add script code to the end of your FFmpeg commands with a double ampersand. This way the source won't be deleted if FFmpeg errors out for some reason, but you should still be cautious... Nothing worse than wiping out your source before discovering you set the wrong seek or duration times when creating a clip.

Examples

This would delete the source vids listed in your "join.txt" file after you've created your concatenated video:

ffmpeg -f concat -i /tmp/join.txt -c copy out.mov && \
for DELVIDS in `awk '{print $2}' /tmp/join.txt`; do rm -f $DELVIDS; done

This would wipe out the 'input.mov' file after you've created your 90-second clip:

ffmpeg -ss 00 -i input.mov -t 90 -c:v copy -c:a copy out.mov && rm -f input.mov
  • Yes, i did the same in my bash script, anyway it keeps original files until editing finished. – Demontager Jun 29 '15 at 4:37
  • 1
    It needs to keep the original files until the operation is completed. In my experience, you can see what happens when you do something like this... ffmpeg a.mp4 -c:v libx264 -y a.mp4 With same input and output file it results a corrupted output file. So we can conclude that it is necessary to keep input files until the process completes. – Chamath Jun 29 '15 at 6:03
  • @Chamath, added updated summary to original question. – Demontager Jun 30 '15 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.