[FFmpeg-trac] #6816(undetermined:new): Combine "vidstabdetect" or "vidstabtransform" with scene detection

FFmpeg trac at avcodec.org
Wed Nov 8 00:56:17 EET 2017


#6816: Combine "vidstabdetect" or "vidstabtransform" with scene detection
-------------------------------------+-------------------------------------
             Reporter:  JouMxyzptlk  |                    Owner:
                 Type:  enhancement  |                   Status:  new
             Priority:  wish         |                Component:
              Version:  unspecified  |  undetermined
             Keywords:  libvidstab   |               Resolution:
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------

Comment (by JouMxyzptlk):

 The script workaround for now:

 Replaces one "out of whack" line, matching any three digit LM block value
 is a quite cheap approach, but it works:

 {{{
 sed -re "s/(Frame .[0-9] ).*LM\ [0-9][0-9][0-9].*/\1\(List 0 \[\]\)/g"
 transform1.trf > transform2.trf
 }}}

 Replaces three lines, the one before and the one after:

 {{{
 sed -re "1N;$!N;s/(Frame .[0-9] )(.*)(Frame .[0-9] ).*LM\
 [0-9][0-9][0-9].*(Frame .[0-9] )(.*)/\1(List 0 \[\]\)\n\3\(List 0
 \[\]\)\n\4\(List 0 \[\]\)/;P;D" transform1.trf > transform2.trf
 }}}


 Different approach for three lines:

 {{{
 sed -re ":a; $q; N; s/(Frame .[0-9] )(.*)(Frame .[0-9] ).*LM\
 [0-9][0-9][0-9].*(Frame .[0-9] )(.*)/\1(List 0 \[\]\)\n\3\(List 0
 \[\]\)\n\4\(List 0 \[\]\)/; 3,${P;D}; ba" transform1.trf > transform2.trf
 }}}


 Latter version allows going insane to replace 5 lines, two before and two
 after...

 {{{
 sed -re ":a; $q; N; s/(Frame .[0-9] )(.*)(Frame .[0-9] )(.*)(Frame .[0-9]
 ).*LM\ [0-9][0-9][0-9].*(Frame .[0-9] )(.*)(Frame .[0-9] )(.*)/\1(List 0
 \[\]\)\n\3\(List 0 \[\]\)\n\5\(List 0 \[\]\)\n\6\(List 0 \[\]\)\n\8\(List
 0 \[\]\)/; 5,${P;D}; ba" transform1.trf > transform2.trf
 }}}


 It's been quite a while since I played with sed so deeply...

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6816#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list