Hello,
It took little bit longer than I expected. I had to learn Mixx and
FFMPEG inners and but them together. Now I think I have all settled down
and all the file that I have tested I worked fine (mp3/ogg/wav). Code is
uncommented and very cluttered (unclean..). I pushed it to Mixxx branch
if someone has time or motivation to test code..
I'll clean it up more in coming times. It also leaks memory because I
haven't got freeing right that fits for Mixxx and FFMPEG. Parsing tags
is not ready for prime time but you get most of them parsed (no
replaygain at the moment for example).
I have to test with MP4 and WMA.. I have compiled this with FFMPEG
0.11.1 but it should work on 0.10.x as the same (at least compille).
If you look at the code (like I assume you do). It'll read PCM to
QByteArray (QBuffer holds needed bytes and also bytes that we need to
get correct place) and then skip at right position in QByteArray and
then return it. It's not fancy but works.
There will be plenty to work on but I hope it'll go easier from this point.
Hope someone have time to test it,
Tuukka
On 07.09.2012 03:07, RJ Ryan wrote:
Hi Tuukka,
I attempted this a few years ago but could not figure out how to use
FFMPEG correctly. I'm happy that you're investigating!
In general, here is what you must satisfy to make a SoundSource:
* Seeking to a particular sample must be 100% accurate. The main
problem I had with FFMPEG is that I could not seek to a particular
sample, I could only seek to a rough stream time.
* Data must be output in 2-channel, 16-bit samples (even if the source
file is mono or multi-channel, you must convert to stereo)
If you look at the mess that is SoundSourceMp3 you'll find that we
build a seek-tree which record what sample each MP3 frame corresponds
to. This way we can rapidly jump to the closest frame, decode it, and
discard the appropriate number of samples to get to the exact sample
we desire from the seek.
It would be excellent if you made progress on this. I'd love to
discard almost all of our SoundSources in favor of FFMPEG.
Best regards,
RJ Ryan
On Thu, Aug 30, 2012 at 5:22 AM, Tuukka Pasanen
<tuukka.pasa...@ilmi.fi <mailto:tuukka.pasa...@ilmi.fi>> wrote:
Hello,
I've doing a little bit coding with mixxx and ffmpeg lately (works
with
newest ffmpeg). I get ffmpeg soundsource in shape (compiling and
almost
working sound) but because I don't really yet understand all the inner
things in Mixxx I ask these guestions:
I understand that soundsource I asked some amount of 16 bit PCM
data but
ffmpeg doesn't fit in. Decoded data
doesn't go as smooth as Mixxx wants. If anybody know what should I do.
Just drop fewer amount of data or do as
in mp3 little bit hackery.. that I didn't quite get yet ;).
Where to add more formats: like wma and aac that works with ffmpeg
just
fine? Documents say that method that is supposed
to tell what format are supported is evil.
Is this even wanted hacking? I've though it would be good to have
ffmpeg
in soundsource because of formats it supports.
I can't yet see if all the seeking things are fixed. I've been also
wondering if MLT or Gstreamer would be way to go
in Soundsource because ffmpeg is kinda diffucult to make work but
Gstreamer is easier (and support all the formats
that ffmpeg with plugin) same goes to MLT.
Sorry about not having patch but in the current state of code (because
playing it's not working correct).. if someone wants it i'll send it..
Thanks,
Tuukka
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond.
Discussions
will include endpoint security, mobile security and the latest in
malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org
Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
<mailto:Mixxx-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/mixxx-devel
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org
Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel