View Single Post
Old 15th Aug 2011, 12:50 am   #130
Karen O
Rest in Peace
 
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 787
Default Re: Simple memory card player idea

Hi Kat,

It is certain ffmpeg can generate raw audio because I've found script examples which do that for the purpose of catenating audio files (ffmpeg is used to generate multiple raw audio files that are then simply joined together using cat). This is a line lifted from such a script and is probably very close to what I need (I've tampered with it e.g. -ac 1 to request mono but I'm sure you can spot the tweaks that'll make it do what I need):

ffmpeg -i <inputfile> -vn -f u16le -acodec pcm_s16le -ac 1 -ar 40500 - > temp1.a < /dev/null &

On external clocking of PICs: you can most certainly clock them from an external clock, however, I have had great success locking PICs to externally provided clocks by using an L/C in place of the crystal and using a varicap to alter the PIC clock in response to a voltage.

I have used this to lock a PIC to a narrow band TV (32 line) waveform, and even to line lock a PIC to 625 line sync (the latest NBTVA newsletter has details of my single PIC 625-to-32 line standard converter that uses this). It works but would be even better if the phase detection was done by, say, the relevent parts of a 4046 (as I remember, the 4046 VCO can't go higher than about 12MHz so the L/C/varicap solves a problem here)

As for adding genlock to my CF player: I produce accurate 405 sync on a digital output. This could be sent into a 4046 along with the external sync waveform to generate a control voltage for the said L/C VCO. Don't know how you'd deal with frame sync though - genlock's not my forte. The CF player would need a 25MHz L/C which is something I haven't done before - for some reason I always find it necessary to have my PIC clocks running at around 18MHz.

I'll send you an example circuit if you like...

I'm guessing your 405 line output from a VGA port needs some kind of sync combiner to generate 405 line sync? Well, I think this would be an ideal application for a PIC - VGA line and frame sync in one side, 405 line sync out of the other! If you've done real time assembler for the Z80 you'll soon master the PIC - once you get used to it's restrictions.

BTW, ffmpeg seems to convert more than twice real time on my Dell Latitude laptop. This kinda proves that real time standard conversion can be done on a modern PC (I had ffmpeg converting a region 2 DVD rip to 376p for my CF player)
Karen O is offline