Need recommendation on Video Conversion
Need recommendation on Video Conversion
Hi Folks,
I am new to FFmpeg and novice in video conversion tasks.
I had a Sony Handycam which records video in MPG format. Refer this link https://www.cnet.com/products/sony-handycam-dcr-sr60/ for specifications of the format.
I had accumulated 200 GB of video files so far and decided to take it to cloud. I had chosen Onedrive for the same but Onedrive supports only these formats 3G2, 3GP, ASF, BMP, M2TS, M4V, MOV, MP3, MP4, MP4V, MTS, TS, WMV. More details in https://support.office.com/en-us/articl ... bed77196a .
I need help to convert my MPG files to any of the above formats where quality is my utmost concern. I'm not concerned about the file size, even if it increases than the Original but need a high-quality video and audio.
Please help me on the same.
/Satheesh
I am new to FFmpeg and novice in video conversion tasks.
I had a Sony Handycam which records video in MPG format. Refer this link https://www.cnet.com/products/sony-handycam-dcr-sr60/ for specifications of the format.
I had accumulated 200 GB of video files so far and decided to take it to cloud. I had chosen Onedrive for the same but Onedrive supports only these formats 3G2, 3GP, ASF, BMP, M2TS, M4V, MOV, MP3, MP4, MP4V, MTS, TS, WMV. More details in https://support.office.com/en-us/articl ... bed77196a .
I need help to convert my MPG files to any of the above formats where quality is my utmost concern. I'm not concerned about the file size, even if it increases than the Original but need a high-quality video and audio.
Please help me on the same.
/Satheesh
Re: Need recommendation on Video Conversion
Use MP4 container with video codec H.264 and if possible keep original AC-3 audio track audio, for H.264 use CFR type encoding with sufficiently low CFR (lower = higher quality) - i would say something like CFR=12...16.
Re: Need recommendation on Video Conversion
Many thanks for the response Pandy. After a few iterations, I am with the below command,
Please let me know about any improvements.
Code: Select all
ffmpeg -i input.MPG -vf yadif -c:v libx264 -preset veryslow -crf 10 -c:a aac -b:a 256k output.mp4
Re: Need recommendation on Video Conversion
Personally i would not use preset higher than medium, if my source is interlace i would stay with interlace, yadif is fast but not the best deinterlacer and there is no such thing as perfect deinterlacer, i would avoid to re-encode audio and stay with ac3
Re: Need recommendation on Video Conversion
Thanks Pandy. I had started to see horizontal lines after conversion. Few websites provided me suggestion to use yadif and it addressed the problem to 85%. Still, I see those lines in motion but much better than earlier. If you can suggest any other deinterlacer, I will test and let you know.
Will change the Audio Codec to ac3 and preset to Medium. But without yadif, quality is very bad.
Will change the Audio Codec to ac3 and preset to Medium. But without yadif, quality is very bad.
Re: Need recommendation on Video Conversion
You need tell ffmpeg libx264 that your source is interlaced - bit old but still useful:
https://forum.doom9.org/showthread.php?t=161531
https://superuser.com/questions/1344442 ... -264-video
Best "amateur" deinterlacer use Avistynth - search for famous QTGMC http://avisynth.nl/index.php/QTGMC
As there is no perfect deinterlacer then lot of people complain that deinterlacing is lossy processing - this is not true - deinterlacer trying to guess information lost in interlacing process - some deinterlacer are just better in guessing.
https://forum.doom9.org/showthread.php?t=161531
https://superuser.com/questions/1344442 ... -264-video
Best "amateur" deinterlacer use Avistynth - search for famous QTGMC http://avisynth.nl/index.php/QTGMC
As there is no perfect deinterlacer then lot of people complain that deinterlacing is lossy processing - this is not true - deinterlacer trying to guess information lost in interlacing process - some deinterlacer are just better in guessing.
Re: Need recommendation on Video Conversion
I have been in the streaming media industry since 2008. I am well versed in the usage of FFmpeg so much so that I felt compelled to write an article to debunk bad information regarding how to use FFmpeg to create streaming media compliant video. That article can be found at the link below.
https://videoblerg.wordpress.com/2017/1 ... -it-wrong/
https://videoblerg.wordpress.com/2017/1 ... -it-wrong/
Re: Need recommendation on Video Conversion
Strangely you are not using private libx264 options and ffmpeg is known to support only subset options normally available trough private libx264 option - for example:navilor wrote: ↑Fri Jul 05, 2019 2:50 amI have been in the streaming media industry since 2008. I am well versed in the usage of FFmpeg so much so that I felt compelled to write an article to debunk bad information regarding how to use FFmpeg to create streaming media compliant video. That article can be found at the link below.
https://videoblerg.wordpress.com/2017/1 ... -it-wrong/
Code: Select all
@SET x264opts="crf=%vq%:level=4.1:qpmin=8:cabac=1:keyint=infinite:no-deblock=1:no-mbtree=1:me=dia:rc-lookahead=5:ref=3:subme=0:no-weightb=1:weightp=0:trellis=0:no-scenecut=1:no_psnr=1:no_ssim=1:fullrange=on:overscan=show:colorprim=bt709:transfer=bt709:colormatrix=bt709"
Shorten GOP improve trick modes (random access over video) also adding RAP may improve video accessibility.
Also should have proper SEI and VUI and level - this is important for best video playout not only on PC but also on HW players.
However seem that OP need solution to archive (long term store) own videos not streaming settings.
'