Open spirogg opened 3 years ago
Hi @spirogg
Speed of FFmpeg conversions based on the Cronjob cycle on your server. Because conversation only executes when cron run.
Regards.
@harrison05 please see this encoding is faster with certain FMPEG libx264
example CRFs 18 to 27, and presets below
you can speed up the encoding using crf and presets when using ffmpeg
this will speed up the time the video processes and shows up on the website.
Presets:
ultrafast superfast veryfast faster fast medium slow slower veryslow
and CRF numbers you can control the speed and quality
example in this link shows
https://gist.github.com/mattst/2a0ff8de12e0fedb2ad72ccf7131bf71#file-testcliptwomindata-csv
so utrafast conversion time is 13.91 seconds and that should show pretty fast to the user then fast preset takes 79.71 seconds to conversion the same video these are examples, so depending on the preset and CRF you can control the quality Speed and File size of your conversion.
Example:
Choose an x264 encoding preset These presets affect the encoding speed. Using a slower preset gives you better compression, or quality per filesize, whereas faster presets give you worse compression. In general, you should just use the preset you can afford to wait for. Presets can be ultrafast, superfast, veryfast, faster, fast, medium (default), slow and veryslow. Here's an example:
ffmpeg -i input.mp4 -c:v libx264 -preset slow output.mp4
Encode lossless video This is possible by specifying a CRF of 0, so simply use -crf 0:
ffmpeg -i input.mp4 -c:v libx264 -crf 0 output.mp4
ALSO SEE: https://trac.ffmpeg.org/wiki/Encode/H.264
that is what I need to know where the ffmpeg file in phpfox is, to be able to play with it to see the difference on our conversion speed quality and file size of the uploaded videos
thanks
Spiro
@harrison05 I found an older post this is the area I was looking for
here we can change Presets:
ultrafast superfast veryfast faster fast medium slow slower veryslow
this is Now /public_html/PF.Site/Apps/core-videos/Job/Encode.php EDIT /public_html/PF.Site/Apps/core-videos/Job/Encode.php you will find this around = line 140 thru 152
$videoCommand .= '-vcodec libx264' . ' '
. '-acodec aac' . ' '
. '-strict experimental' . ' '
. '-preset fast' . ' '
. '-f mp4' . ' ';
EDIT /public_html/PF.Site/Apps/core-videos/Job/Encode.php you will find this around = line 148 thru 152
$videoCommand .= '-vcodec libx264' . ' '
. '-acodec aac' . ' '
. '-strict experimental' . ' '
. '-preset veryfast' . ' '
. '-f mp4' . ' ';
we can always use copy audio to not encode again
$videoCommand .= '-vcodec libx264' . ' '
. '-c:a copy' . ' '
. '-strict experimental' . ' '
. '-preset veryfast' . ' '
. '-f mp4' . ' ';
thanks,
Spiro
Important
Please follow this template!
What's happened?
I want to be able to change the processing speed of ffmpeg conversions
I forgot in what folder/file I can make updates to change the conversion of uploaded ffmpeg videos to fast medium slow etc. ?
Also it would be nice to have a admincp feature to change the conversion speed slow make a better picture, medium ok picture, fast so so picture but converts really fast *especially for website platforms that don't have super servers
the users will still be able to convert the video faster and won't be so slow
admins will be happy cause they won't loose their users because of slower servers than the super servers.
plus will help iOS and Android apps to speed up conversion of videos if server is not that good so users won;t have to wait forever to view the videos.
also itwould be nice to be able to convert to different ffpmeg ratios and have video player play them and have user options: auto 240 360 480 720 1080 etc.
so if admin wants to convert only to 360 he select 360 if he want to choose 240 & 360 he selects them
or only 360 480 720 he can choose those ratios or all 240 360 480 720 1080 etc.. this would be in the video app settings it would be nice to have for videos app especially for v5 newest coming phpfox platform :)
I THINK THIS IS GOOD IDEA PLEASE for v5 phpfox every website that you can upload videos has the player and the features especially in 2020 andyear 2021 please make this avail in new video app feature
I make a feature request here https://github.com/PHPfox-Official/phpfox-v4-feature-requests/issues/995
but still need the answer for where i can change the ffmpeg conversion for now
thanks Spiro ...
phpFox version
(Example: phpFox 4.6.0) 4.8.1 ...
Screenshots
...