|
Coffee Shop Talk of a non sexual Nature Visit Sam's Alfresco Heaven. Singapore's best Alfresco Coffee Experience! If you're up to your ears with all this Sex Talk and would like to take a break from it all to discuss other interesting aspects of life in Singapore, pop over and join in the fun. |
|
Thread Tools |
#1
|
|||
|
|||
Chitchat Example Linux Video Power Demo: what can be done w just a single command lin
An honorable member of the Coffee Shop Has Just Posted the Following:
I got to test out the capabilities and limitations of a new model media player, basically to find out what video it can support / not-supported. Kind of a new product assessment task. So I need to have a bunch of different video files in all sorts of codecs; resolutions; bit-rates, etc, and copy all those into a USB thumb drive and plug in to the new product to test playback, so I can mark a table to show what can it support / not-supported. So I use my recent video which is this: And I went on a Linux PC running Ubuntu and got the powerful media tool libav-tools, in just a single line I issued this command line: Code: user1@ubuntu:~$ for resolution in 640x480 720x576 1024x768 1920x1080 ; do for bitrate in 250k 800k 1500k 2000k ; do for codec in mpeg4 h264; do avconv -i /home/user1/Ah.Loong.Peng.San.2016.Anthum.mp4 -s $resolution -b:v $bitrate -strict -2 loong.$codec.$resolution.$bitrate.mp4 ; done ; done; done; I generated 32 files as follows: Code: user1@ubuntu:~$ ls -l loon* -rw-rw-r-- 1 user1 user1 6463766 Sep 6 18:36 loong.h264.1024x768.1500k.mp4 -rw-rw-r-- 1 user1 user1 8454428 Sep 6 18:36 loong.h264.1024x768.2000k.mp4 -rw-rw-r-- 1 user1 user1 1515838 Sep 6 18:35 loong.h264.1024x768.250k.mp4 -rw-rw-r-- 1 user1 user1 3679617 Sep 6 18:36 loong.h264.1024x768.800k.mp4 -rw-rw-r-- 1 user1 user1 6421479 Sep 6 18:38 loong.h264.1920x1080.1500k.mp4 -rw-rw-r-- 1 user1 user1 8303767 Sep 6 18:38 loong.h264.1920x1080.2000k.mp4 -rw-rw-r-- 1 user1 user1 1509134 Sep 6 18:37 loong.h264.1920x1080.250k.mp4 -rw-rw-r-- 1 user1 user1 3695441 Sep 6 18:37 loong.h264.1920x1080.800k.mp4 -rw-rw-r-- 1 user1 user1 6416268 Sep 6 18:34 loong.h264.640x480.1500k.mp4 -rw-rw-r-- 1 user1 user1 8398257 Sep 6 18:34 loong.h264.640x480.2000k.mp4 -rw-rw-r-- 1 user1 user1 1520208 Sep 6 18:34 loong.h264.640x480.250k.mp4 -rw-rw-r-- 1 user1 user1 3651470 Sep 6 18:34 loong.h264.640x480.800k.mp4 -rw-rw-r-- 1 user1 user1 6420050 Sep 6 18:35 loong.h264.720x576.1500k.mp4 -rw-rw-r-- 1 user1 user1 8395943 Sep 6 18:35 loong.h264.720x576.2000k.mp4 -rw-rw-r-- 1 user1 user1 1518996 Sep 6 18:34 loong.h264.720x576.250k.mp4 -rw-rw-r-- 1 user1 user1 3657933 Sep 6 18:35 loong.h264.720x576.800k.mp4 -rw-rw-r-- 1 user1 user1 6463766 Sep 6 18:36 loong.mpeg4.1024x768.1500k.mp4 -rw-rw-r-- 1 user1 user1 8454428 Sep 6 18:36 loong.mpeg4.1024x768.2000k.mp4 -rw-rw-r-- 1 user1 user1 1515838 Sep 6 18:35 loong.mpeg4.1024x768.250k.mp4 -rw-rw-r-- 1 user1 user1 3679617 Sep 6 18:36 loong.mpeg4.1024x768.800k.mp4 -rw-rw-r-- 1 user1 user1 6421479 Sep 6 18:38 loong.mpeg4.1920x1080.1500k.mp4 -rw-rw-r-- 1 user1 user1 8303767 Sep 6 18:38 loong.mpeg4.1920x1080.2000k.mp4 -rw-rw-r-- 1 user1 user1 1509134 Sep 6 18:37 loong.mpeg4.1920x1080.250k.mp4 -rw-rw-r-- 1 user1 user1 3695441 Sep 6 18:37 loong.mpeg4.1920x1080.800k.mp4 -rw-rw-r-- 1 user1 user1 6416268 Sep 6 18:34 loong.mpeg4.640x480.1500k.mp4 -rw-rw-r-- 1 user1 user1 8398257 Sep 6 18:34 loong.mpeg4.640x480.2000k.mp4 -rw-rw-r-- 1 user1 user1 1520208 Sep 6 18:33 loong.mpeg4.640x480.250k.mp4 -rw-rw-r-- 1 user1 user1 3651470 Sep 6 18:34 loong.mpeg4.640x480.800k.mp4 -rw-rw-r-- 1 user1 user1 6420050 Sep 6 18:35 loong.mpeg4.720x576.1500k.mp4 -rw-rw-r-- 1 user1 user1 8395943 Sep 6 18:35 loong.mpeg4.720x576.2000k.mp4 -rw-rw-r-- 1 user1 user1 1518996 Sep 6 18:34 loong.mpeg4.720x576.250k.mp4 -rw-rw-r-- 1 user1 user1 3657933 Sep 6 18:35 loong.mpeg4.720x576.800k.mp4 Names of each file specified their exact type of video codec + resolution + bit rate Just as easy as that. You can have more different video codecs, resolutions, and bit rates combinations, still one single line command to generate hundreds of files for testing. I used 3 level nested loop, you can actually have 10 levels or more, if you want to have complicated combinations, of different video/audio codecs, frame rates, qualities, aspect ratios, scaling, cropping, stereo/mono/AC3, different multiplexing etc, resulting in hundreds of differently rendered video files, to test your media player for example. You can do lots of complicated wonders from just a bash shell terminal, issue a single command line. You can be issuing this command remotely, on the other end of planet earth, to a huge data center rendering farm or a supercomputer, just from your Andriod handphone via a bash shell app! It will be done ultra fast. In my example command line, my combinations are: 2 different video codecs (mpeg4 and H.264) 4 different video resolutions (640x480 720x576 1024x768 1920x1080) 4 different video bit rates (250k 800k 1500k 2000k) And from the files listed, you can see that file sizes for my combinations ranges from 1.5MB to 8.4MB for different qualities. Shiok or not? Click here to view the whole thread at www.sammyboy.com. |
Advert Space Available |
Bookmarks |
|
|
t Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Chitchat Example Linux Video Power Demo: what can be done w just a single command lin | Sammyboy RSS Feed | Coffee Shop Talk of a non sexual Nature | 0 | 07-09-2016 10:30 AM |
Chitchat Example Linux Video Power Demo: what can be done w just a single command lin | Sammyboy RSS Feed | Coffee Shop Talk of a non sexual Nature | 0 | 07-09-2016 10:20 AM |
power! Linux Kernel 4.1 released | Sammyboy RSS Feed | Coffee Shop Talk of a non sexual Nature | 0 | 09-08-2015 12:10 PM |
power! Linux Kernel 4.1 released | Sammyboy RSS Feed | Coffee Shop Talk of a non sexual Nature | 0 | 09-08-2015 06:40 AM |
power! Linux Kernel 4.1 released | Sammyboy RSS Feed | Coffee Shop Talk of a non sexual Nature | 0 | 09-08-2015 06:20 AM |