NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 55 56 57 58 59 … 93 Next »
Directshow MP3 File Writer filter?

 
  • 0 Vote(s) - 0 Average
Directshow MP3 File Writer filter?
bgowland
Offline

Posting Freak

West Yorkshire, UK
Posts: 4,583
Threads: 384
Joined: Dec 2004
#1
2006-05-25, 06:38 PM
I'm trying to put something together to record audio to MP3 files I'm using the default DirectShow File Writer which connects OK to the LAME Encoder output (viewing the Remote Graph with GraphEdit during a debug session) but I get 0KB files when I run it.

If I save the graph from the application and open it later in GraphEdit, the file writer is always disconnected and I can't manually reconnect (the filters couldn't agree on a connection type error) - not sure how I get it to connect programmatically. If I alter my code to use IPin.QueryAccept I get an HRESULT of 1 which I believe is S_FALSE (all definitions of S_OK I can find are for 0).

So what I'm asking (in my usual concise way Smile ) is - what sort of file sink can I use to record the MP3 output of the LAME encoder?

Cheers,
Brian
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,684
Threads: 767
Joined: Nov 2003
#2
2006-05-25, 06:43 PM
The default File Writer filter should work fine as an output for the LAME encoder. You could always try connecting the "GB-PVR Writer" filter to check.

The problem is probably occuring somewhere further upstream.
bgowland
Offline

Posting Freak

West Yorkshire, UK
Posts: 4,583
Threads: 384
Joined: Dec 2004
#3
2006-05-25, 07:32 PM
sub Wrote:The default File Writer filter should work fine as an output for the LAME encoder. You could always try connecting the "GB-PVR Writer" filter to check.

The problem is probably occuring somewhere further upstream.
Thanks. I'm seeing two things - if I take the saved graph and try to connect the GB-PVR Writer, I get the same error which suggests you are right about an upstream problem.

If I build the same graph by hand in graphedit, the GB-PVR Writer connects and records to file. If I try the default writer though, it still won't connect to the LAME Encoder.

I took the LAME encoder out and I can connect a GB-PVR Writer directly to the audio decoder PCM output but can't do the same with the default writer.

Something broke the default writer??? GraphEdit shows it as qcap.dll - not sure if that's right.

I did try the GB-PVR Writer programatically but couldn't figure out how to set the filename. With the default writer I cast to an IFileSinkFilter to use its SetFilename method but that didn't seem to work for the GB-PVR Writer - is this a 'trade secret'?

Cheers,
Brian
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,684
Threads: 767
Joined: Nov 2003
#4
2006-05-25, 07:46 PM
Quote:I did try the GB-PVR Writer programatically but couldn't figure out how to set the filename. With the default writer I cast to an IFileSinkFilter to use its SetFilename method but that didn't seem to work for the GB-PVR Writer - is this a 'trade secret'?
That should work. Thats what I do.
bgowland
Offline

Posting Freak

West Yorkshire, UK
Posts: 4,583
Threads: 384
Joined: Dec 2004
#5
2006-05-25, 07:59 PM
sub Wrote:That should work. Thats what I do.
OK sorry. You're right. I was recounting what I'd seen at about 5am this morning when I was probabaly changing about 4 different things at the same time. Big Grin

I remember now that it DID set the filename but something I did later during connection reset it to have no filename. I couldn't work out what.

Anyway - having just tried again with a drastically reworked bit of code...the GB-PVR Writer connects, retains its filename and...records. Whayha!

Many thanks - sometimes it's just a case of bouncing ideas around which helps you take a fresh look at your code. Still don't understand why the default writer isn't working though.

Cheers,
Brian
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  How Does "Use S01E01 File naming format if possible" work puck64 7 5,313 2015-08-25, 10:21 AM
Last Post: puck64
  NEWA - using buffer file produced by /public/VLCService?Channel= bgowland 5 2,787 2014-01-02, 06:36 AM
Last Post: bgowland
  Is the input file for pvrx2.exe -import unique to NextPVR? spinnaker 1 1,767 2013-10-08, 02:25 AM
Last Post: sub
  Accessing music file metadata in C# bgowland 6 3,282 2013-01-26, 05:14 AM
Last Post: bgowland
  File browsing - a big ask imilne 3 1,989 2010-11-04, 09:03 PM
Last Post: imilne
  Run Multiple File Conversions On Your 4 Core -Burn Your Processor luttrell1962 12 4,570 2010-03-25, 07:33 AM
Last Post: luttrell1962
  Using Windows file system shortcuts ACTCMS 0 1,799 2010-01-26, 11:45 PM
Last Post: ACTCMS
  Not looking in correct location for skin file scb147 4 2,208 2009-07-29, 06:26 PM
Last Post: scb147
  PlayAudioFile() 0KB file bug bgowland 1 1,566 2009-04-25, 09:27 PM
Last Post: sub
  Uninstalling VS breaks .hta file association bgowland 0 1,572 2009-04-09, 07:45 PM
Last Post: bgowland

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode