Concat with listing all files in command?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Concat with listing all files in command?

Ben Stover
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
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Concat with listing all files in command?

Carl Eugen Hoyos-2
2018-11-17 17:36 GMT+01:00, Ben <[hidden email]>:

> 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.

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
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Concat with listing all files in command?

Ben Stover

> 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
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Concat with listing all files in command?

Carl Eugen Hoyos-2
2018-11-19 15:49 GMT+01:00, Ben <[hidden email]>:
>
>> 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
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Concat with listing all files in command?

Moritz Barsnick
In reply to this post by Ben Stover
On Mon, Nov 19, 2018 at 08:49:07 -0600, Ben wrote:
> 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

> Maybe I have to delimit them by colons?

No, as ffmpeg hasn't implemented that.

Cheers,
Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Concat with listing all files in command?

Micael Silva
In reply to this post by Ben Stover
On Sat, Nov 17, 2018 at 2:36 PM Ben <[hidden email]>
wrote:

> 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
>

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
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Concat with listing all files in command?

Ben Stover
> 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
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".