video - Finding frame sizes in an encoded bit stream -


I am using the HM12.1 reference code. I have to find frame size in bytes or KB from an encoded h.265 bit stream. I'm very new to video processing and I'm stuck in it. Pls help!

If you use the latest version, then it's as simple:

 < pkt_size  

Example:

Code for the rows starting with
  ffprobe -show_frames file.hevc  

View> $ ~ / Src / ffmpeg / ffprobe -show_frames BQMall_832x480_60_QP22.hevc | Grep pkt_size pkt_size = 67941 pkt_size = 12235 pkt_size = 13026 pkt_size = 12534 pkt_size = 13778 pkt_size = 13589 pkt_size = 13039 pkt_size = 12035 pkt_size = 12582 pkt_size = 13186 pkt_size = 15519 pkt_size = 15 930 pkt_size = 15616 pkt_size = 15311 pkt_size = 15430 Pkt_size = 14608 pkt_size = 14444 pkt_size = 18246

ffprobe is great and simultaneously with gnuplot you can produce good plots of frame size, e.g. Something like this:

Enter image details here

Currently This does not work for HVVC because Ffprope fails to detect the correct sled types, but hope will be done in the future

The code is to be used above:

  #! / Bin / bash # If the path is not in FFPROBE = / home / xxxx / src / ffmpeg / ffprobe # if path # FFPROBE = ffprobe cat & lt; & Lt; EOF & gt; /tmp/plot.txt # GNUPLOT "plot.txt" # Use the 3 lines below to set the #set terminal PNG size 1280,720 #set term PNG #setout output "bitrate" "title" $ (basename $ 1) set set "set xrange [2: *] set LMRGGIN 12 sets RMRGen 2 set grid set points 2 set label 1" I frames "set label 1 graph on graph .85, .96 TC LT1 set Set labels on label 2 "p frame" label 2 .85, .92tc left 2 set label label 3 "b frame" set Using 3. 1: 2 ICL RGB variable EOF awk 'BEGIN {FS = "=" OFS = "\ t" fnum = 0 using 3/8, .88 TC Left 3 plot' /tmp/column.dat 'on graph 3 } / Pkt_size / {size = $ 2} / pict_type / {sub (/ i /, "167116800 ($ 2) sub (/ p /," 65280 ", $ 2) sub (/ b /," 255 ", $ 2) sub (/ \? /, \ "65280", $ 2) type = $ 2} / coded_picture_number / {# sub (/ 0 /, fnum, $ 2) num = $ 2 # fnum = fnum + 1 print size, Type, number} '& lt; ($ {FFPROBE} -show_frames $ 1/2 & gt; / dev / null) & gt; / TMP / Column dot gnuplot -persist /tmp/plot.txt  

Update

The good people of JCT-VC have thought about this and its In the case, you get a binary called annexBbytecountStatic which does too much, just call it with a raw heave-bitstream as a single argument, using the above file as an example Do:

  $ ./annexBbytecountStaticd BQMall_832x480_60_QP22.hevc | Grape NumBytesInNALunit NumBytesInNALunit: 25 NumBytesInNALunit: 31 NumBytesInNALunit: 10 NumBytesInNALunit: 67,858 NumBytesInNALunit: 12231 NumBytesInNALunit: 13020 NumBytesInNALunit: 13,022 NumBytesInNALunit: 12530 NumBytesInNALunit: 13,774 NumBytesInNALunit: 13585 NumBytesInNALunit: 13035 NumBytesInNALunit: 12031 NumBytesInNALunit: 12,578 NumBytesInNALunit: 13,182 NumBytesInNALunit: 15,515 NumBytesInNALunit: 15926 Nanbitesinnlunit: 15612 NumBytesInNALunit: 15307 NumBytesInNALunit: 15,426 NumBytesInNALunit: 14604 NumBytesInNALunit: 14419 NumBytesInNALunit: 16,040 NumBytesInNALunit: 18,243 NumBytesInNALunit: 338,004 NumBytesInNALunit: 270,121 NumBytesInNALunit: 0 NumBytesInNALunit: 67,883  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -