Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
[Request] Output format TS (MPEG Transport Stream) #11498
Comments
|
I don't know anything about python but I have found in ffmpeg.py a method "run_ffmpeg_multiple_files". Inthere, options are added from the configuration args and the command line is extended with the input option ("-i") and the file name. So, all the input files come to the end of the command line and output options remain at the beginning. I think this is a valid request. |
The purpose of my issue is:
I've tried...
but this errors out because
-bsf:v h264_mp4toannexbis put in front of the input file, when in fact it should be inserted after' -i 'https://r4---sn-mn4vg5aa-5hns.googlevideo.com/......' -c copy.To be clear: to convert MP4 to TS the bitstream filter
-bsf:v h264_mp4toannexbis needed!I've also tried without
--external-downloader-args "-bsf:v h264_mp4toannexb". Youtube-dl then puts out a TS-file, but only because I forced it to with-o "%(title)s.ts". In the end the video is still a MP4-file, because of the-f mp4in the ffmpeg command line, which seems to be hardcoded in the source.--recode-video tscertainly wouldn't be an option, because this doesn't involve a recode/conversion, but just a special remux.--merge-output-format tscould be an option, but there's no merge required for-f 18in this case, because it's already a MP4-file.So I was actually looking for something like
--output-format tswhich then inserts-f mpegtsinstead of-f mp4. FFMpeg then automatically inserts-bsf:v h264_mp4toannexb.Better yet: FFMpeg is so smart that as long as you make sure the output file ends with the ts-extension, then
' -i 'https://r4---sn-mn4vg5aa-5hns.googlevideo.com/......' -c copy 'file:Amsterdam - Gewelddadige beroving toerist.ts'is enough. In the background FFMpeg automatically inserts-bsf:v h264_mp4toannexb -f mpegts. (I'm not sure whether--no-partshould be enabled for this or not)Why the request for TS as output format in the first place?
Because officially the only way to concatenate H.264 video's is when they're raw (*.h264), or in a MPEG Transport Stream container.