Rain_1
26th January 2013, 18:25
Hey there.
I've been doing some .TS captures from my Cable Box while I'm out so I can watch later and I'm running into a weird problem that I'm sure can easily be solved.
Long story short, after I captured the .TS, I guess because the change between the actual Show I'm capturing and the commercials, the audio proprieties change during the stream (let's say, it goes from Mono to Stereo, or it changes sample rate).
After I capture those Streams (they're MPEG2 video streams), I run them through dgmpegdec, which spits out a usable d2v (which I load on avisynth with mpeg2source) and a .mp2 audio file (which I load with bassAudioSource), and I've been really successful in editing this video with this technique. Here's an .AVS sample:
http://pastebin.com/BdxgWu2z
As you can see, I do all the trimming on the .avs file itself (with AvsP help). It usually works, but sometimes, and I can't explain why, I'll lose audio between trims. If it's an exceptional day, I won't have audio for the entirety of the Stream.
I think it's important to notice that, when I don't have any audio issues, the Delay informed by dgmpegdec on the audio filename syncs the audio perfectly.
Since my only issue is audio, I tried using NicMPG123Source as the audio plugin. With Nic plugin, I get audio. However, the audio timing is all messed up - the original audio delay reported by dgmpegdec no longer works and I have to manually fix the audio delay. Since I have no basis of the sync issues, it becomes a very tiresome proccess of manually changing the audio on the .AVS script, re-encoding the audio, muxing it with the already encoded video and trying to figure out the best option.
I also tried extracting the .mp2 audio directly from the .TS with ffmpeg too and using that instead, and that usually works perfectly with BassAudio, but then again the sync is off and using the sync provided by dgmpegdec doesn't work and i'm back at manually syncing audio and video.
Here's FFMPEG Output when converting the file (this one is not pretty to look at, but the information is there if you squint real hard):
http://pastebin.com/sXLTPK22
I've tried doing most of the cutting on dgmpegdec, but I noticed I keep getting more issues if I cut the file before. So I just load the entire .TS on avisynth and I get less audio missing problems, but they still exist.
I also tried loading the secondary audio track from the .TS, but the problems are there as well. I've tried running the .TS through some other .TS demuxing programs, but this is the best stup i've came up with, that gives me less issues, but it's still not perfect.
So, what I'm really asking is: Is there any audio plugin that won't freak out when the audio format it's reading changes and can work accordingly?
Or, maybe, is there some other proccess that I can extract this audio from the .TS and keep it synced, while I trim excess video off inside the .AVS file itself?
I know this is a big one, and I can provide samples of the .TS file if required - except I don't know which parts you would need? I can provide the .mp2s as well.
Any help is appreciated.
I've been doing some .TS captures from my Cable Box while I'm out so I can watch later and I'm running into a weird problem that I'm sure can easily be solved.
Long story short, after I captured the .TS, I guess because the change between the actual Show I'm capturing and the commercials, the audio proprieties change during the stream (let's say, it goes from Mono to Stereo, or it changes sample rate).
After I capture those Streams (they're MPEG2 video streams), I run them through dgmpegdec, which spits out a usable d2v (which I load on avisynth with mpeg2source) and a .mp2 audio file (which I load with bassAudioSource), and I've been really successful in editing this video with this technique. Here's an .AVS sample:
http://pastebin.com/BdxgWu2z
As you can see, I do all the trimming on the .avs file itself (with AvsP help). It usually works, but sometimes, and I can't explain why, I'll lose audio between trims. If it's an exceptional day, I won't have audio for the entirety of the Stream.
I think it's important to notice that, when I don't have any audio issues, the Delay informed by dgmpegdec on the audio filename syncs the audio perfectly.
Since my only issue is audio, I tried using NicMPG123Source as the audio plugin. With Nic plugin, I get audio. However, the audio timing is all messed up - the original audio delay reported by dgmpegdec no longer works and I have to manually fix the audio delay. Since I have no basis of the sync issues, it becomes a very tiresome proccess of manually changing the audio on the .AVS script, re-encoding the audio, muxing it with the already encoded video and trying to figure out the best option.
I also tried extracting the .mp2 audio directly from the .TS with ffmpeg too and using that instead, and that usually works perfectly with BassAudio, but then again the sync is off and using the sync provided by dgmpegdec doesn't work and i'm back at manually syncing audio and video.
Here's FFMPEG Output when converting the file (this one is not pretty to look at, but the information is there if you squint real hard):
http://pastebin.com/sXLTPK22
I've tried doing most of the cutting on dgmpegdec, but I noticed I keep getting more issues if I cut the file before. So I just load the entire .TS on avisynth and I get less audio missing problems, but they still exist.
I also tried loading the secondary audio track from the .TS, but the problems are there as well. I've tried running the .TS through some other .TS demuxing programs, but this is the best stup i've came up with, that gives me less issues, but it's still not perfect.
So, what I'm really asking is: Is there any audio plugin that won't freak out when the audio format it's reading changes and can work accordingly?
Or, maybe, is there some other proccess that I can extract this audio from the .TS and keep it synced, while I trim excess video off inside the .AVS file itself?
I know this is a big one, and I can provide samples of the .TS file if required - except I don't know which parts you would need? I can provide the .mp2s as well.
Any help is appreciated.