Discussion:
[FFmpeg-user] Concat with listing all files in command?
Ben
2018-11-17 16:36:16 UTC
Permalink
I want to concat various video files with ffmpeg (in WinOS). Therefore I used so far the following command:

ffmpeg.exe" -f concat -safe 0 -i "D:\clips\filelist.txt" -c copy "ffmpegconcatout.mp4"

Where D:\filelist.txt contains all filenames to concatenate.

Now I want to change the command so that no intermediate file is necessary any more.

How can I achieve this?

The following command does NOT work:

ffmpeg.exe" -f concat -safe 0 -i "D:\clips\firstfile.mp4" "D:\clips\secondfile.mp4" "D:\clips\thirdfile.mp4" -c copy "ffmpegconcatout.mp4"

Whats worng?

Ben
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with sub
Carl Eugen Hoyos
2018-11-17 16:42:09 UTC
Permalink
Post by Ben
I want to concat various video files with ffmpeg (in WinOS). Therefore I
ffmpeg.exe" -f concat -safe 0 -i "D:\clips\filelist.txt" -c copy "ffmpegconcatout.mp4"
Where D:\filelist.txt contains all filenames to concatenate.
Now I want to change the command so that no intermediate
file is necessary any more.
No intermediate file is used in above command, you simply have
to provide the names of the files you want to concatenate.

It is possible with some shell magic to pipe the file names
into the ffmpeg command but above solution is usually
simpler.

$ echo "file file1" | ffmpeg -f concat -i -
but you need a linebreak for more files, and I don't know
how to do it in a Windows shell.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-use
Ben
2018-11-19 14:49:07 UTC
Permalink
Post by Carl Eugen Hoyos
No intermediate file is used in above command, you simply have
to provide the names of the files you want to concatenate.
Hmm, filelist.txt IS an INTERMEDIATE file! I wrote all the filenames (line
by line) to concatenate into this file and it works. However I want to omit
it and use a cmdline only.

I cannot believe that there is no way (WITHOUT piping) to concat multiple
files on cmdline.

Maybe I have to delimit them by colons?




--
Sent from: http://www.ffmpeg-archive.org/
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-u
Carl Eugen Hoyos
2018-11-19 14:54:37 UTC
Permalink
Post by Ben
Post by Carl Eugen Hoyos
No intermediate file is used in above command, you simply have
to provide the names of the files you want to concatenate.
Hmm, filelist.txt IS an INTERMEDIATE file!
By definition, when talking about transcoding multimedia files, an
intermediate file is something else than a list of input files.

There also is a concat filter, it may or may not work for your
use-case.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org w
Moritz Barsnick
2018-11-19 16:01:40 UTC
Permalink
Post by Ben
Hmm, filelist.txt IS an INTERMEDIATE file! I wrote all the filenames (line
by line) to concatenate into this file and it works. However I want to omit
it and use a cmdline only.
Similar to what Carl Eugen mentioned, I would call it a temporary file.

Unix's bash (and other shells) provides "process substitution" for
this. On Windows, PowerShell apparently can do something similar. I
found this:

https://serverfault.com/q/688645
Post by Ben
Maybe I have to delimit them by colons?
No, as ffmpeg hasn't implemented that.

Cheers,
Moritz
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ff
Micael Silva
2018-11-19 16:13:28 UTC
Permalink
Post by Ben
I want to concat various video files with ffmpeg (in WinOS). Therefore I
ffmpeg.exe" -f concat -safe 0 -i "D:\clips\filelist.txt" -c copy "ffmpegconcatout.mp4"
Where D:\filelist.txt contains all filenames to concatenate.
Now I want to change the command so that no intermediate file is necessary any more.
How can I achieve this?
ffmpeg.exe" -f concat -safe 0 -i "D:\clips\firstfile.mp4"
"D:\clips\secondfile.mp4" "D:\clips\thirdfile.mp4" -c copy
"ffmpegconcatout.mp4"
Whats worng?
Ben
Did you tried ffmpeg -i "concat:file1.ts|file2.ts|file3.ts" ?
But remember that concat input only accepts "headless" containers like mpg
or ts, mp4 isn't one of them.
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with s
Ben
2018-12-04 08:13:46 UTC
Permalink
Post by Micael Silva
Did you tried ffmpeg -i "concat:file1.ts|file2.ts|file3.ts" ?
But remember that concat input only accepts "headless" containers like mpg
or ts, mp4 isn't one of them.
I need exactly such a command but for MP4s.

According to your comment ffmpeg does not offer such a feature.
Since this is base function of video processing I suggest to introduce such
a operation for ALL types of videos.





--
Sent from: http://www.ffmpeg-archive.org/
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with subject "unsub

Loading...