ffmpeg video generation: quality options

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ffmpeg video generation: quality options

Jeanette C.
Hey hey,
I've found the following command to generate a video from single frame images
ffmpeg -r 25 -start_number 1 -i image%03d.jpg -c:v libx264 -r 25 -pix_fmt
yuv420p out.mp4

My question is: the resultant videos seem quite small. Seeing that I have no
knowledge of all the video quality parameters, could someone suggest better
options?

The input files are 1280x720 JPGs with possibly 16bits for color (standard
POV-Ray output).

Final destination is youtube. Any suggestions are very welcome.

Best wishes and thanks,

Jeanette

--------
* website: http://juliencoder.de - for summer is a state of sound
* SoundCloud: https://soundcloud.com/jeanette_c

All you people look at me like I'm a little girl.
Well did you ever think it be okay for me to step into this world. <3
(Britney Spears)
_______________________________________________
Linux-audio-user mailing list
[hidden email]
http://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg video generation: quality options

Chris Caudle
On Thu, July 20, 2017 6:36 pm, Jeanette C. wrote:
> My question is: the resultant videos seem quite small.

Can you clarify with numbers?  Small in resolution or just small in size?
How many pictures are you using for what length of video?  Video
compression algorithms work by having a frame of full graphic information,
then transmitting information about how much changed from frame to frame.
If you do not have very many images used for the video, then there will be
many frames in a row which are essentially (or completely) unchanged, so
the resultant video stream will be the equivalent of a picture followed by
a lot of frames with just enough data to indicate the equivalent to "same
as before."
--
Chris Caudle




_______________________________________________
Linux-audio-user mailing list
[hidden email]
http://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg video generation: quality options

Jeanette C.
Jul 21 2017, Chris Caudle has written:
...
Hi Chris,
> Can you clarify with numbers?  Small in resolution or just small in size?
Small in size. At te moment its images only (no audio). For 125 images,
making 125 frames, played at an fps of 25 per second (i.e. 5 seconds)
the video is 420K. OK, if ffmpeg does a good encoding job, in the way
you describe, the quality could be just as good as the images allow.
...

Best wishes and thanks,

Jeanette

--------
* website: http://juliencoder.de - for summer is a state of sound
* SoundCloud: https://soundcloud.com/jeanette_c

What's practical is logical. What the hell, who cares?
All I know is I'm so happy when you're dancing there. <3
(Britney Spears)
_______________________________________________
Linux-audio-user mailing list
[hidden email]
http://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg video generation: quality options

Lorenzo Sutton
Hi Jeanette,

On 21/07/2017 09:12, Jeanette C. wrote:
> Jul 21 2017, Chris Caudle has written:
> ...
> Hi Chris,
>> Can you clarify with numbers?  Small in resolution or just small in size?
> Small in size. At te moment its images only (no audio). For 125 images,
> making 125 frames, played at an fps of 25 per second (i.e. 5 seconds)
> the video is 420K. OK, if ffmpeg does a good encoding job, in the way
> you describe, the quality could be just as good as the images allow.
> ...

Here there is some specific information about H264 enoding:

https://trac.ffmpeg.org/wiki/Encode/H.264#LosslessH.264

Essentially you can try with something like -crf 18 or even lower... As
explained the scale is from 0 (best) to 51 (worst)

Hope this helps.
Lorenzo.

>
> Jeanette
>
> --------
> * website: http://juliencoder.de - for summer is a state of sound
> * SoundCloud: https://soundcloud.com/jeanette_c
>
> What's practical is logical. What the hell, who cares?
> All I know is I'm so happy when you're dancing there. <3
> (Britney Spears)
> _______________________________________________
> Linux-audio-user mailing list
> [hidden email]
> http://lists.linuxaudio.org/listinfo/linux-audio-user
_______________________________________________
Linux-audio-user mailing list
[hidden email]
http://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg video generation: quality options

Jeanette C.
Jul 21 2017, Lorenzo Sutton has written:
...
> Here there is some specific information about H264 enoding:
>
> https://trac.ffmpeg.org/wiki/Encode/H.264#LosslessH.264
...
Thanks Lorenzo, that did help me understand a little more about the
practicalities. The -crf flag appears to be the most useful. I'm trying
that.

Best wishes,

Jeanette

--------
* website: http://juliencoder.de - for summer is a state of sound
* SoundCloud: https://soundcloud.com/jeanette_c

Say hello to the girl that I am! <3
(Britney Spears)
_______________________________________________
Linux-audio-user mailing list
[hidden email]
http://lists.linuxaudio.org/listinfo/linux-audio-user
Loading...