From: Johannes Maibaum <jmaibaum@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: [FFmpeg-devel] Working on an LTC source filter - can this be made seekable?
Date: Thu, 31 Aug 2023 21:35:18 +0200
Message-ID: <76fbb5b4-c39f-4884-8a5f-7cd514ba8d3f@gmail.com> (raw)
Hello,
as my first dive into the ffmpeg source, I am working on an
Linear/Longitudinal Time Code (LTC) source filter for ffmpeg using
https://github.com/x42/libltc here:
https://git.sr.ht/~jmaibaum/ffmpeg/log/ltc
The basics are working fine and turned out to be fairly easy to achieve,
even though I am still missing essential features, major refactorings,
and proper testing, before I would consider it ready for inclusion into
ffmpeg. I am planning to get there eventually once my free time allows.
Yet, I am now facing an issue where I am unsure if the plan to add the
ltcsrc as a libav source filter was correct in the first place?
One of the use-cases I have in mind for the ltcsrc filter involves
having it generate an LTC signal while playing another audio or video
file in sync, i.e. the LTC signal should of course always match the
current position of the audio/video file's playback position. It should
be possible to seek arbitrarily inside the video player, thus. the LTC
timecode being generated after a seek event signal must always stay in
sync to the new playback position of the audio/video file.
But apparently libav-filters are by design not supporting seek events at
all though, at least not from ffplay, where running
ffplay -f lavfi -i ltcsrc
and then trying to seek results in "error while seeking". This error
also happens with all other filters I tried using in the ffplay command
line above. Similar quick checks trying to use the filter from within
mpv resulted in an unseekable playback.
I can successfully send commands (via asendcmd) to change the timecode
being generated on the fly, but this feels like a bad workaround for the
use-case described above.
I took a brief look into other ffmpeg modules (codecs, formats,
devices), but from my current understanding a (source) filter is the
correct way to implement ltcsrc.
Thus, my question is: Can this use-case even be solved by implementing
ltcsrc as a filter? If not, how can I implement an ltcsrc that can be
used "like" a filter (i.e. supporting things like receiving commands to
change other parameters on the fly) in my use-case, but also supporting
seek events?
Cheers,
Johannes
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
reply other threads:[~2023-08-31 19:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=76fbb5b4-c39f-4884-8a5f-7cd514ba8d3f@gmail.com \
--to=jmaibaum@gmail.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git