But it does not limit the output from the current clip. The duration keyword is badly named and it basically sets the offset for the starting timestamp for the next clip with respect to the starting timestamp of the current clip. So, were going to use the dshow FFmpeg input source. To limit the duration using the concat demuxer, set outpoint (with value inpoint + intended duration). It was suggested in ticket 5686 that the cat command could be used in cases where the file list is too long and the concat protocol works but the concat demuxer does not. FFmpeg can take input from Directshow devices on our windows computer. I only worry about the limit on command length. I don't mind using the concat protocol instead of the concat demuxer. Could this problem be caused by bad splitting of the ts files? I read in ticket 2801 that the concat demuxer needs the files to be split cleanly on keyframes. Running ffprobe -show_format -show_streams on both of the files and comparing the outputs shows only the following differences: I have tried the command without the +genpts flag as well, but there is no change in the resulting mkv.Ĭoncatenating the ts files with the concat protocol results in an mkv with the correct duration and no pauses in the picture during playback.įfmpeg -fflags +genpts -i "concat:$file_list" -c copy output.mkv Also, the picture periodically freezes for a very small fraction of a second, but I don't detect any pause in the audio I suspect these stutters are the source of the extra 8 seconds. The result is a playable mkv, but the duration is 8 seconds longer than the duration of the original ts stream. Due to limits of each concatenation method we implemented it by filter.Concat demuxer requires that all files must have the same streams (same codes, time. Even with aac audio, if you ensure that the encoding of every video is exactly identical including both the codecs, video framerate, resolution, aspect ratio and everything to do with the audio, you can use the demuxer with -vcodec copy and -acodec copy and the operation is almost instantaneous. I concatenate some ts files with the concat demuxer and create a mkv file using stream copying with the following command:įfmpeg -f concat -safe 0 -fflags +genpts -i file_list.txt -c copy output.mkv
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |