#1452: image2 to support %t
-------------------------------------+------------------------------------
             Reporter:  burek        |                    Owner:  (none)
                 Type:  enhancement  |                   Status:  reopened
             Priority:  wish         |                Component:  avformat
              Version:  git-master   |               Resolution:
             Keywords:  image2       |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+------------------------------------
Comment (by Alex):

 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
 
[https://github.com/FFmpeg/FFmpeg/blob/06d174e289eb185f03a34a738965f0042f39c038/doc/APIchanges#L884
 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
 
[https://github.com/FFmpeg/FFmpeg/blob/dcb285d2b7d126c80fad6079400a904e813442c1/Changelog#L1236
 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.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/1452#comment:11>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to