Using the lower level API, you can do this with ov_time_total.
ffmpeg,video-capture,alsa,aac,vorbis
Found a partial solution in using two separate ffmpeg processes, as suggested in this thread: https://trac.ffmpeg.org/ticket/615 Specifically, this comment: https://trac.ffmpeg.org/ticket/615#comment:13 The separate audio and video files will have to be put together, later. Recording video in ffmpeg and audio in Audacity was not useful due to sync problems, written up...
VorbisJava does exactly this. There is a reasonable example in the tools directory. https://github.com/Gagravarr/VorbisJava/blob/master/tools/src/main/java/org/gagravarr/vorbis/tools/VorbisCommentTool.java VorbisFile vf = new VorbisFile(new File(inFile)); Also, Java Sound API has an extensible service provider model. You can add OggVorbis as a provider. See How can I decode OGG vorbis data from a ByteBuffer?...