On Mon, Aug 17, 2020 at 04:13:30PM +1000, Craig Sanders wrote:
> The file size is nearly a gigabyte. You can use ffmpeg or handbrake
> or something to re-encode with x265 to get it smaller (i'd guess that
> transcoding the video to x265 would probably shrink the file by a third to
> a half. maybe more). If you're only going to watch it once and delete it,
> don't bother...but might be worthwhile if you want to archive it for repeat
> viewing.
I transcoded it with handbrake, using the Matroska H.265 720p30 pre-set, but
it only shrunk to 807 MB.
It took nearly an hour to transcode...and that's on my 16-core threadripper
1950x. a lot of CPU time and electricity used (and the fans ramped up to
deal with the excess heat generated) for not much benefit.
This would be significantly faster if my version of handbrake (the debian
handbrake 1.3.1+ds1-2 package) supported NVENC for GPU hardware encoding,
but it doesn't. It's probably a licensing conflict with GPL vs proprietary
nvidia-licensed code that prevents debian from distributing it. I'd have
to re-compile the package on my own machine to enable GPU-encoding.
Apparently the Ubuntu PPA 1.3.3 version of handbrake has it enabled.
Transcoding using the Matroska H.265 576p25 pre-set (i.e. not only transcoding
to a better/newer encoder, but also reducing the resolution from 1280x720 to
720x576 - same aspect ratio of 16:9) in handrake reduced the file from 998 MB
to 548 MB. There's some reduction in quality, but not much.
This took about 40 minutes to transcode.
not worth the bother unless you want to archive and are really short on disk
space.
and even then it would better to use youtube-dl's format and quality options
to download a smaller, lower-qualty video in the first place....they've
been transcoded from much higher quality master videos.
e.g.
$ youtube-dl -F
https://iview.abc.net.au/show/fight-for-planet-a-our-climate-challenge/series/1/video/DO1904H001S00
[abc.net.au:iview] DO1904H001S00: Downloading JSON metadata
[abc.net.au:iview] DO1904H001S00: Downloading webpage
[abc.net.au:iview] DO1904H001S00: Downloading m3u8 information
[info] Available formats for DO1904H001S00:
format code extension resolution note
hls-287 mp4 320x180 287k , avc1.77.30, mp4a.40.2
hls-491 mp4 512x288 491k , avc1.77.30, mp4a.40.2
hls-619 mp4 640x360 619k , avc1.77.30, mp4a.40.2
hls-917 mp4 800x450 917k , avc1.640028, mp4a.40.2
hls-1307 mp4 1024x576 1307k , avc1.640028, mp4a.40.2
hls-1969 mp4 1280x720 1969k , avc1.640028, mp4a.40.2
hls-2099 mp4 1280x720 2099k , avc1.640028, mp4a.40.2 (best)
I'm far from sure, but i'm guessing that the 287k, ... 2099k etc mentioned in
the notes field (and also in the hls-* format codes) are the bandwith rates
for streaming, from 287 Kilobytes per second to 2.1 Mbps.
Anyway, you could download the 576p (1024x576) version with:
$ youtube-dl -f hls-1307 --write-sub --all-subs --embed-subs
https://iview.abc.net.au/show/fight-for-planet-a-our-climate-challenge/series/1/video/DO1904H001S00
[abc.net.au:iview] DO1904H001S00: Downloading JSON metadata
[abc.net.au:iview] DO1904H001S00: Downloading webpage
[abc.net.au:iview] DO1904H001S00: Downloading m3u8 information
[info] Writing video subtitles to: Series 1 Ep 1-DO1904H001S00.en.vtt
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 397
[download] Destination: Series 1 Ep 1-DO1904H001S00.mp4
[download] 100% of 653.70MiB in 01:09
[ffmpeg] Fixing malformed AAC bitstream in "Series 1 Ep 1-DO1904H001S00.mp4"
[ffmpeg] Embedding subtitles in 'Series 1 Ep 1-DO1904H001S00.mp4'
Deleting original file Series 1 Ep 1-DO1904H001S00.en.vtt (pass -k to keep)
It's larger than my transcoded version because it's h.264 rather than the
newer/better h.265....but it only took a minute to download with my 100 Mbps
NBN connection, much better than 40+ minutes to transcode.
The hls-917 (800x450) version is even smaller (438 MB), and still looks OK to
watch even when upscaled to fullscreen on my 2560x1440 27" monitor, or my 42"
1920x1080 TV.
$ ls -lh Series\ 1\ Ep\ 1-DO1904H001S00*.mp4
-rw-r--r-- 1 cas cas 998M Aug 17 15:16 Series 1 Ep 1-DO1904H001S00-best.mp4
-rw-r--r-- 1 cas cas 623M Aug 18 14:05 Series 1 Ep 1-DO1904H001S00-hls-1307.mp4
-rw-r--r-- 1 cas cas 438M Aug 18 14:10 Series 1 Ep 1-DO1904H001S00-hls-917.mp4
craig
--
craig sanders <[email protected]>
_______________________________________________
luv-main mailing list
[email protected]
https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main