I am recording off of Plex DVR, which then transcodes the video into x265 via ffmpeg. This randomly happens for a few seconds in each episode. At this particular time it is around 10min 30sec mark. Some episodes its pretty constant. Anyone know whats causing it and how to solve it?
Sample here- https://mega.nz/file/e9UiiTaI#9KHalVeb1k948wsZuyq_QDg9aCBXcikDgj-6kdVzOW8
+ Reply to Thread
Results 1 to 15 of 15
-
Last edited by Chrushev; 12th Mar 2022 at 22:24.
-
what is your ffmpeg command that you are using ?? try with -c:v libx264 -c:a copy instead of -c copy
https://www.reddit.com/r/ffmpeg/comments/i2k5do/need_help_with_stuttering_issue/ -
-
-
You have to know rhe source fps first.
If it's 60 fps g.e. then use - r 30 to drop every secon frame.
you cannot go from 60 to 24 -
The source of your video was 24p. It was broadcast as 60p by duplicating frames in a 3:2 pattern: 0 0 1 1 1 2 2 3 3 3... You can't convert back to 24p using the -r 24 filter because it uses a simple mathematical decimation that's not content aware. It has to remove 3 of every 5 frames to go from 60p to 24p. Sometimes the decimation will coincide with the duplication pattern:
Code:0 0 1 1 1 2 2 3 3 3 : duplication pattern (original frames duplicated in 2:3 pattern) + - + - - + - + - - : + means keep, - means discard, 3 of every 5 discarded 0 1 2 3 : correct decimation
Code:0 0 0 1 1 2 2 2 3 3 : duplication pattern (original frames duplicated in 3:2 pattern) + - + - - + - + - - : + means keep, - means discard, 3 of every 5 discarded 0 0 2 2 : incorrect decimation
Last edited by jagabo; 13th Mar 2022 at 08:35.
-
-
Thanks, should I be using -vf fps=24 instead of -r 24 ? Whats the difference between those?
I have also tried -r 24000/1001 before going to 24, but it had the same issue.
Maybe my reasoning behind going down to 24 fps is silly, please correct me if I am wrong. But these are DVR shows to watch one time by my family, so I want to have them watchable but not take up all of my HDD space. So I have quality set pretty low. It is my understanding that lets say at 1000 kbps video at 60fps will look worse than video at 30fps.
Because each frame will have half the space to fit into. Is this correct? If I am misunderstanding this maybe I can just not force it down to lower framerate. But from what I understand 30fps video at 1000kbps will look better than same video at 60fps 1000kpbs.
Its annoying that over the air is broadcasting stuff that was originally in 24fps at 60fps.
Also, from what you are saying, there isnt some magic number (like multiple of 30, or 2 or 4 or anything like that) that would make things align well so that there isnt stutter. Correct? -
No, after some testing it turns out that -vf fps=24 suffers from the same problem. See below...
With x264 duplicate frames don't require much bitrate so you usually don't gain much by decimating this type of source.
Yes. With a source with duplicates in an inconsistent pattern you need a smart decimation that adapts to pattern changes.
After playing around with several filters I came up with this:
Code:ffmpeg -y -i 24in60.mkv -vf select='not(mod(n\,2))',decimate=5,setpts=N/24/TB -r 24.0 -c:v libx264 -preset slow new24p.mkv
That gave almost the same file size as simply reencoding at 60p with:
Code:ffmpeg -y -i 24in60.mkv -c:v libx264 -preset slow new60p.mkv
-
-
-
Just an update for anyone curious. yes it seems like libx265 does a good job of neutralizing those duplicate frames. Here is comparison:
Overall bit rate : 538 kb/s
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
VERSUS
Overall bit rate : 518 kb/s
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 59.940 (60000/1001) FPS
Similar Threads
-
ffmpeg HEVC passthrough creating unplayable files
By Drunlade in forum Capturing and VCRReplies: 13Last Post: 23rd Oct 2021, 06:10 -
ffmpeg creating prores in MOV -- color matrix flagging
By jagabo in forum EditingReplies: 13Last Post: 2nd Feb 2019, 15:15 -
LAV Video + madVR = stutter
By slit in forum Software PlayingReplies: 4Last Post: 20th Sep 2018, 09:55 -
ffmpeg Creating slideshow from images fails
By Budman1 in forum Video ConversionReplies: 1Last Post: 19th Feb 2018, 03:44 -
HTML - Cached Video Playback Stutter
By PatrickWall in forum Video Streaming DownloadingReplies: 2Last Post: 15th Feb 2018, 07:39