Jump to content

Need help with ffmpeg concat function on .ts files. No audio :/

Located

Dear Linus Tech Forum members,

 

I have been struggling with this problem for a while now.

I made a tool where people can download Past broadcasts from twitch easily. You can find, download and convert the broadcasts.

 

Twitch has 2 different systems for the vods, the old system, downloads as 30 minute flv clips and the new system is based on HLS and uses 1 minute .ts files. The problem is with the latter.

 

So when you download a broadcast, it often comes in 600 .ts files, which i concat with ffmpeg to a mp4 file so it can be edited easily.

everything works etc, but the problem comes in with twitches copyright muting function. They mute per 1 minute timeframe (1 ts file) if a copyrighted song is playing yes or no. So when the first.ts file is muted, the whole output will be muted because ffmpeg detects no audio stream in the file so it doesnt do it for all files. 

 

If some random .ts file in the middle doesnt have audio, it isnt a big deal because it will just not have audio, but ffmpeg will still look for it, also in the next files. 

 

so i hope i made my problem clear, the command i use is: 

ffmpeg.exe -f concat -i concatdata.txt -bsf:a aac_adtstoasc -y -c copy output.mp4

 

The concatdata.txt contains the paths to the .ts files. 

 

I hope anyone here has an idea how to circumvent this issue, because for now its really annoying to keep doing it manually, changing the start file etc. 

 

Kind regards,

 

Marco Nijholt

Running: i7 4770k cooled by Swiftech H220 (Delided and Lapped) (5ghz+ capable) - MSI Z87 mPower MaX - 4x 4gb 2400mhz corsair vengeance cl10 - 660Ti Graphics in a Fractal R4

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×