Log in

View Full Version : Lossless Container Format question


dcbdbis
24th May 2011, 02:36
I've got a lot of video's online from using dvdbackup to my HDD on videos I own. Copyright is not an issue.

My 2TBb drive is getting full. I have done lots of transcoding and stuff like that so I am not a noob.

I am absolutely not an expert in containers and the relative merits /demerits of one container format over another.

Now I want now to transcode my library to a compressed, yet lossless format.

I am asking the community for a container format that will be lossless, yet allow some level of compression.


Suggestions please?


Thank You!


Sincerely and Respectfully,


Dave

kypec
24th May 2011, 07:18
Video originating from DVD is not lossless so the fastest solution for you is to copy whole DVD into ISO image (full copy) or remux needed parts (main movie only) into MKV container for instance.

dcbdbis
24th May 2011, 08:31
Thank you for the reply. I appreciate it.

I totally understand that vob files are lossy.

Permit me to clarify. I have 2 Tb of movies from my collection on my hdd that got there using the "dvdbackup -M -i /dev/sr0". Of course in their own folders. So I'm not looking at re-ripping any DVD, although I own the DVD's and could do that if that is the best recommendation. I'm trying to identify a container format that is lossless from the standpoint of not losing any further quality in converting them into some sort of (hopefully)compressed format, without quality loss of what I already have on my drive. Then it is my intention to delete the original dvdbackup files after the conversion.

My goal is to convert my library to another format to recover disk space.

I'm an older guy (ok, I'm pushing 60) who simply lacks the knowledge of which container format I should use so the resultant conversion doesn't incurr any further loss. I want to convert them to a different container in an attempt to regain some HDD space by deleting the raw backup and supporting files that I don't use.

And if the best answer is to buy more storage I can do......But I'm really of the suspicion that I can recover a lot of space by eliminate all of the ancillary files that using dvdbackup in the mirror mode puts on your HDD.

I'm on Arch Linux which is a rolling release distro, so I continually have the latest and greatest of stuff. Be that the latest ffmpeg, gstreamer, etc. I can use the cli all day long, I just need a recommendation of a container format to put things in.

Again, I appreciate your reply and post.... Thank you!


Sincerely and respectfully,


Dave

Ghitulescu
24th May 2011, 08:42
It appears that you don't understand. There's no ZIP or RAR compression for the video as it is say FLAC for audio, because the audio one has is uncompressed (except for online shops), while the video is always compressed. Likewise one cannot losslessly recompress a 320kbps MP3 into a 128kbps one to gain space. It may be of course recompressed, but at the expense of quality losses. How visible/audible are these, you are the only one to decide.
Losslessly repacking of VOBs into say MKVs won't save you much (the extras and some menus will be gone, but the video stays as it is).

dcbdbis
24th May 2011, 09:07
You are likely correct in that I don't understand. If I said anything offensive or bristly, that was not at all my intent. Please accept my apologies.

I readily acknowledge that I'm out of my area of expertise in multimedia. I can cli ffmpeg all day long, but just didn't know what I didn't know!

But you did provide me the information I needed, that moving to an MKV doesn't save much......And that comes from someone more experienced in multimedia than I, and I accept that without reservations.

It looks like my best answer is more storage space. Or cull some of the movies I haven't watched in a while, rather than keep my entire DVD collection that I own on HDD.

I'm going to mark this thread as solved. The folks in the Arch Linux forums said this was the place to go, and I do believe that I have my answer.

May I ask one more question please? What about the ogv format and just with trial and error adjusting bitrates? Anything to be gained there? I mean technically it's lossy as I understand it. But if I can't see the loss, then that's good enough for me.

Sounds like trial and testing is the best way to go if I have my mind set on converting formats.

I apologize, I was looking for a magic "bullet" where if I used format "abc" then I could gain some compression but not lose anything. I think my best solution is to purchase more storage. I mean with sata HDD's at the low cost they are, and compare that to all the CPU time in the transcoding process......and my not being sure of which container format to use..... More storage is certainly a way around it all!


Again, Thanks to all for the replies. I appreciate it.


I meant no offence to anyone in asking for help.

Sincerely and Respectfully,


Dave

dcbdbis
24th May 2011, 09:10
I don't see an edit option to mark the original post subject line as [SOLVED]....Am I missing something?

kypec
24th May 2011, 09:52
This forum doesn't support [SOLVED] feature, and you don't have to apologize in each post either. You came here, asked your question(s) and we replied to best of our knowledge regarding your problem.
Well, I think you should at least read a bit on the following subjects in video compression:
MPEG2 format (that's what you have on each regular DVD and also in your backups currently) - this is the least efficient video format (occupies the most data space) -> you could achieve about 20% - 50% smaller files if the video was re-compressed into MPEG4 ASP format (look for xvid encoder around here) without any noticeable visual quality loss.
Or, you can aim for even lower filesize (again without perceived quality loss) by re-compressing the video into MPEG4 AVC format (look for x264 encoder) but you should make sure that your playback device supports these formats and respective containers (AVI, MP4, MKV) before going the route of the time consuming re-encode process of your library ;)

Ghitulescu
24th May 2011, 10:05
You are likely correct in that I don't understand. If I said anything offensive or bristly, that was not at all my intent. Please accept my apologies.

Again, Thanks to all for the replies. I appreciate it.


I meant no offence to anyone in asking for help.

Sincerely and Respectfully,


Dave

No need to apologise :)
This is why I explained you some issues using analogies.
Each of us was once a newbie ;)

Chetwood
25th May 2011, 05:58
Losslessly repacking of VOBs into say MKVs won't save you much (the extras and some menus will be gone, but the video stays as it is).
Actually with 2 TB of VOBs it might make a difference. At least it did when I converted my Matrix ISO to MKV for a test.

mariush
25th May 2011, 06:18
In general, VOB files are MPEG2 video with one or several AC3 tracks or uncompressed audio. So we're looking at 8-15 mbps for video , about 1.4 mbps for uncompressed stereo sound and 192 kbps for AC3 Stereo/640kbps for 5.1 sound or around that value.

By re-compressing the video part to h264, you may get a close to transparency result (meaning it will be very hard for you to notice the difference visually) by choosing some high quality compression settings and an average of about 4-6 mbps in bitrate for the video part. The audio part... the savings in disk space would be very small, so it's not worth it... I would just copy the audio tracks to the new container. You may save some space by choosing to keep just the main audio track from the ones on the discs.

So, I would say you would probably manage to reduce those 2 TB to about 700-900 GB of disk space by encoding to h264.

Now it's up to you to decide if it's worth spending 3-6 hours (or even more depending on how powerful your computer is) to encode just one movie from that collection, paying 10-20$ on additional electricity and be bothered by the noise from your computer for days in a row, when you could just spend 60-80$ on a second 2 TB drive and have room for expansion.

PS. For a real world example, I have compressed some episodes of MASH 4077 from DVDs I own to h264 + original audio tracks. Originally, there were eight episodes on a disc, totalling 7.29 GB. I've managed to compress using h264 at an average of 1600 kbps while both audio tracks were 192 kbps each (AC3 Stereo). So the eight episodes on drive are 2.66 GB, much less than the 7.29 GB on DVD. But in this case, the episodes can be compressed very well - lots of movies will need much more bitrate to maintain as much information as possible.

Ghitulescu
25th May 2011, 06:18
Actually with 2 TB of VOBs it might make a difference

It was meant in the context of an imaginary huge reduction à la BD50 -> MKV 400MB (via MeGUI) without loss of quality (as such requests became frequent on this forum).

For me compression also means 1% (from 100MB to 99MB) but for most people there shloud be at least 5-10x less (like MP3 or divx) to be qualified as a compression.

Ghitulescu
25th May 2011, 12:45
Now it's up to you to decide if it's worth spending 3-6 hours (or even more depending on how powerful your computer is) to encode just one movie from that collection, paying 10-20$ on additional electricity and be bothered by the noise from your computer for days in a row, when you could just spend 60-80$ on a second 2 TB drive and have room for expansion.

Finally someone was kind enough to give me some numbers to my assertion I made long time ago (I don't do conversions so I don't know how much time a conversion would need). If I would backup my DVD collection I would need some 6000 hours only for encoding: that's more than 8 months of non-stop encoding, almost 3 years if done after working hours. For my 50-60 Blu-rays I would need a comparable duration, as HD2HD often needs 12h or more per encoding.
:p

ramicio
6th June 2011, 22:39
What slow computers are you people using that it takes this long to transcode from DVD to x264? 4x and > realtime is not that difficult to achieve. 12 hours to encode from HD to HD? My i7 920 spanks that and it is by no means a state of the art machine. Sorry, but electricity is cheaper than amassing hard drives.

mariush
6th June 2011, 23:19
x264 has a lot of configuration options, which you can change to trade quality for speed. So someone can either try to retain as much quality as possible but encode things very slowly, or that someone can do what you do - use some existing preset with average quality settings but fast encoding speed.

In my own case, as I keep the computer running almost non-stop and encode throughout the night while I sleep, I don't care about the encoding speed so I prefer to edit the settings in such way that any additional quality setting would no improve the result within reasonable time (for example if it takes 4 hours to encode a 1 hour long video, I won't enable a quality setting that would improve the quality by 1% if it takes an additional 2 hours of encoding time)


PS. Now if I wanted to encode a DVD so I could watch it on the road on an iPhone, squinting my eyes on a poor quality screen (relative, compared to big monitors not phones), I would just use a preset and get the video encoded fast, at 3-5x - I won't care about quality for one time viewing.

ramicio
7th June 2011, 02:08
I gave up encoding movies especially for my iPhone just because I never found myself actually tolerating sitting there holding a tiny phone and staring at a tiny screen. I don't use any presets, I just specify a bitrate. I just keep a high bitrate as to not need crazy profiles to extract the most out of the bitrate that I can get. I keep a decent speed, I just do 2 passes. Some of those stupid command switches like slowing down the encoding just to slow it down, I can't even imagine making a difference down to the bit.

cord-factor
7th June 2011, 18:41
dcbdbis, there is no way to get video smaller size without quality lossing.

hello_hello
8th June 2011, 20:07
Finally someone was kind enough to give me some numbers to my assertion I made long time ago (I don't do conversions so I don't know how much time a conversion would need).

So you don't know the numbers are a complete exaggeration? And I wonder where you've got to live for a PC to use $20 to $30 worth of electricity to encode a movie.

If I would backup my DVD collection I would need some 6000 hours only for encoding: that's more than 8 months of non-stop encoding, almost 3 years if done after working hours. For my 50-60 Blu-rays I would need a comparable duration, as HD2HD often needs 12h or more per encoding.
:p

It's a pity you didn't do it as you went. It's a lot easier that way. Plus don't forget, you're only setting up the encoding jobs. You don't have to sit and watch the whole encoding process. Anyway, you should be able to encode a DVD in real time, so you're hardly needing any extra time to encode a DVD if you set the PC about converting it while you're watching it and do both at the same time.

If HD2HD needs 12h or more you need a faster PC, and/or to stop wasting time with 2 pass encoding.
Those 1000(?) DVDs you own, and those 50 to 60 BluRays. I have a 2TB drive containing around 1000 movie encodes taken from DVDs and BluRay. Originally as AVIs, now usually as MKVs. It's connected to the home network, anyone can access it, and the files will play on a far larger number of devices than a disc will.

And of course don't forget the OP is currently storing his movie collection on a hard drive without encoding, so it'd be safe to assume he wants to keep it on a hard drive for convenience. Copying DVDs may be one thing, even though they usually take up to around three times the space of an AVI, but when you're talking 20, 30 or 50GB per BluRay movie, unencoded, that extra storage space would add up.
And what about portable devices? Okay maybe it's not a stretch to copy 4GB of vob files, but how many 30GB BluRay movies will you fit on your iphone and how long would it take to transfer them?

Personally I don't think encoding movies from disc is extra work, I think it's mandatory in order to get the video off such antiquated media and into a format where it can be used on a variety of devices for a long time.

Chetwood
9th June 2011, 05:31
So you do think encoding Blurays makes sense? I mean, I wouldn't want to downscale that resolution from 1080p.

hello_hello
9th June 2011, 06:28
So you do think encoding Blurays makes sense? I mean, I wouldn't want to downscale that resolution from 1080p.

Do you need the video to be 1080p on every device you play it? I guess for the 1080p times, you can still use the disc. Or you can of course encode it at it's original resolution (1080p etc)

I've done a little experimenting encoding/watching video on my PC and TV. As a general rule, I can't see the difference between 1080p and 720p on the TV. I guess it's not big enough or I don't sit close enough.
I've even zoomed in 300% on the PC monitor, and a decent 720p encode and the original video is seriously close to looking exactly the same (I use CRF 19). In order to make the file sizes manageable, a 1080p encode probably needs a higher CRF value and even then files sizes usually increase by quite a bit, but after making a few comparison encodes, I think a 720p CRF 19 encode usually looks better than 1080p at a CRF of 21 or 22. There's not much in it, but the 720p file sizes are smaller, they encode much faster and I think they look better. Well that's just me anyway.....

Chetwood
10th June 2011, 06:41
Of course I can use the disc but I hate playing DJ so all discs are stored in the basement and the media are stored on my NAS. Since I don't need to encode for portable devices I want to stick with 1080p. Given the efficiency of the h264 codec I'm wondering how much space can be saved by another encode without visible quality loss.

boykillsworld
11th June 2011, 16:13
Well I own many blu-ray encodings and I have a 47" LG with a 4 million:1 contrast ratio. I use handbrake set up in high profile with the standard setting of an RF or 20. It takes about 8 hours to encode with my quad core 945 AMD and then I mux in all the english high def audio from the original using mkvmerge. I don't see any noticeable quality loss. The file size goes from 20-30 gigs to 8-15 gigs. If you have a larger TV or eagle eyes perhaps your results will vary. I also use handbrake with the same settings for DVDs. It takes about an hour and a half but I cannot tell the encode from the original. I'm sure you can pause it then do a side by side but for me it looks the same.