View Full Version : OggMux - enable delay function?
FlashCool
4th September 2002, 18:35
Hello,
I have (I hope) a simple question.
How can I use the delay feature in the OggMux GUI?
I think in the Windows application it is disabled, I can't set a value in the textbox. Maybe, the in command line mode it is possible to use it, but I would try in the GUI.
The new version og OggMux (0.9.2) has a configuration file, can I use this in the application or only in command line mode?
Koepi
4th September 2002, 19:15
FC,
hm, the search function is REALLY useful, you know, and as this is your first post, you sure forgot about forum rule no. 1 because there are so many rules....
It's not implemented.
To get sound delay, use besweet.
Regards,
Koepi
sillKotscha
4th September 2002, 21:01
Koepi,
you're so mean and cynical... this poor boy :D
sherpya
4th September 2002, 23:06
Originally posted by Koepi
To get sound delay, use besweet.
Regards,
Koepi
Hmm applying fisrt rule I've found:
Simply use BeSweet and enter as delay "-500" and convert the ac3 to wav or ogg/vorbis.
Really 500 ms cut is not a big deal but if an audio movie starts really at -500 ms, cutting would cut even audio. Obiviously this happens not really often (Never seen audio this way).
I think delay should be implemented directly into tobias ds filter
(I don't known right now if it's implemented).
So tagging the audio with delay should not be so hard :P
Koepi
4th September 2002, 23:52
Serhpya,
if it's all so easy then go on and fetch OggMux sources, implement the graph as a timeline and we're done, easy as this. Ah, and don't forget to send me your SF ID then so I can add you as project member/admin (you'd need to release the stuff ;) ).
:P
Hehehe. Well,
Regards,
Koepi
sherpya
5th September 2002, 02:43
hehe I known your reply just writing my post ;P
In previous post you said: don't tell about implementing strange features if you aren't going to code it :P
Mine is not a strange feature...
However I don't kown if it's supported into tobias filters... and I need to study ogm specs.
I've never seen oggmux sources.. but now I'm just curious, I will download sources
Koepi
5th September 2002, 04:11
There's a feature in dshow called timeline.
You've to create the filters and then... well, that's how far I got with it, I never found the motivation to solve the problem like this (knowing that dshow does a bad job on almost everything) intrinsic, if it can be easily done with external tools. This isn't ignorance, but saving precious time ;)
Maybe you'll find this link useful:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dx8_c/directx_cpp/htm/creatingtimelineobjects.asp
(hell, their pathnames are odd ;) )
I hope you'll finally get a working graph out of it (well, and as corrctly as can be please ;) )
Thanks for your help,
best regards,
Koepi
PS: where's your SourceForge ID? Well, please think of it when sending the source ;)
sherpya
5th September 2002, 05:13
I've seen it on msdn but seams more difficult as expected. I've got another idea but I don't known if can works... I'm still trying.
I want to "seek" audio stream before the main graph starts to mux without resetting the position.
Maybe is wrong because ogg stream in mux chains will take no data.
(Even with timeline should occur this).
I think this feature should be codec into ds filter and "selected"
adding a delay tag just like the language.
However I will try timelines..
A timeline object should be created for each track then I've seen somewhere browsing msdn (argh... a pain operation) that RendeFile or another object of IGraphBuilder uses directly a timeline obj for sync
My first try was like this:
for (int c=0; c<m_soundtracklist.GetCount(); c++) {
set_soundtrack(c);
(m_soundtrack1.Right(4)==".wav")?EncodeFile(m_soundtrack1, m_quality/100, "Soundtracksource", "Language", m_language1, pGraph, pOggMux):RenderFile(m_soundtrack1, "Soundtracksource", "Language", m_language1, pGraph, pOggMux);
{
IPin *audioPin = NULL;
hr = pOggMux->FindPin(L"Soundtracksource", &audioPin);
if (FAILED(hr))
MessageBox("Can't find SoundTrackSource outpin setting Delay!", "Error!", MB_OK);
else
{
hr = audioPin->QueryInterface(IID_IMediaSeeking, (void**)&pMediaSeeking);
if (FAILED(hr))
MessageBox("Can't use SoundTrackSource for setting Delay!", "Error!", MB_OK);
else {
REFERENCE_TIME rtTotal, rtNow = 0;
hr = pMediaSeeking->SetTimeFormat(&TIME_FORMAT_MEDIA_TIME);
rtNow = (REFERENCE_TIME) m_soundtrack_delay * 10^6; // nano to milli?
hr = pMediaSeeking->GetDuration(&rtTotal);
hr = pMediaSeeking->SetPositions(&rtNow, AM_SEEKING_AbsolutePositioning, &rtTotal, AM_SEEKING_AbsolutePositioning );
audioPin->Release();
}
}
}
}
This way I cant find output pin of audio file, I've tried with outPin insted by I suspect is OggMuxer ouput pin and a delay will delay audio and video
Btw I need to sleep tomorrow I will figure out how attach audio file pin and see if it is totally bad, then I'll take a look at timeline objects.
Too much time from my last dshow experience... I've to take off russet (lol this is an Italian slag translated in english... I don't known if does it "work")
edit: I should try FindPin for "Audio 31485" what is this number?
Koepi
5th September 2002, 05:19
Uhm, sherpya,
i doubt any other thing than timeline will work for delay. But it's nice to see that's not just me who has a big "?" in his face when looking at that stuff ;)
Your help is very much appreciated, I hope you get it to run!
Good night, sweet dreams and sleep well,
best regards,
Koepi
sherpya
5th September 2002, 12:31
I've found the right pin:
IPin *audioPin = NULL;
IBaseFilter *pAudioSource = NULL;
hr = pGraph->FindFilterByName(L"Ogg Splitter", &pAudioSource);
hr = pAudioSource->FindPin(L"Audio 31485", &audioPin);
And the delay seams to work, just not as expected, sometimes video freezes on the first frame, but if seeked works... Maybe the main position is taken not from the video...
Koepi
5th September 2002, 12:40
Sherpya,
doing this without timeline is inproper and results in those things you saw already. Strange that it sometimes seem to work correctly without!
Don't get me wrong, I appreciate your help and like it, but this implementation is not "stable" and will result in plenty, unneccessary bugreports again - and in user frustration because their files don't work correctly.
Well, just in case, we could offer such a binary, something like 0.9.2.5 - but i'd still prefer a timeline model as there you can properly set the delay.
Thanks for your great work sherpya,
best regards,
Koepi
sherpya
5th September 2002, 13:30
Yes you are right but implementing with timeline would make a change over all the graph, the help says to add a timeline group and then add sources (audio and video). I don't known if this is applicable here... OggMuxer is used to mux the streams for now, and according the examples muxing of video and audio in a timeline group obj is made by the timeline group obj not by oggmuxer. Btw it should be a way to stack oggmux with a timeline obj... I'm still studing the timeline objs
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.