LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-29-2017, 12:02 PM   #1
SUSESailor
Member
 
Registered: Jul 2015
Posts: 84

Rep: Reputation: Disabled
ffmpeg video flickering issues


Hello, all.

I am trying to do some editing in KDEnlive using material that was shot on a Blackmagic camera in its raw format.

I've imported the DNGs into Darktable and exported them. That seems to work fine.

Then, using ffmpeg, I have encoded the exported jpegs into an MP4 video. That also seems to work fine, but in watching the videos there is an obvious flickering whenever the background is static or low in detail. Everything that is moving or high-detail looks great, but there is a weird flickering in the background. I'm sure it's not there in the raw footage.

Now, the first thing I need to know is: Where in the process is this defect coming from? Is it an ffmpeg issue? I can't see why Darktable would be exporting every other image from a mass-export with something slightly changed in the background.

In case it helps, the command I have been using to encode is as follows:

Code:
$prompt> ffmpeg -pattern_type glob -framerate 23.98 -i 'Scene15*.jpg' -i foo.wav -qscale 2 -s 1952x1112 Scene15-A_-_Take01.mp4
Yes, I copied the original sound file from the camera to foo.wav, mostly to eliminate the spaces from the original filename, but also because it is the name from the examples in the ffmpeg documentation.

Any help would be greatly appreciated. Thanks!
 
Old 05-29-2017, 06:37 PM   #2
SUSESailor
Member
 
Registered: Jul 2015
Posts: 84

Original Poster
Rep: Reputation: Disabled
Okay, I figured out that the problem is with the jpegs being exported from Darktable. I went and looked at several of them, and it is changing something in the backgrounds of all of these images.

I've tried exporting to several different formats (TIFF, Jpeg, Jpeg 2000, PNG, etc.) and the problem is present in all of them.

Any ideas?

Thanks again!
 
Old 05-29-2017, 06:48 PM   #3
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916
Have you tried the Blackmagic forum (https://forum.blackmagicdesign.com)?

There are threads like this one:

https://forum.blackmagicdesign.com/v...php?f=2&t=4507
 
Old 06-02-2017, 07:15 PM   #4
SUSESailor
Member
 
Registered: Jul 2015
Posts: 84

Original Poster
Rep: Reputation: Disabled
Okay. I have made some more progress.

I realized that I had a style active in Darktable, so there was some processing going on in addition to the export/conversion.

I have re-exported the files using no style or any other kind of adjustment prior to exporting. Viewed in a picture viewer, the images do appear pretty much the same as they came out of the camera.

Now I am having a different problem, however. I decided to use the OpenEXR format because it is designed for High-definition Video, but I get a strange error when I try to encode it.

Code:
[buffer @ 0x2473d20] Unable to parse option value "-1" as pixel format
    Last message repeated 1 times
[buffer @ 0x2473d20] Error setting option pix_fmt to value -1.
[graph 0 input from stream 0:0 @ 0x2473c00] Error applying options to the filter.
Error opening filters!
I have tried to research this issue, but found nothing. I'm sure it's just a command line switch I'm missing, but I can't figure it out from the man page.

Here is the most recent command I used to encode it:

Code:
$prompt>  ffmpeg -pattern_type glob -framerate 23.98 -s 1952x1112 -i 'Scene01*.exr' -i foo.wav -qscale 2 -s 1952x1112 Scene01-cough_-_Take01-qs2-framerate-EXR.mp4
Thanks again!
 
Old 06-02-2017, 10:37 PM   #5
SUSESailor
Member
 
Registered: Jul 2015
Posts: 84

Original Poster
Rep: Reputation: Disabled
Getting further...

I went ahead and downloaded and compiled the newest version of ffmpeg. Now, I can get it to encode using the EXR pictures. Here's the new problem:

I can't figure out how to get it to create a video with the quality that I need. When I was working with the original jpegs, I was getting video bitrates of around 70k. Now, the highest it will go is 4k. I've tried specifying the bitrate using the -b:v option, but it ignores whatever I put. I've set the qscale all the way down to 1. Still the best bitrate I can get is 4000.

I want to try using the Apple ProRes codec, but I don't know how to tell it to use that format. I've done some searching, and apparently there is a command line option to specify which codec to use for the output, but I can't find anything that tells me what to put to tell it to use the Apple ProRes codec.

Can anyone tell me what I'm doing wrong? I'm converting a series of pictures, each of which is 17 Megabytes, and getting a video that is 10 Megabytes - smaller than one of the individual frames. I should be getting a video that is Gigabytes in size.

Please help! Thank you!
 
Old 06-03-2017, 01:00 PM   #6
SUSESailor
Member
 
Registered: Jul 2015
Posts: 84

Original Poster
Rep: Reputation: Disabled
I got it figured out!

I did some more searching through the documentation and figured out how to get it to use the prores codec for the output. The final command line that worked was:

Code:
$prompt>  ffmpeg -framerate 23.98 -s 1952x1112 -i Scene01-cough_-_Take01-Frame%04d*.exr -i foo.wav -codec:v prores -qscale 2 -s 1952x1112 Scene01-cough_-_Take01.mov
Now I am getting bitrates in the hundreds of thousands! The video looks great when I import it into KDEnlive.

Thanks eveybody!
 
Old 06-03-2017, 10:49 PM   #7
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916
Quote:
Originally Posted by SUSESailor View Post
I got it figured out!

I did some more searching through the documentation and figured out how to get it to use the prores codec for the output. The final command line that worked was:

Code:
$prompt>  ffmpeg -framerate 23.98 -s 1952x1112 -i Scene01-cough_-_Take01-Frame%04d*.exr -i foo.wav -codec:v prores -qscale 2 -s 1952x1112 Scene01-cough_-_Take01.mov
Now I am getting bitrates in the hundreds of thousands! The video looks great when I import it into KDEnlive.

Thanks eveybody!
Sweet. Thanks for letting us know.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] ffmpeg audio/video sync issues earthw0rmjim Linux - Software 3 12-04-2013 07:20 AM
Chrome flickering video's on youtube flimes Linux - Software 2 01-25-2013 04:55 AM
ffmpeg mixing audio/video - trying to end vid after video stream completes joejoe99 Linux - Software 2 06-21-2012 11:44 PM
video flickering Paxmaster Ubuntu 4 12-17-2005 03:25 PM
ATI Drivers - Flickering (Sync Issues?) Ehuwiko Slackware 1 11-26-2004 12:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration