A method for training a neural network to be used by a video camera when distributing a bit rate budget on an image during an encoding process, wherein the neural network receives a plurality of input digital images and for each specific input digital image outputs data for determining a relevance level for macroblocks in the specific input digital image, the method comprising: determining a training data set by: for a first plurality of digital training images, determining a relevance level for macroblocks in each specific digital training image of the plurality of digital training images by using a first image analysis algorithm configured to automatically label the macroblock with a relevance level based on image characteristics in the macroblock, for a second plurality of digital training images showing a user-specified situation, determining a relevance level for macroblocks in each specific digital training image of the second plurality of digital training images by using a second image analysis algorithm configured to automatically label the macroblock with a relevance level based on image characteristics in the macroblock, wherein the second image analysis algorithm differs from the first image analysis algorithm in that it is specifically adapted to analyze images showing the user-specified situation, wherein a higher relevance level of a macroblock indicates to the video camera to spend a larger part of the bit rate budget on that macroblock during the encoding process compared to a macroblock having a lower relevance level, including the first and the second plurality of digital training images and the associated labels as the training data set, and using the training data set for training of the neural network, wherein the first plurality of digital training images and the associated relevance levels are used to initially train the neural network, and the second plurality of digital training images and the associated relevance levels are subsequently used to fine-tune the training of the neural network to the user-specified situation. determining a training data set by: for a first plurality of digital training images, determining a relevance level for macroblocks in each specific digital training image of the plurality of digital training images by using a first image analysis algorithm configured to automatically label the macroblock with a relevance level based on image characteristics in the macroblock, for a second plurality of digital training images showing a user-specified situation, determining a relevance level for macroblocks in each specific digital training image of the second plurality of digital training images by using a second image analysis algorithm configured to automatically label the macroblock with a relevance level based on image characteristics in the macroblock, wherein the second image analysis algorithm differs from the first image analysis algorithm in that it is specifically adapted to analyze images showing the user-specified situation, wherein a higher relevance level of a macroblock indicates to the video camera to spend a larger part of the bit rate budget on that macroblock during the encoding process compared to a macroblock having a lower relevance level, for a first plurality of digital training images, determining a relevance level for macroblocks in each specific digital training image of the plurality of digital training images by using a first image analysis algorithm configured to automatically label the macroblock with a relevance level based on image characteristics in the macroblock, for a second plurality of digital training images showing a user-specified situation, determining a relevance level for macroblocks in each specific digital training image of the second plurality of digital training images by using a second image analysis algorithm configured to automatically label the macroblock with a relevance level based on image characteristics in the macroblock, wherein the second image analysis algorithm differs from the first image analysis algorithm in that it is specifically adapted to analyze images showing the user-specified situation, wherein a higher relevance level of a macroblock indicates to the video camera to spend a larger part of the bit rate budget on that macroblock during the encoding process compared to a macroblock having a lower relevance level, including the first and the second plurality of digital training images and the associated labels as the training data set, and using the training data set for training of the neural network, wherein the first plurality of digital training images and the associated relevance levels are used to initially train the neural network, and the second plurality of digital training images and the associated relevance levels are subsequently used to fine-tune the training of the neural network to the user-specified situation.