[gentoo-user] Re: converting any video to mpeg-1, mpeg-4 or DivX-5
Iain Buchanan iaindb at netspace.net.au writes: I have lots of different types of video files - from short funny ads, to 1/2 hr tv episodes, to full movies, in all sorts of formats - wmv, avi, mpeg, etc. yes we all suffer from numerous types of video. Often the differences are trite, just enough to intice cosumers(microsoft victims) to go out and spend money unnecessarily. I want to find a program (hopefully only 1!) that will help convert them to a format playable by the device. I'm happy if thats a command line only program. I will probably copy them 1 by 1 as I want to watch them. yes well that's the dream we all share. Currently, it a work in progress and to be robust, your going to use many different pieces of code. When ffmpeg hits 1.0 your dream might be close Space it not too much of an issue (I'll eventually have about 60Gb on the device) - I'd rather not lessen the quality any more than it is already. Disc space is a relative thing. It always get's filled up. Human nature. You will never have enough disk space for adults is like candy for children, never, ever enough. So, here are my questions: 1. whats the best format to use out of the ones listed, given Well you first have to realize that 'mpeg 4' is like saying I want a car. It has numerous classifications and profiles that allow a vendor to deliver 'mpeg 4' which is a virtual blend of mathematical technologies that are slightly incompatible with other vendor's equipment and software. Take remote video surveillance. 'MPEG 4 ASP', is often referred to as the simple profile. The last time I look Mpeg4 has 18 visual object types and 19 different visual profiles: Nine of the visual profiles are defined my MPeg4 visual version one: simple, simple scalable, main, n-bit, core, Scalable texture, basic animated texture, simple face animation and hybrid It goes on and on and on. In essence when a vendor tells you, it's mpeg4 it may be interoperable mpeg4 based video and it may not be. Enter REVERSE ENGINEERING. Good news. Mpeg4 porfile 10 AVC is the same as ISO's H.264, except for some minor header differences. Currently. H.264 delivers the highest quality for a given level of compression (that's the natural trade off for all video and images, i.e. quality vs size. Human perception of quality does not mimick mathematical measurements of quality, i.e. quality as perceived by humans is subjective, interspersed with some established proven techniques. That's why video is so complicated. The perception of quality is mostly subjective with some mathematical tendencies. H.264 is the best (current consensus of experts) but, it is licensed and owned by nefarious video moguls. Still there are filters in the public domain that allow for conversion (ffmpeg for one) others exist. H.264 which the same as 'mpeg4 part 10 AVC' is still a work in progress as the various mathematical tools available are staggering. Kalman filters is my favorite H.264 is CPU intensive, particularly on the encoding side of compression. However, there are those that believe 'theora' will be dominant or dam close, in the not to distant future. MJpeg makes nice video streams, but for broadcast in uses twice as much bandwidth to an equivalent (remember based on subjective human evaluations) h.264 video stream. This may not be a factor on a LAN, but it dominates WAN considerations. a) Good quality (not much less than, or the same as original) Use H.264 until theora matures. b) Size reasonable - large files ok, but compression is always a bonus) H.264 2. what program will convert 'anything' to said format. Ah, well, being a computer scientist, I dabble in things that are, incomplete. If/when you find a simple package to do robust video manipulations of all sorts, do drop me a line. For now, plan on using a palate of code and packages. All things video are a work in progress. I can run (2) color video streams over a 56 kbps frame relay link, with acceptable quality for a utility. For their needs, nothing is close to H.264, at this time, as we have evaluated dozens of formats. H.264 is also the most efficient in raw video storage. Still I stuggle with a software package that will run on linux; one day. H.264 is largely being ignored by the 'open source' community, for obvious reason, but, it does yeild stunning results. HTH, James -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: converting any video to mpeg-1, mpeg-4 or DivX-5
On 15 December 2005 17:02, James wrote: [ snip - lots of good stuff ] All things video are a work in progress. I can run (2) color video streams over a 56 kbps frame relay link, with acceptable quality for a utility. For their needs, nothing is close to H.264, at this time, as we have evaluated dozens of formats. H.264 is also the most efficient in raw video storage. Still I stuggle with a software package that will run on linux; one day. H.264 is largely being ignored by the 'open source' community, for obvious reason, but, it does yeild stunning results. I can only agree on each single point. We managed to encode a 1h45m movie in full TV quality (which isn't all that much quality) using H.264 with a resulting file of about 500MB!! It took 5 hours on a dual G5 (yes, a mac). So encoding is rather expensive. Decoding can be done on the fly. Especially interesting for me is that I can stream it using just about 100Kb/s per stream. My target is a LAN with hundreds of simultaneous streams, and H.264 let me get away with Gb technology for the backbone. All that said, I *can* watch H.264 on linux by now. No audio yet, though. That's not the fault of ffmpeg; it's just that the encoding software on the mac uses some audio codec I can not get my hands on for linux - yet. Encoding H.264 on linux is a different bowl of fish. Last time I tried it, the result was - how should I put it? - bizarre. But then, it is, like James said, a work in progress. I had a ffmpeg snapshot from August, and it couldn't display it at all. Got a snapshot from November, and it did it beautifully - except for the audio. For now, I use macs for a commercial product. The moment things get right on linux, I'll drop macs and use linux boxes in newer deployments. Uwe -- Unix is sexy: who | grep -i blonde | date cd ~; unzip; touch; strip; finger mount; gasp; yes; uptime; umount sleep -- gentoo-user@gentoo.org mailing list
[gentoo-user] Re: converting any video to mpeg-1, mpeg-4 or DivX-5
Uwe Thiem uwix at iway.na writes: I can only agree on each single point. So encoding is rather expensive. Well, I have a solution for this. openmosix: http://openmosix.snarc.org/ http://openmosix.sourceforge.net/ I'm just a little timid to jump in now, as I'm drowning with current obligations, promises, and a general lack of deliverables Encoding H.264 on linux is a different bowl of fish. Last time I tried it, the result was - how should I put it? - bizarre. But then, it is, like James said, a work in progress. I had a ffmpeg snapshot from August, and it couldn't display it at all. Got a snapshot from November, and it did it beautifully - except for the audio. For now, I use macs for a commercial product. The moment things get right on linux, I'll drop macs and use linux boxes in newer deployments. Amen bro! I owe you some code. I have not forgotten. I did just get my elphel 333 so it has captured my imagination and spare cpu_cycles at the moment. I use DSPs both commercial and homespun_dev_hardware to encode h.264. FPGA are on the near horizon. Andrey has built one hell of a camera, and I'd encourage anyone serious about video to purchase one of these *bad_boys*. He's my latest hero when it comes to video! He has open sourced the hardware and software, so I'll be noodling around with verilog(VHDL) now, as if I did not have enough things to eat away my time. http://www.elphel.com http://www.linuxdevices.com/articles/AT335064.html James -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: converting any video to mpeg-1, mpeg-4 or DivX-5
Success! Partially at least (skip to the bottom if you want to know how!) On Thu, 2005-12-15 at 15:02 +, James wrote: Iain Buchanan iaindb at netspace.net.au writes: Space it not too much of an issue Disc space is a relative thing. It always get's filled up. Human nature. You will never have enough disk space for adults is like candy for children, never, ever enough. good point - same with memory, processor speed, etc. As soon as you have more, something more intensive comes out to use it... So, here are my questions: 1. whats the best format to use out of the ones listed, given Well you first have to realize that 'mpeg 4' is like saying I want a car. [snip] wow. After reading your post, I realise it's much more complicated that I first thought... Use H.264 until theora matures. Unfortunately, with the comments from you and Uwe, I don't think H.264 will be suitable. Firstly, I doubt my little low powered video device will decode it, secondly I doubt I can encode it properly on linux, as good as it sounds. I think I will be happy with something simpler, even though it may be a lower quality (that's the human subjective perception of the quality of course :) I guess it's like when people ask me for a recommendation on purchasing computers. They want to buy the cheap sub-$1000 all in one deals, and I say stay away, you're better off in the long run going for something more expensive, with a better quality, longer life, etc. However, sometimes they purchase their sub-$1000 PC's and they're perfectly happy, because they don't use it like I do, and they haven't had the experience with higher quality. HTH, absolutely! --- So, this is what I've come up with so far (for those following the thread). Simply: ffmpeg -i test.wmv -b 4000 -s 640x480 -an test.mp4 (It's the filename .mp4 that did it! note the -an produces no audio) $ file test.mp4 test.mp4: ISO Media, MPEG v4 system, version 1 however: $ ls -alh test* -rw-r--r-- 1 iain users 8.5M 2005-12-16 09:18 test.mp4 -rw--- 1 iain users 1.8M 2005-12-15 21:51 test.wmv as you can see, thats ~4x the size of the original... and thats without sound. That's not so good... Well, I still have a bit to go, but at least I know I can put _something_ on the device! If anyone is interested, I can keep posting back here with my results. PS, can someone give me an example of how to encode divx with mencoder or ffmpeg? Or any program on linux for that matter? thanks! -- Iain Buchanan iaindb at netspace dot net dot au Mater artium necessitas. [Necessity is the mother of invention]. -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: converting any video to mpeg-1, mpeg-4 or DivX-5
Iain Buchanan wrote: Success! Partially at least (skip to the bottom if you want to know how!) On Thu, 2005-12-15 at 15:02 +, James wrote: Iain Buchanan iaindb at netspace.net.au writes: Space it not too much of an issue Disc space is a relative thing. It always get's filled up. Human nature. You will never have enough disk space for adults is like candy for children, never, ever enough. good point - same with memory, processor speed, etc. As soon as you have more, something more intensive comes out to use it... So, here are my questions: 1. whats the best format to use out of the ones listed, given Well you first have to realize that 'mpeg 4' is like saying I want a car. [snip] wow. After reading your post, I realise it's much more complicated that I first thought... Use H.264 until theora matures. Unfortunately, with the comments from you and Uwe, I don't think H.264 will be suitable. Firstly, I doubt my little low powered video device will decode it, secondly I doubt I can encode it properly on linux, as good as it sounds. I think I will be happy with something simpler, even though it may be a lower quality (that's the human subjective perception of the quality of course :) I guess it's like when people ask me for a recommendation on purchasing computers. They want to buy the cheap sub-$1000 all in one deals, and I say stay away, you're better off in the long run going for something more expensive, with a better quality, longer life, etc. However, sometimes they purchase their sub-$1000 PC's and they're perfectly happy, because they don't use it like I do, and they haven't had the experience with higher quality. HTH, absolutely! --- So, this is what I've come up with so far (for those following the thread). Simply: ffmpeg -i test.wmv -b 4000 -s 640x480 -an test.mp4 (It's the filename .mp4 that did it! note the -an produces no audio) $ file test.mp4 test.mp4: ISO Media, MPEG v4 system, version 1 however: $ ls -alh test* -rw-r--r-- 1 iain users 8.5M 2005-12-16 09:18 test.mp4 -rw--- 1 iain users 1.8M 2005-12-15 21:51 test.wmv as you can see, thats ~4x the size of the original... and thats without sound. That's not so good... Well, I still have a bit to go, but at least I know I can put _something_ on the device! If anyone is interested, I can keep posting back here with my results. PS, can someone give me an example of how to encode divx with mencoder or ffmpeg? Or any program on linux for that matter? thanks! On My site I wrote about DVD 2-Pass encoding to xvid (hope its close enough to divx for you, you can do divx as well, but I am not sure how) , Basically this command provides xvid encoding: /mencoder dvd://1 -sws 2 -nosound -ovc xvid -xvidencopts bitrate=580 -o ./video.avi I presume you probably will need to state the input file rather then dvd://1 / -- gentoo-user@gentoo.org mailing list