Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Concat Protocol #6

Closed
Spartan-Hex-Shadow opened this issue Jul 8, 2022 · 8 comments
Closed

Question: Concat Protocol #6

Spartan-Hex-Shadow opened this issue Jul 8, 2022 · 8 comments

Comments

@Spartan-Hex-Shadow
Copy link

Spartan-Hex-Shadow commented Jul 8, 2022

Hi there,

Had a question. Is there a filter for using the Concat Protocol rather than the Concat Demuxer (which is what I think the current ConcatFilter class does)?

Looking at Concat Protocol here: https://trac.ffmpeg.org/wiki/Concatenate

@tqk2811
Copy link
Owner

tqk2811 commented Jul 8, 2022

Not support and i not recommend use CP (concat protocol)

You can add as multi inputs and concat in filters.


If you still want CP, try this
new VideoFileInput("concat:file1|file2")

@tqk2811
Copy link
Owner

tqk2811 commented Jul 8, 2022

oh i was write it here, you can custom yourself for video

public static ImageFilesConcatInput ConcatProtocol(IEnumerable<string> files)

@Spartan-Hex-Shadow
Copy link
Author

oh i was write it here, you can custom yourself for video

public static ImageFilesConcatInput ConcatProtocol(IEnumerable<string> files)

Does the Concat Protocol allow us to do this? From https://trac.ffmpeg.org/wiki/Concatenate

" using intermediate files
If you have MP4 files, these could be loss lessly concatenated by first transcoding them to MPEG-2 transport streams. With H.264 video and AAC audio, the following can be used:

ffmpeg -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i input2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts" -c copy -bsf:a aac_adtstoasc output.mp4 "

@tqk2811
Copy link
Owner

tqk2811 commented Jul 9, 2022

Yes, but I don't recommend it.

@Spartan-Hex-Shadow
Copy link
Author

Yes, but I don't recommend it.

Alright. But just for our own sake, if we had to do it, how would we go about doing it with the ConcatProtocol method?

tqk2811 added a commit that referenced this issue Jul 11, 2022
@tqk2811
Copy link
Owner

tqk2811 commented Jul 11, 2022

VideoFilesConcatInput.ConcatProtocol( filesList );

@Spartan-Hex-Shadow
Copy link
Author

VideoFilesConcatInput.ConcatProtocol( filesList );

Awesome. This method uses temporary streams for the inputs and then concatenates those?

@tqk2811
Copy link
Owner

tqk2811 commented Jul 12, 2022

VideoFilesConcatInput.ConcatProtocol( filesList );

Awesome. This method uses temporary streams for the inputs and then concatenates those?

It same as -i "concat:intermediate1.ts|intermediate2.ts"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants