On 15/04/18 17:47, Anthony Kehoe wrote:
I actually worked on this on Friday. I do a lot of work with ffmpeg to
get encodes working nicely with my 4K telly along with putting things
in iTunes for the AppleTVs.

I added a new option for my copy of get_iplayer, akfps, that changes
the ffmpeg resolutions should a 50fps version be downloaded.

         # Recording
         akfps           => [ 1, "akfps!", 'Recording', '--akfps', "AK:
Turn on ffmpeg override for 50fps to 25fps conversion"],

Down in sub postproc, I modified the section where @codec_opts builds
the video/audio codec options. I looked at a few BBC encodes and it
seems like they use a bitrate around 2285 with a maxrate of 3500 for
hls streams:

Bit rate mode                            : Variable
Bit rate                                 : 2 335 kb/s
Maximum bit rate                         : 3 500 kb/s
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 FPS

Therefore, I used a target bitrate of 2285 with a maximum of 3500.

Thanks, that's useful. -b:v=2285k does indeed give me the bit rate I was expecting.

For the moment I want to try to reduce the frame rate by dropping alternate frames as that should avoid any loss of quality in re-encoding. Also I want to be able to do it in a reasonable time on this ancient desktop which has a 2.3GHz Core 2 duo.

I gather -r in ffmpeg does not work with -c copy. According to this article there is a workaround by concatenating a dummy file at the beginning to set the PTS value. I'll give it a try.


Best wishes

get_iplayer mailing list

Reply via email to