Hello, there's this new problem I've been having with FFMPEG that didn't seem to happen earlier this month.
So I'm playing around with very high frame rate video, and I've made some successful 240fps video samples over the past two months or so. I've been using FFMPEG to convert slow-motion video game screencaptures into higher frame rates, and I've been using commands similar to this:
ffmpeg -i FastMotorcycle_02_30fps.mkv -r 240 -filter:v "setpts=0.125*PTS" -preset ultrafast output.mkv
The above output results in this uncorrupted video:
[Attachment 57051 - Click to enlarge]
It is actually a working 240fps output video.
The problem is, only this past week or so I've only been able to get good output videos from using the faster end of the "-preset" parameter, as opposed to "-preset veryslow" that I used previously that I prefer. The following command, which is only different from the one above in that it doesn't use a "-preset" (and I've tested and received similar results with "-preset veryslow"):
ffmpeg -i FastMotorcycle_02_30fps.mkv -r 240 -filter:v "setpts=0.125*PTS" output.mkv
The above output results in this corrupted video:
[Attachment 57053 - Click to enlarge]
I'd like to figure out what is causing this issue to hopefully solve it and get back to higher quality encoding, and maybe learn a bit about FFMPEG along the way. If you need any more information or more specific details, just let me know and I will provide them the best I can.
Thank you in advance!![]()
+ Reply to Thread
Results 1 to 7 of 7
-
-
ffmpeg -i "input.mkv" -c:v libx264 -r 240 -filter:v "setpts=0.125*PTS" -crf 21 -an output.mkv
With the crf value you can control the video quality. Lower values give better quality. Good range for x264 (avc) is 18-23.
Read: https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video -
Hi ProWo! Thank you for responding, I copied and pasted the command directly into PowerShell (after making sure my input video was named "input"), and it yielded a similar grey corrupted mess of a video. The input video plays perfectly at 30fps.
Would it be a good idea to upload the input and/or output file to my google drive so you or someone else can take a look at it? Are there any logs or anything I could post that would be helpful?
I forgot to mention, this issue only seems to happen with videos recorded using NVENC (NVidia GPU encoding), videos encoded with the CPU do not seem to corrupt like this. Thanks in advance to anyone who replies!
Edit: Yes, I am aware of the ffmpeg wiki page for speeding up/slowing down video, that page has been immensely helpful in this particular project -
Yes, both.
You may have a playback problem (ie, computer can't decode the video fast enough, medium preset is much harder to play than ultrafast), not an encoding problem. Another possibility is that the decoding of the source video gets screwed up when the more complex encoding requests frames out-of-order.Last edited by jagabo; 30th Jan 2021 at 21:41.
-
So I uploaded both files to Google drive, and in the upload process, it re-encoded the video without me asking it (to quite low settings). However, the uploaded versions both play fine for me. It may in fact be a playback issue, though I suspected it wasn't likely due to the fact that I did not experience this just three weeks or so ago.
input.mkv: https://drive.google.com/file/d/1nyqKeRsJ82OSn5DFX_oV88DjCXkNnCl0/view?usp=sharing
output.mkv: https://drive.google.com/file/d/1Viaw0BBTMEZxwq2TqsWy85H1-_WclTkI/view?usp=sharing
Is there anywhere I can share my output video without having it auto-reencoded? -
Are you sure the "download" links lead to re-encoded videos? The output video has x264 metadata that matches an encoding with the medium preset (the default). And it plays with no corruption here. Even if google did convert it the result would have shown corruption if the video you uploaded had problems.
Try turning off hardware decoding in your media player. Or, if it's already off, turn it on. See if there's any difference.
In any case, many computers can't play 240 fps 1080p videos properly. So there's it's not really surprising you are having problems. -
So I checked the video that the download links to and found that it was just a preview video that I was seeing on Google drive, and it did not actually reencode it.
But thanks for the suggestion to turn off hardware decoding, I didn't think much about the video player side of things! I tried it with VLC media player and it's playing uncorrupted now, if slower.
With that said, I still don't get what I was doing differently a month ago to have it working then but not now. Oh well.
Thanks for the help jagabo! If I have any other video problems, I'll be sure to come back to this forum!
Similar Threads
-
NEWBIE Raspberry Pi Zero W | ffmpeg video output issue. | via ssh
By EvasiveSnail in forum Newbie / General discussionsReplies: 3Last Post: 4th Nov 2020, 10:53 -
How To Improve Output Video Quality
By todsweeney in forum Newbie / General discussionsReplies: 1Last Post: 28th Oct 2018, 09:03 -
Corrupted MP4 Video Recording created by ffmpeg
By pranjal_idms in forum Video ConversionReplies: 2Last Post: 15th Jan 2018, 09:08 -
Can VCR video be converted to quality high definition video?
By johnharlin in forum Video ConversionReplies: 3Last Post: 22nd Jan 2017, 16:51 -
Improve blurry low quality video into clear high quality video.
By Osram123 in forum Video ConversionReplies: 2Last Post: 4th Apr 2016, 01:48