• Welcome to PHPVIBE Forums. Please log in.
avatar_Marius P.

[ Video Sharing CMS v4 ] FFMPEG transcoding for Quality

Started by Marius P.,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Marius P.Topic starter


{ffmpeg-cmd} -i {input} -c:v libx264 -preset slow -crf 18 -vf yadif -strict -2 {output}.mp4

When file size is not an issue, this is a quick command that will produce a visually lossless H.264 encoding with an mp4 container. C:V is the video codec of choice, preset is the compression preset (in this case slow for higher quality compression), and CRF is the Constant Rate Factor, which preserves an overall level of quality throughout the file by adjusting each frame's bitrate based on the given quality level. Consequently, the higher the CRF, the lower the overall quality level.
The video filter flag (-vf) is used to call FFMPEG's pre-bundled video filters, while yadif (Yet Another Deinterlacing Filter) deinterlaces an interlaced input, as progressive video is not only easier to compress and most current computer monitors and televisions are progressive scan.
Finally, when encoding with H.264/MPEG-4 AVC, the audio format used is AAC (Advanced Audio Coding); in order to enable FFMPEG's experimental, native AAC encoder, -strict -2 needs to be added to the command. An external library such as libfaac [4] can also be used, and –strict -2 can be omitted.


A preservation quality master can be output using the same principles, setting the –crf to 0, the preset to veryslow, and the output container to .mkv:


{ffmpeg-cmd} -i {input} -c:v libx264 -preset veryslow -crf 0 -vf yadif -strict -2 output.mp4

A preservation quality master can be output using the same principles, setting the –crf to 0, the preset to veryslow, and the output container to .mkv:


{ffmpeg-cmd} -i {input} -c:v libx264 -preset veryslow -crf 0 -vf  yadif -strict -2 output.mp4
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Marius P.Topic starter

Beta-testing on VideoInedit:

$output ="{ffmpeg-cmd} -i {input} -c:v libx264 -preset slow -crf 18 -vf yadif -strict -2 -movflags faststart {output}.mp4";



Sample: http://www.videoinedit.com/video/7486/transformers-4-official-trailer-hd-1080p-/
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Marius P.Topic starter

Quote from: @Mario on
Beta-testing on VideoInedit:
....



Note, this is really heavy on 2.3 gb full 720p movie, and also slow.
This hardware: 8 gb, 2.4 quad-core intel.





Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Marius P.Topic starter

After about 2h of conversion : http://www.videoinedit.com/video/7487/scooby-doo-frankencreepy-2014-720p-x264/
The video quality is almost to 100% as the original .mkv video file.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

 

Similar topics (7)

Important Announcement: PHPVibe Video Sharing CMS End of Life

Started by Marius P.


Replies: 1
Views: 36932

The problem of video viewing PHPVibe 5.0

Started by Nayn


Replies: 25
Views: 68214

embed video does not work on v5

Started by neospider69


Replies: 6
Views: 47623

when slecting to unpublish music mp3 - next page says unpublished video ?

Started by spirog


Replies: 2
Views: 3911

Dealing with FFMPEG on v5

Started by Marius P.


Replies: 0
Views: 2090

insite ads issue when selecting above/below video player location

Started by georgepanaitescu


Replies: 3
Views: 20333

Video that I've uploaded needs to have that value in admin to upload

Started by spirog


Replies: 4
Views: 3527