Format settings ReFrame certain values causing problems with video playback.
|Found in version:||All so far but using 3.1.208.g64fe20||Platform:|
I've been experimenting with why certain mp4 L4.1 files play fine and why some just play audio with a black screen.
What I've realised is that it is to do with the 'Format settings ReFrame' value.
I've had a few problems with certain files.
1. mp4 L4.1 with ReFrame values of 4 and above just played audio with a black screen.
2. mkv L5.1 with ReFrame value 16 played audio with black screen.
3. mp4 L4.0 video from YouTube obtained using 'youtube downloader' with a ReFrame value of 1. Audio played fine but video looked as though it was on fast forward.
How I've worked out how to play them or similar files that work.
1. mp4 L4.1 with ReFrame value of 3 plays fine.(not had time to cut a section from a file with high ReFrame yet)
2. I used 'Handbrake' to re-encode the mkv L5.1 to a lower ReFrame value. It outputted as mkv L4.0 ReFrame value 4 and plays fine.
3. I upped the ReFrame value of the YouTube video again with 'Handbrake'. It outputted as mkv L3.2 ReFrame value 4 and plays fine.
My temporary fix was if I had a mp4 L4.1 I would put it in a mkv container and this would allow me to play it. I didn't realise before but it lowered the ReFrame value too. But I still have quite a few mp4 L4.1 files on my network drive but copying them back and forth the mkv would just take too long. So I've been waiting until Showtime can play the files.
I hope this helps understand why some files don't play. Also it's not a size issue as 1080p files with the low ReFrame value play fine too.
#1 Updated by Girish Patel over 1 year ago
In video compression the current video frame may consist of pixels taken from previous "reference" frames. This is done to reduce the file's size but has no impact on video quality at all. So for example, if MediaInfo indicates 5 ref frames, then there will be times when the media player will have to store 5 previous frames in memory in order to take pixels from them to build the current video frame. The ref frame number listed by MediaInfo is just the maximum number of frames that a player "might" have to store in memory. Most of the time during movie playback the number of ref frames is below the maximum, with ref frame spikes occurring during action scenes. However, if the media player doesn't have enough memory to store the necessary ref frames, then video studdering or audio dropout will occur. Some media players handle this out-of-memory condition better than others.
#2 Updated by Girish Patel over 1 year ago
while browsing I found this: https://sites.google.com/site/linuxencoding/x264-ffmpeg-mapping
It has this:
-refs <integer> (FFmpeg)
One of H.264's most useful features is the abillity to reference frames other than the one immediately prior to the current frame. This parameter lets one specify how many references can be used, through a maximum of 16. Increasing the number of refs increases the DPB (Decoded Picture Buffer) requirement, which means hardware playback devices will often have strict limits to the number of refs they can handle. In live-action sources, more reference have limited use beyond 4-8, but in cartoon sources up to the maximum value of 16 is often useful. More reference frames require more processing power because every frame is searched by the motion search (except when an early skip decision is made). The slowdown is especially apparent with slower motion estimation methods. Recommended default: -refs 6
I'm not a programmer but does that mean you add an extra piece of code to set the refs level? So you could set a default of 6 as it says and that would fix the showtime bug?
#3 Updated by Andreas Öman over 1 year ago
- Status changed from New to Rejected
I've put a lot of hours into trying to understand exactly what the cell decoder is capable of.
It seems that anything with level > 4.2 might break. It does not always necessarily do so. It depends a bit on the decoder.
There is a also a problem with high number of reference frames. If I try to initialize the decoder with a value >4 it refuses to initialize.
There might be other things too. But as a poor reverse engineer it's a bit hard to understand what's supported and not.
Thanks for looking into this though. But I will close this bug now.