Open collinsmith opened 5 years ago
Need to attach a debugger to ffmpeg to generate test data from input that I can test codec against, otherwise this is very difficult. Video codec doesn't seem as difficult as audio codec -- requires custom Huffman coding tree though.
fe7cdc4caa398fc24ccd9640138ad18271b40793 gdx-video
was updated and looks like it's being developed again. I wrote a sample tool video player which can play webm videos with vp8 video codec and vorbis audio codec. Did not work with raw bik
files even though ffmpeg can play them fine in vlc. Maybe need to pass args to gdx-video
native wrapper or convert the stream somehow. Worst case, at least there's a functioning video player in libgdx now.
Format for video files are bink video (.bik) which is supported by ffmpeg. Existing library gdx-video uses ffmpeg wrapper, but in my tests doesn't work with a bik (I couldn't get it to work with other formats either), and that project appears to be abandoned, so it might be best to develop out my own. VLC which uses ffmpeg plays the files fine. I suppose I can try and write my own decoder in java (assuming bink file format is open sourced), but I'm concerned that will be too slow, at least for mobile.
This isn't a high priority issue -- I can live without cutscenes for now -- but I'd like to explore it in the future -- perhaps after looking into #8
Command I used to convert bik to mp4
ffmpeg -i BlizNorth640x480.bik out.mp4
I'll also note that the video files are provided with
640x146
and640x292
sizes, so if I need to, I can use the smaller res on mobile for faster streaming.