Opened 12 years ago
Last modified 3 years ago
#1452 reopened enhancement
image2 to support %t
Reported by: | burek | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | avformat |
Version: | git-master | Keywords: | image2 |
Cc: | OmegaPhil@startmail.com, rogerdpack@gmail.com | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Parameter %t in the output file name (just like %d) could be used to store the time stamp info of the current frame being written in the file. It could follow the same syntax like %d for formatting.
It also might be used as an input parameter, but the list of matching input files would have to be sorted first, I guess, to have a correct sequence of input files.
Attachments (2)
Change History (13)
comment:1 by , 12 years ago
Component: | undetermined → avformat |
---|---|
Keywords: | image2 added |
Status: | new → open |
comment:2 by , 12 years ago
Yes, I guess the ticket #1969 is a duplicate of this ticket (this one was opened 7 months ago).
The idea is just to have a way to use the time stamps rather than the list of sequential numbers, in the input/output file name. The code for the input files might be a bit trickier than the code for the output output, but I guess it can be solved using file globing (replacing %t with *) or similar filtering.
follow-up: 4 comment:3 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
Version: | unspecified → git-master |
I believe this was implemented by Ramiro Polla in 454c89dd
comment:4 by , 11 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Replying to cehoyos:
I believe this was implemented by Ramiro Polla in 454c89dd
No, that commit allows to set the system time in the output file name, it's not the same as the timestamp, and only in the output.
comment:5 by , 9 years ago
Cc: | added |
---|
comment:6 by , 8 years ago
Cc: | added |
---|
by , 7 years ago
Attachment: | 0001-Added-the-option-to-extract-images-with-timecode-as-.patch added |
---|
Fix for %t as timestamp
comment:11 by , 3 years ago
I tried the old patch with new locations but first failed in building.
Part of this is because the patch locations are pretty old and another is that I know nothing about C.
I see that there were some API changes in APIchanges#L884
2016-04-11 - 6f69f7a / 9200514 - lavf 57.33.100 / 57.5.0 - avformat.h Add AVStream.codecpar, deprecate AVStream.codec.
which causes some errors in libavformat/img2enc.c
for the line:
AVCodecContext *codec = stream->codec;
But looking at this line I don't understand what the added AVCodecContext *codec
was trying to do here since I don't see it referenced elsewhere.
I also came across this Changelog#L1236 line from 2011 which shows
AVCodecContext deprecated. Codec private options should be used instead.
So I have no idea what that is about, considering that it's before this patch was created it can likely be ignored.
Removing that line all together did not cause any immediate issues AFAICT.
I was able to build it with a modified patch and tested with
ffmpeg -skip_frame nokey -i test.mp4 -vsync 0 -r 30 -f image2 thumbnails-%t.png
NOTE: There was a bug with the patch in that the first frame would be missing the timestamp.
I suspect this was caused by
if (ts < 1) goto fail;
So I changed the 1
to a 0
.
This seemed to fix the issue with my command and hopefully has no negative implications but I don't promise anything.
by , 3 years ago
Attachment: | 0001-Added-the-option-to-extract-images-with-timecode-as-v2.patch added |
---|
Replying to burek:
This looks a lot like #1969.