22 May '13 - 08:57 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: How to split file when either transcoding or recording?  (Read 632 times)
renzska
Posts: 22


« on: 23 Sep '09 - 19:36 »
Reply with quoteQuote

I'm wondering what the best way is to split one file into smaller files during transcoding and during recording.  I need both methods because my software allows both methods.

For the recording, I can do the split by starting a new recording at the specified interval, but I was wondering if there was a better way to do it post recording?

Is it possible to do this when transcoding and if so, how?

Thanks,

John
Logged
Ian @ un4seen
Administrator
Posts: 15259


« Reply #1 on: 24 Sep '09 - 17:47 »
Reply with quoteQuote

You could use BASS_SYNC_POS syncs to achieve what you want, eg. set a sync at a point that you want to split the encoding, and then in your callback function, stop the old encoder and start a new one. That can be applied to both recording and transcoding. It could look something like this...

QWORD syncbyte=BASS_ChannelSeconds2Bytes(handle, synctime); // byte position to sync/split at
BASS_ChannelSetSync(handle, BASS_SYNC_POS|BASS_SYNC_MIXTIME, syncbyte, SplitSyncProc, NULL); // set a mix-time POS sync there

...

void CALLBACK SplitSyncProc(HSYNC handle, DWORD channel, DWORD data, void *user)
{
BASS_Encode_Stop(channel); // stop the old encoder
BASS_Encode_Start(channel, ...); // start a new one
}
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines