In my quest to have one encode to rule them all I keep coming back to MPEG-2. It plays on everything from dvd players to smartphones/devices, can be streamable, requires relatively little CPU power, and the patients have expired mostly. One thing I always wondered is if making the GOP longer than 18 really makes a difference. Yes I know it may not seek well, but will it play? well the good news is yes it does and it does well. coupled with ffmpeg using the kvcd matrix (thanks for making this kwag) most of my encodes are ~40% smaller on average vs the standard mpeg matrix and GOP 18. Only major trade off is seeking delay on devices...but how many of us do that instead of letting the movie play. yes even roku's will play these as long as you remux to a mkv file. Attached are samples, scripts, and a DVD iso to try if you like. some caveats before the screenshots:
--yes I hard interlaced my sources and burned subs. Pretty much every device can decently bob, but cant consistently do pulldown properly and oddly add interlacing artifacts. I mean from your $10 used dvd player to you high end smart tv is what im going for. Subs are burned as not all devices can render properly.
--all the make it look better stuff (-mbd 2, -trellis 2, etc) oddly hurt visual quality but raise the ssim quality. I guess these were made with the standard mpeg-2 matrix in mind.
--threads 1 is intentional. more threads cause ghosting to appear as the gop gets longer.
--3 pass is intentional. pass 1 to get the ballpark, pass 2 for vbr and pass 3 for finalizing and even finer bitrate compliance.
--pass 0: preprocess and cutpoints:
ffmpeg -i anime-002.mkv -i anime-002.idx -filter_complex "crop=1912:1036:4:20[crop];[crop]scale=720:480:flags=spline[resized];[resized]colorspace=all=bt601-6-525:iall=bt709[DVD];[1:s]scale=720:480[ovr1];[DVD][ovr1]overlay[subbed];[subbed]smartblur,unsharp[clean];[clean]fps=60000/1001,interlace=tff:0[final]" -map [final] -map 0:a -c:a pcm_s16le -ac 1 -ar 48000 -c:v libx264 -qp 0 -preset ultrafast -g 1 -segment_times 01:29:27.779 -reset_timestamps 1 -segment_list anime-002.cutlist -segment_list_type ffconcat -f segment anime-002-raw%03d.mkv
#
ffmpeg -i live-002.mkv -i live-002.idx -filter_complex "crop=1920:960:0:64[crop];[crop]scale=720:432:flags=spline[resized];[resized]colorspace=all=bt601-6-525:iall=bt709[DVD];[1:s]scale=720:432[ovr1];[DVD][ovr1]overlay[subbed];[subbed]smartblur,unsharp[clean];[clean]fps=60000/1001,interlace=tff:0[interlace];[interlace]pad=720:480:0:32[final]" -map [final] -map 0:a -c:a pcm_s16le -ac 1 -ar 48000 -c:v libx264 -qp 0 -preset ultrafast -g 1 -segment_times 01:29:27.779 -reset_timestamps 1 -segment_list live-002.cutlist -segment_list_type ffconcat -f segment live-002-raw%03d.mkv
--pass 1,2,3 (add remove #'s after 1st pass and fill in bitrate from first pass)
rm /home/witzel/Desktop/vhelp/live-002-pass1.m2v
ffmpeg -f concat -i /home/witzel/Desktop/vhelp/live-002.cutlist -vf setfield=tff -f dvd -muxrate 10080k -packetsize 2048 -c:v mpeg2video -maxrate:v 9000k -minrate:v 0 -bufsize:v 1835008 -aspect 16/9 -dc 10 -g 240 -bf 2 -intra_matrix 8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37,12,14 ,18,27,29,34,37,38,22,26,27,31,36,37,38,10,26,27,2 9,36,39,38,40,48,27,29,34,37,38,40,48,58,29,34,37, 38,40,48,58,69,34,37,38,40,48,58,69,79 -inter_matrix 16,18,20,22,24,26,28,30,18,20,22,24,26,28,30,32,20 ,22,24,26,28,30,32,34,22,24,26,30,32,32,34,36,24,2 6,28,32,34,35,36,38,26,28,30,32,34,36,38,40,28,30, 32,34,36,38,42,42,30,32,34,36,38,40,42,44 -flags +ilme+ildct -alternate_scan 1 -top 1 -passlogfile /home/witzel/Desktop/vhelp/live-002.passlog -threads 1 -q:v 3 -an -pass 1 /home/witzel/Desktop/vhelp/live-002-pass1.m2v
#rm /home/witzel/Desktop/vhelp/live-002-pass1.m2v
#ffmpeg -f concat -i /home/witzel/Desktop/vhelp/live-002.cutlist -vf setfield=tff -f dvd -muxrate 10080k -packetsize 2048 -c:v mpeg2video -maxrate:v 9000k -minrate:v 0 -bufsize:v 1835008 -aspect 16/9 -dc 10 -g 240 -bf 2 -intra_matrix 8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37,12,14 ,18,27,29,34,37,38,22,26,27,31,36,37,38,10,26,27,2 9,36,39,38,40,48,27,29,34,37,38,40,48,58,29,34,37, 38,40,48,58,69,34,37,38,40,48,58,69,79 -inter_matrix 16,18,20,22,24,26,28,30,18,20,22,24,26,28,30,32,20 ,22,24,26,28,30,32,34,22,24,26,30,32,32,34,36,24,2 6,28,32,34,35,36,38,26,28,30,32,34,36,38,40,28,30, 32,34,36,38,42,42,30,32,34,36,38,40,42,44 -flags +ilme+ildct -alternate_scan 1 -top 1 -passlogfile /home/witzel/Desktop/vhelp/live-002.passlog -threads 1 -b:v 1439k -an -pass 3 /home/witzel/Desktop/vhelp/live-002-pass2.m2v
#rm /home/witzel/Desktop/vhelp/live-002-pass2.m2v
#ffmpeg -f concat -i /home/witzel/Desktop/vhelp/live-002.cutlist -vf setfield=tff -f dvd -muxrate 10080k -packetsize 2048 -c:v mpeg2video -maxrate:v 9000k -minrate:v 0 -bufsize:v 1835008 -aspect 16/9 -dc 10 -g 240 -bf 2 -intra_matrix 8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37,12,14 ,18,27,29,34,37,38,22,26,27,31,36,37,38,10,26,27,2 9,36,39,38,40,48,27,29,34,37,38,40,48,58,29,34,37, 38,40,48,58,69,34,37,38,40,48,58,69,79 -inter_matrix 16,18,20,22,24,26,28,30,18,20,22,24,26,28,30,32,20 ,22,24,26,28,30,32,34,22,24,26,30,32,32,34,36,24,2 6,28,32,34,35,36,38,26,28,30,32,34,36,38,40,28,30, 32,34,36,38,42,42,30,32,34,36,38,40,42,44 -flags +ilme+ildct -alternate_scan 1 -top 1 -passlogfile /home/witzel/Desktop/vhelp/live-002.passlog -threads 1 -b:v 1439k -an -pass 3 /home/witzel/Desktop/vhelp/live-002-pass3.m2v
Considering my bitrates come in 1000k-2000k for 480i video I'd call that not bad. Definetly not HD quality but good enough for my goal. just sharing in case there's anyone else like me that still likes to use old but useful items still from thrift stores etc.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 1 of 1
Thread
-
if all else fails read the manual
Similar Threads
-
FFMpeg XDCAM RDD9 Compliant MXF - Gop Structure
By ausmetal in forum Video ConversionReplies: 5Last Post: 9th Dec 2022, 00:12 -
Sony PXW-Z280V AVC strange Long GOP pattern
By blue_oats in forum Video ConversionReplies: 0Last Post: 27th Jul 2022, 12:08 -
FFmpeg - video with a PNG and a WAV as long as the WAV
By frenksisco in forum EditingReplies: 6Last Post: 8th Apr 2022, 14:07 -
cutting off ffmpeg downloads of very long videos
By Skaperen in forum Video Streaming DownloadingReplies: 19Last Post: 12th Nov 2021, 00:48 -
FFmpeg defining/restricting Format Setting GOP M, N frames
By deepfrayder in forum Newbie / General discussionsReplies: 5Last Post: 23rd Dec 2019, 00:43