Re: [FFmpeg-user] Convert flv to mp4. Bad video quality

2021-05-28 Thread Flavio Sartoretto
Thank you Carl for your clarification.
I obtain good results using -q:v 4
Best,
Prof. Flavio Sartoretto
gia' Docente di Calcolo Scientifico
Universita' Ca' Foscari Venezia


On Fri, May 28, 2021 at 5:24 PM Carl Eugen Hoyos  wrote:
>
>
>
>
>
> > Am 28.05.2021 um 11:44 schrieb Michael Koch :
> >
> > Am 28.05.2021 um 11:25 schrieb Flavio Sartoretto:
> >> I use ffmpeg in order to convert fname.flv video to mp4:
> >> ffmpeg -i fname.flv -c:v mpeg4 -copyts -loglevel verbose fname.mp4
> >>
> >> The video quality of my output is bad. How can I improve it?
> >
> > Add -q:v 1 to your command line. The number does specify the compression 
> > ratio. 0 ist best quality and 9 is highest compression.
>
> This is (nearly) completely wrong:
> 9 is still high quality, highest compression happens at a much higher value.
> Old MEncoder documentation recommends not use a value lower than 2, sane 
> values start between 5 and 10.
> To Flavio:
> The answer to your question depends on your use case: Setting a constant 
> quantiser as suggested leads to output more similar to constant quality as is 
> possible with x264 (and newer encoders) and is likely a good idea nowadays, 
> the alternative is setting a bitrate, this should be combined with two-pass 
> encoding and leads to the best quality - file size relation (which should be 
> less relevant if you don’t write to a CD).
>
> Carl Eugen
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Convert flv to mp4. Bad video quality

2021-05-28 Thread Gyan Doshi




On 2021-05-28 21:19, Michael Koch wrote:

Am 28.05.2021 um 17:18 schrieb Carl Eugen Hoyos:

This is (nearly) completely wrong:
9 is still high quality, highest compression happens at a much higher 
value.
Old MEncoder documentation recommends not use a value lower than 2, 
sane values start between 5 and 10.


This is an important information and should be added to the 
documentation.

The -q option is missing in chapter 16.16.1 in ffmpeg-all.html


16.16.1 is libxvid which is an external MPEG-4 Part 2 encoder,. The OP 
specified the native encoder, which isn't documented and is fairly low 
on my list.


Regards,
Gyan
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Convert flv to mp4. Bad video quality

2021-05-28 Thread Michael Koch

Am 28.05.2021 um 17:18 schrieb Carl Eugen Hoyos:

This is (nearly) completely wrong:
9 is still high quality, highest compression happens at a much higher value.
Old MEncoder documentation recommends not use a value lower than 2, sane values 
start between 5 and 10.


This is an important information and should be added to the documentation.
The -q option is missing in chapter 16.16.1 in ffmpeg-all.html

Michael

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Convert flv to mp4. Bad video quality

2021-05-28 Thread Carl Eugen Hoyos




> Am 28.05.2021 um 11:44 schrieb Michael Koch :
> 
> Am 28.05.2021 um 11:25 schrieb Flavio Sartoretto:
>> I use ffmpeg in order to convert fname.flv video to mp4:
>> ffmpeg -i fname.flv -c:v mpeg4 -copyts -loglevel verbose fname.mp4
>> 
>> The video quality of my output is bad. How can I improve it?
> 
> Add -q:v 1 to your command line. The number does specify the compression 
> ratio. 0 ist best quality and 9 is highest compression.

This is (nearly) completely wrong:
9 is still high quality, highest compression happens at a much higher value.
Old MEncoder documentation recommends not use a value lower than 2, sane values 
start between 5 and 10.
To Flavio:
The answer to your question depends on your use case: Setting a constant 
quantiser as suggested leads to output more similar to constant quality as is 
possible with x264 (and newer encoders) and is likely a good idea nowadays, the 
alternative is setting a bitrate, this should be combined with two-pass 
encoding and leads to the best quality - file size relation (which should be 
less relevant if you don’t write to a CD).

Carl Eugen
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Convert flv to mp4. Bad video quality

2021-05-28 Thread Flavio Sartoretto
Thank you Rick.
Michael Koch suggested me to use -q:v 1, which is ok!
Thanks anyway!
Prof. Flavio Sartoretto
gia' Docente di Calcolo Scientifico
Universita' Ca' Foscari Venezia
On Fri, May 28, 2021 at 2:58 PM Rick Keniuk  wrote:
>
> Im not sure about the FFMPEG command but couldn't you check if the original
> FLV is already h.264 video and AAC audio and directly copy?
>
> On Fri, May 28, 2021, 4:31 AM Flavio Sartoretto <
> flavio.sartoretto1...@gmail.com> wrote:
>
> > I use ffmpeg in order to convert fname.flv video to mp4:
> > ffmpeg -i fname.flv -c:v mpeg4 -copyts -loglevel verbose fname.mp4
> >
> > The video quality of my output is bad. How can I improve it?
> >
> > Best regards,
> > Prof. Flavio Sartoretto
> > gia' Docente di Calcolo Scientifico
> > Universita' Ca' Foscari Venezia
> > ___
> > ffmpeg-user mailing list
> > ffmpeg-user@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
> >
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Convert flv to mp4. Bad video quality

2021-05-28 Thread Flavio Sartoretto
Thank you Ulf for your suggestion.
Michael Koch suggested me to use -q:v 1, which is ok!
Thanks anyway!
Prof. Flavio Sartoretto
gia' Docente di Calcolo Scientifico
Universita' Ca' Foscari Venezia


On Fri, May 28, 2021 at 12:02 PM Ulf Zibis  wrote:
>
>
> Am 28.05.21 um 11:44 schrieb Michael Koch:
> > Am 28.05.2021 um 11:25 schrieb Flavio Sartoretto:
> >> I use ffmpeg in order to convert fname.flv video to mp4:
> >> ffmpeg -i fname.flv -c:v mpeg4 -copyts -loglevel verbose fname.mp4
> >>
> >> The video quality of my output is bad. How can I improve it?
> >
> > Add -q:v 1 to your command line. The number does specify the compression 
> > ratio. 0 ist best quality and 9 is highest compression.
>
> Alternatively you may drop "-c:v mpeg4". Then libx264 is used instead FFmpegs 
> internal mpeg4 encoder by default and you will get good quality.
>
> -Ulf
>
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Convert flv to mp4. Bad video quality

2021-05-28 Thread Flavio Sartoretto
Thank you very much, Michael!
It works!
Prof. Flavio Sartoretto
gia' Docente di Calcolo Scientifico
Universita' Ca' Foscari Venezia


On Fri, May 28, 2021 at 11:44 AM Michael Koch
 wrote:
>
> Am 28.05.2021 um 11:25 schrieb Flavio Sartoretto:
> > I use ffmpeg in order to convert fname.flv video to mp4:
> > ffmpeg -i fname.flv -c:v mpeg4 -copyts -loglevel verbose fname.mp4
> >
> > The video quality of my output is bad. How can I improve it?
>
> Add -q:v 1 to your command line. The number does specify the compression
> ratio. 0 ist best quality and 9 is highest compression.
>
> Michael
>
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Convert flv to mp4. Bad video quality

2021-05-28 Thread Rick Keniuk
Im not sure about the FFMPEG command but couldn't you check if the original
FLV is already h.264 video and AAC audio and directly copy?

On Fri, May 28, 2021, 4:31 AM Flavio Sartoretto <
flavio.sartoretto1...@gmail.com> wrote:

> I use ffmpeg in order to convert fname.flv video to mp4:
> ffmpeg -i fname.flv -c:v mpeg4 -copyts -loglevel verbose fname.mp4
>
> The video quality of my output is bad. How can I improve it?
>
> Best regards,
> Prof. Flavio Sartoretto
> gia' Docente di Calcolo Scientifico
> Universita' Ca' Foscari Venezia
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Convert flv to mp4. Bad video quality

2021-05-28 Thread Ulf Zibis



Am 28.05.21 um 11:44 schrieb Michael Koch:

Am 28.05.2021 um 11:25 schrieb Flavio Sartoretto:

I use ffmpeg in order to convert fname.flv video to mp4:
ffmpeg -i fname.flv -c:v mpeg4 -copyts -loglevel verbose fname.mp4

The video quality of my output is bad. How can I improve it?


Add -q:v 1 to your command line. The number does specify the compression ratio. 
0 ist best quality and 9 is highest compression.


Alternatively you may drop "-c:v mpeg4". Then libx264 is used instead FFmpegs 
internal mpeg4 encoder by default and you will get good quality.

-Ulf

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Convert flv to mp4. Bad video quality

2021-05-28 Thread Michael Koch

Am 28.05.2021 um 11:25 schrieb Flavio Sartoretto:

I use ffmpeg in order to convert fname.flv video to mp4:
ffmpeg -i fname.flv -c:v mpeg4 -copyts -loglevel verbose fname.mp4

The video quality of my output is bad. How can I improve it?


Add -q:v 1 to your command line. The number does specify the compression 
ratio. 0 ist best quality and 9 is highest compression.


Michael

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-user] Convert flv to mp4. Bad video quality

2021-05-28 Thread Flavio Sartoretto
I use ffmpeg in order to convert fname.flv video to mp4:
ffmpeg -i fname.flv -c:v mpeg4 -copyts -loglevel verbose fname.mp4

The video quality of my output is bad. How can I improve it?

Best regards,
Prof. Flavio Sartoretto
gia' Docente di Calcolo Scientifico
Universita' Ca' Foscari Venezia
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".