ffmpeg to join mp4 files
After upgrading from Mint 18 to Mint 19 (64bit) some of my ffmpeg scripts no longer work.
I've googled the error message and I cannot find a solution so here goes: Files CROPPED-36.mp4 and CROPPED-37.mp4 The script: Code:
ls CROPP*.mp4 | perl -ne 'print "file $_"' | ffmpeg -f concat -i - -c copy CROPP.mp4 Code:
[file @ 0x556f060a6000] Protocol 'file' not on whitelist 'crypto'! Code:
[ -e list.txt ] && rm list.txt I'm sure someone can help so thanks in advance |
I think it may have been due to this ffmpeg update:
https://ffmpeg.org/pipermail/ffmpeg-...ch/098694.html See https://blog.yo1.dog/fix-for-ffmpeg-...rror-for-urls/ for a solution, namely adding: Code:
-safe "0" -protocol_whitelist "file" |
Quote:
Code:
ls M*.mp4 | perl -ne 'print "file $_"' | ffmpeg -f concat -safe "0" -protocol_whitelist "file" -i - -c copy M-Joined.mp4 Code:
[pipe @ 0x56305401e9e0] Protocol 'pipe' not on whitelist 'file'! |
So just checking through my script I can't see why it's not working
I have these files: Code:
ls MOV*.avi Code:
ls MOV*.avi | perl -ne 'print "file $_"' Code:
file MOVI0003.avi Code:
ffmpeg -f concat -safe "0" -protocol_whitelist "file" -i - -c copy M-Joined.avi What does work is this: Code:
ffmpeg -f concat -i list.txt -c copy M-Joined.avi Code:
file MOVI0003.avi |
You need to add pipe to the whitelist.
|
Quote:
Code:
ffmpeg -f concat -safe "0" -protocol_whitelist "file,pipe" -i - -c copy "${FileName/ Code:
[mov @ 0x55db06663900] fatal error, input packet contains no samples Code:
ffmpeg -f concat -i list.txt -c copy M-Joined.mov Code:
file MOVI0003.mov Any ideas? Cheers |
Further investigation is a bit mystifying, basically the -f concat option works if you have an actual file. So can someone explain why one statement works and the other doesn't?
The folder contains: Code:
-rwxrwxrwx 1 charlie charlie 22503233 Nov 15 2017 CRP8.mp4 Code:
ls CRP*.mp4 | perl -ne 'print "file $_"' > LLL.txt | ffmpeg -y -f concat -i LLL.txt -c copy JOINED-CRP.mp4 Code:
ls CRP*.mp4 | perl -ne 'print "file $_"' | ffmpeg -y -f concat -i - -c copy JOINED-CRP.mp4 Code:
libswscale 4. 8.100 / 4. 8.100 Looking forward to an explanation, over to you guys and gals. |
Quote:
maybe you can use a here string instead of an actual file? |
Quote:
Both of these scripts worked on Mint 18 Code:
ls CRP*.mp4 | perl -ne 'print "file $_"' | ffmpeg -y -f concat -i - -c copy JOINED-CRP.mp4 Code:
ls CRP*.mp4 | perl -ne 'print "file $_"' > LLL.txt | ffmpeg -y -f concat -i LLL.txt -c copy JOINED-CRP.mp4 Thanks for your time anyway. |
Quote:
|
@GPGAgent: I don't have your answer but the last pipe in the following command seems useless to me:
Code:
ls CRP*.mp4 | perl -ne 'print "file $_"' > LLL.txt | ffmpeg -y -f concat -i LLL.txt -c copy JOINED-CRP.mp4 Code:
ls CRP*.mp4 | perl -ne 'print "file $_"' > LLL.txt && ffmpeg -y -f concat -i LLL.txt -c copy JOINED-CRP.mp4 |
Quote:
Some really knowledgeable people here and really helpful. |
Quote:
Thanks |
Quote:
So this now works fine: Code:
ls 19*.mp4 | perl -ne 'print "file $_"' | ffmpeg -protocol_whitelist "file,pipe" -f concat -i - -c copy JOINED-FIL.mp4 Cheers and thanks for your help and pointer to the solution |
All times are GMT -5. The time now is 03:41 PM. |