Support for Seeking to a frame?
- Dominant language
- Python
- Stars
- 538
- Forks
- 112
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
Are there any plans to support seeking to a specific frame?
I'm writing a small app that shows a song's Hz spectograph and, and allows play/pausing of the song along with the spectograph. Play/pause works great, but I'd like a way to reset what frame we're reading from. (That would allow to the user to "stop" and set the time to 0, or click on a spot and seek to that spot.)
I found that the OSX AudioToolbox backend has `ExtAudioFileSeek`: https://developer.apple.com/documentation/audiotoolbox/1486821-extaudiofileread?language=objc
And Python `aifc` has:
```
aifc.rewind()
aifc.setpos(pos)
```
https://docs.python.org/3.6/library/aifc.html
Backends to investigate:
- [x] `rawread.py`/`aifc` (has `aifc.setpos`)
- [x] ffdec `ffmpeg` (has a [seek option](https://trac.ffmpeg.org/wiki/Seeking) on command start. Audioread might have to close & restart the channel on seek?)
- [x] `gstdec.py`/`Gstreamer` / `pygobject` (has `IOChannel.seek`)
- [x] `macca.py`/`AudioToolbox` (has `ExtAudioFileSeek`)
- [x] `maddec.py`/`MAD`/`pymad` (has `seek_time`)
Contributor guide
No contributing guide indexed for this repository
Research direction
Review rawread.py/aifc, ffdec/ffmpeg, gstdec.py/GStreamer, macca.py/AudioToolbox, and maddec.py/MAD to compare the seeking capabilities listed in the issue. Define how seeking to a frame should work across these backends, including reset and arbitrary-position use cases, then verify that the behavior is consistent where each backend supports it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- audio-video-rtc, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100