Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is the bit rate of the video with some high-quality areas and some low-quality areas higher than that of the original input video? #30

Open
Cassie-yuxiao opened this issue May 26, 2021 · 0 comments

Comments

@Cassie-yuxiao
Copy link

Cassie-yuxiao commented May 26, 2021

Dear all,
Try to running the examples using the dockerized module:
xiaoyu@xiaoyu-virtual-machine:~/Desktop/360Transformations-master/transformation$ docker run --privileged --rm -v /home/xiaoyu/Desktop/360Transformations-master/transformation/examples:/home/trans360 trans360 trans -c Config_14.2.ini

The input video I used is input.mp4 provided by the website:
https://user-images.githubusercontent.com/64078936/119604871-605ff900-be22-11eb-9069-752b90eadd44.mp4

The following is the configuration file information for generating a video with some high-quality areas and some low-quality areas:

Config_14.txt

`[Global]
;output fps
fps=24
;Names of the Section for the layout flow: [[Equirectangular, CubeMap, FlatFixed], [Equirectangular, FlatFixed]] means: from Equirectangular to CubeMap to FlatFixed AND from Equirectangular to FlatFixed
layoutFlow= [["input.mp4", "Equirectangular", "EquirectangularTiled"]]
;if displayFinalPict is set, it will display the final picture of each flow for each input picture of the original video
displayFinalPict=false
;if not empty, a video will be recorded for each flow using the path + the file name given here (the file name will be unique per flow).
videoOutputName=output14_.mp4
;bitrate goal of the output video in kbps
videoOutputBitRate=0
;videoOutputName=
qualityOutputName =
; qualityToComputeList = ["MS-SSIM", "SSIM", "PSNR", "S-PSNR-NN", "S-PSNR-I", "WS-PSNR"]
qualityToComputeList = []
;["S-PSNR-NN", "S-PSNR-I"]
nbFrames= 25
startFrame= 0

[Equirectangular]
;type of the layout: equirectangular is the state-of-the-art equirectangular layout
type=equirectangular
upscale=false
;Width of the reference equirectangular video
refWidth=3840
;Width of the reference equirectangular video
refHeight=2048
;yaw, pitch, roll of the center point of the equirectangular video (in degree)
rotation= {"type":"euler", "yaw":0.0, "pitch":0.0, "roll":0.0}
;if true, the resolution of the layout is compute based on the resolution of the previous layout (or on the resolution of the reference equirectangular video)
relativeResolution=true
;if relativeResolution=true ratio of the output layout width compare to the reference video; otherwise width size of the output video in pixel number
width=1
height=1
;bitrate ratio of the output video relative to the videoOutputBitRate (if it is the final layout and if the video is encoded).
bitrate=1

[EquirectangularTiled]
type=equirectangularTiled
;Size of the reference input equirectangular video
refWidth=3840
refHeight=2048
;use relative resolution for the face resolutions
relativeResolution=true
;The rotation used to get the center of the front face: type = "euler" or "quaternion" or "angleAxis".
; if type is "euler" you have to give the yaw, pitch and roll angle in degree
; if type is "quaternion" you have to give the w, x, y, z value of the quaternion that represente the rotation. A normalization is performed by the software.
; if type is "angleAxis" you have to give an "angle" in degree and a direction vector x, y, z that generates the rotation axis (this vector should not be (0, 0, 0)).
rotation= {"type":"euler", "yaw":0.0, "pitch":0.0, "roll":0.0}
;rotation= {"type":"quaternion", "w":1.0, "x":0.0, "y":0.0, "z":0.0}
;rotation= {"type":"angleAxis", "angle":90, "x":0, "y":0, "z":1}
;nbHTiles (resp. nbVTiles) indicate the number of horizontal (resp. vertical) tiles
;You have to compile the software with the RANGE_NB_H_TILES and RANGE_NB_V_TILES macro to be able to use this layout.
;For instance in this example the value 8 should be in the macro RANGE_NB_H_TILES and RANGE_NB_V_TILES otherwise a runtime error will be raised
nbHTiles=8
nbVTiles=4
;hTileRation_X and vTileRation_X indicate the relative horizontal and vertical ratio of the tile X. In this example each tile get 1/8 of the equirectangular picture
hTileRation_0=1
hTileRation_1=1
hTileRation_2=1
hTileRation_3=1
hTileRation_4=1
hTileRation_5=1
hTileRation_6=1
hTileRation_7=1
vTileRation_0=1
vTileRation_1=1
vTileRation_2=1
vTileRation_3=1
vTileRation_4=1
vTileRation_5=1
vTileRation_6=1
vTileRation_7=1
;if upscale is set to true, all the tiles will be upscaled to the original tile resolution
upscale=true
;if useTile is set to true, each face will be encoded into an independent video with a target bitrate set by the equirectangularTileBitrate_0_0, equirectangularTileBitrate_0_1, etc. parameters
;if useTile is set to false, the whole projection will be encoded into a unique video (all faces on the same frame) and a global bitrate target set by the bitrate parameter
useTile=false
;resolution of the tile (i,j)=(0,0)
equirectangularTile_0_0=0.25
; bitrate of the tile (i,j) = (0,0). Ratio of r means rvideoOutputBitRate/64
equirectangularTileBitrate_0_0=1
equirectangularTile_0_1=0.25
equirectangularTileBitrate_0_1=1
equirectangularTile_0_2=0.25
equirectangularTileBitrate_0_2=1
equirectangularTile_0_3=0.25
equirectangularTileBitrate_0_3=1
equirectangularTile_1_0=0.25
equirectangularTileBitrate_1_0=1
equirectangularTile_1_1=0.25
equirectangularTileBitrate_1_1=1
equirectangularTile_1_2=0.25
equirectangularTileBitrate_1_2=1
equirectangularTile_1_3=0.25
equirectangularTileBitrate_1_3=1
equirectangularTile_2_0=0.25
equirectangularTileBitrate_2_0=1
equirectangularTile_2_1=1
equirectangularTileBitrate_2_1=1
equirectangularTile_2_2=1
equirectangularTileBitrate_2_2=1
equirectangularTile_2_3=0.25
equirectangularTileBitrate_2_3=1
equirectangularTile_3_0=1
equirectangularTileBitrate_3_0=1
equirectangularTile_3_1=1
equirectangularTileBitrate_3_1=1
equirectangularTile_3_2=1
equirectangularTileBitrate_3_2=1
equirectangularTile_3_3=1
equirectangularTileBitrate_3_3=1
equirectangularTile_4_0=1
equirectangularTileBitrate_4_0=1
equirectangularTile_4_1=1
equirectangularTileBitrate_4_1=1
equirectangularTile_4_2=1
equirectangularTileBitrate_4_2=1
equirectangularTile_4_3=1
equirectangularTileBitrate_4_3=1
equirectangularTile_5_0=0.25
equirectangularTileBitrate_5_0=1
equirectangularTile_5_1=1
equirectangularTileBitrate_5_1=1
equirectangularTile_5_2=1
equirectangularTileBitrate_5_2=1
equirectangularTile_5_3=0.25
equirectangularTileBitrate_5_3=1
equirectangularTile_6_0=0.25
equirectangularTileBitrate_6_0=1
equirectangularTile_6_1=0.25
equirectangularTileBitrate_6_1=1
equirectangularTile_6_2=0.25
equirectangularTileBitrate_6_2=1
equirectangularTile_6_3=0.25
equirectangularTileBitrate_6_3=1
equirectangularTile_7_0=0.25
equirectangularTileBitrate_7_0=1
equirectangularTile_7_1=0.25
equirectangularTileBitrate_7_1=1
equirectangularTile_7_2=0.25
equirectangularTileBitrate_7_2=1
equirectangularTile_7_3=0.25
equirectangularTileBitrate_7_3=1
;bitrate is used only if useTile=false. A ratio r means a bitrate of r
videoOutputBitRate
bitrate=1`

The bit rate of the resulting video is 3945kb/s.
https://user-images.githubusercontent.com/64078936/119604825-48887500-be22-11eb-99fc-a8caada05150.mp4
1

The following is the configuration file information for obtaining a video with full quality in all areas:
Config_14.2.txt

`[Global]
;output fps
fps=24
;Names of the Section for the layout flow: [[Equirectangular, CubeMap, FlatFixed], [Equirectangular, FlatFixed]] means: from Equirectangular to CubeMap to FlatFixed AND from Equirectangular to FlatFixed
layoutFlow= [["input.mp4", "Equirectangular", "EquirectangularTiled"]]
;if displayFinalPict is set, it will display the final picture of each flow for each input picture of the original video
displayFinalPict=false
;if not empty, a video will be recorded for each flow using the path + the file name given here (the file name will be unique per flow).
videoOutputName=output14.2_.mp4
;bitrate goal of the output video in kbps
videoOutputBitRate=0
;videoOutputName=
qualityOutputName =
; qualityToComputeList = ["MS-SSIM", "SSIM", "PSNR", "S-PSNR-NN", "S-PSNR-I", "WS-PSNR"]
qualityToComputeList = []
;["S-PSNR-NN", "S-PSNR-I"]
nbFrames= 25
startFrame= 0

[Equirectangular]
;type of the layout: equirectangular is the state-of-the-art equirectangular layout
type=equirectangular
upscale=false
;Width of the reference equirectangular video
refWidth=3840
;Width of the reference equirectangular video
refHeight=2048
;yaw, pitch, roll of the center point of the equirectangular video (in degree)
rotation= {"type":"euler", "yaw":0.0, "pitch":0.0, "roll":0.0}
;if true, the resolution of the layout is compute based on the resolution of the previous layout (or on the resolution of the reference equirectangular video)
relativeResolution=true
;if relativeResolution=true ratio of the output layout width compare to the reference video; otherwise width size of the output video in pixel number
width=1
height=1
;bitrate ratio of the output video relative to the videoOutputBitRate (if it is the final layout and if the video is encoded).
bitrate=1

[EquirectangularTiled]
type=equirectangularTiled
;Size of the reference input equirectangular video
refWidth=3840
refHeight=2048
;use relative resolution for the face resolutions
relativeResolution=true
;The rotation used to get the center of the front face: type = "euler" or "quaternion" or "angleAxis".
; if type is "euler" you have to give the yaw, pitch and roll angle in degree
; if type is "quaternion" you have to give the w, x, y, z value of the quaternion that represente the rotation. A normalization is performed by the software.
; if type is "angleAxis" you have to give an "angle" in degree and a direction vector x, y, z that generates the rotation axis (this vector should not be (0, 0, 0)).
rotation= {"type":"euler", "yaw":0.0, "pitch":0.0, "roll":0.0}
;rotation= {"type":"quaternion", "w":1.0, "x":0.0, "y":0.0, "z":0.0}
;rotation= {"type":"angleAxis", "angle":90, "x":0, "y":0, "z":1}
;nbHTiles (resp. nbVTiles) indicate the number of horizontal (resp. vertical) tiles
;You have to compile the software with the RANGE_NB_H_TILES and RANGE_NB_V_TILES macro to be able to use this layout.
;For instance in this example the value 8 should be in the macro RANGE_NB_H_TILES and RANGE_NB_V_TILES otherwise a runtime error will be raised
nbHTiles=8
nbVTiles=4
;hTileRation_X and vTileRation_X indicate the relative horizontal and vertical ratio of the tile X. In this example each tile get 1/8 of the equirectangular picture
hTileRation_0=1
hTileRation_1=1
hTileRation_2=1
hTileRation_3=1
hTileRation_4=1
hTileRation_5=1
hTileRation_6=1
hTileRation_7=1
vTileRation_0=1
vTileRation_1=1
vTileRation_2=1
vTileRation_3=1
vTileRation_4=1
vTileRation_5=1
vTileRation_6=1
vTileRation_7=1
;if upscale is set to true, all the tiles will be upscaled to the original tile resolution
upscale=true
;if useTile is set to true, each face will be encoded into an independent video with a target bitrate set by the equirectangularTileBitrate_0_0, equirectangularTileBitrate_0_1, etc. parameters
;if useTile is set to false, the whole projection will be encoded into a unique video (all faces on the same frame) and a global bitrate target set by the bitrate parameter
useTile=false
;resolution of the tile (i,j)=(0,0)
equirectangularTile_0_0=1
; bitrate of the tile (i,j) = (0,0). Ratio of r means rvideoOutputBitRate/64
equirectangularTileBitrate_0_0=1
equirectangularTile_0_1=1
equirectangularTileBitrate_0_1=1
equirectangularTile_0_2=1
equirectangularTileBitrate_0_2=1
equirectangularTile_0_3=1
equirectangularTileBitrate_0_3=1
equirectangularTile_1_0=1
equirectangularTileBitrate_1_0=1
equirectangularTile_1_1=1
equirectangularTileBitrate_1_1=1
equirectangularTile_1_2=1
equirectangularTileBitrate_1_2=1
equirectangularTile_1_3=1
equirectangularTileBitrate_1_3=1
equirectangularTile_2_0=1
equirectangularTileBitrate_2_0=1
equirectangularTile_2_1=1
equirectangularTileBitrate_2_1=1
equirectangularTile_2_2=1
equirectangularTileBitrate_2_2=1
equirectangularTile_2_3=1
equirectangularTileBitrate_2_3=1
equirectangularTile_3_0=1
equirectangularTileBitrate_3_0=1
equirectangularTile_3_1=1
equirectangularTileBitrate_3_1=1
equirectangularTile_3_2=1
equirectangularTileBitrate_3_2=1
equirectangularTile_3_3=1
equirectangularTileBitrate_3_3=1
equirectangularTile_4_0=1
equirectangularTileBitrate_4_0=1
equirectangularTile_4_1=1
equirectangularTileBitrate_4_1=1
equirectangularTile_4_2=1
equirectangularTileBitrate_4_2=1
equirectangularTile_4_3=1
equirectangularTileBitrate_4_3=1
equirectangularTile_5_0=1
equirectangularTileBitrate_5_0=1
equirectangularTile_5_1=1
equirectangularTileBitrate_5_1=1
equirectangularTile_5_2=1
equirectangularTileBitrate_5_2=1
equirectangularTile_5_3=1
equirectangularTileBitrate_5_3=1
equirectangularTile_6_0=1
equirectangularTileBitrate_6_0=1
equirectangularTile_6_1=1
equirectangularTileBitrate_6_1=1
equirectangularTile_6_2=1
equirectangularTileBitrate_6_2=1
equirectangularTile_6_3=1
equirectangularTileBitrate_6_3=1
equirectangularTile_7_0=1
equirectangularTileBitrate_7_0=1
equirectangularTile_7_1=1
equirectangularTileBitrate_7_1=1
equirectangularTile_7_2=1
equirectangularTileBitrate_7_2=1
equirectangularTile_7_3=1
equirectangularTileBitrate_7_3=1
;bitrate is used only if useTile=false. A ratio r means a bitrate of r
videoOutputBitRate
bitrate=1`

The bit rate of the resulting video is 3903kb/s.
https://user-images.githubusercontent.com/64078936/119605246-03187780-be23-11eb-9f36-2a9e379a303e.mp4
2

It is easy to get that 3945 is greater than 3903, so why is the bit rate of the video with some high-quality areas and some low-quality areas higher than that of the original input video?

Could you help me solve my doubt?

Regards,
Cassie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant