|
Is there a command line utility for determining resolution and codec of a video file in linux? I'm attempting to write a script that will run as a cron job and convert video files that meet certain criteria.
|
# ? May 30, 2011 16:55 |
|
|
# ? Jun 7, 2024 06:29 |
|
Modern Pragmatist posted:Is there a command line utility for determining resolution and codec of a video file in linux? I'm attempting to write a script that will run as a cron job and convert video files that meet certain criteria.
|
# ? May 30, 2011 16:59 |
|
Zom Aur posted:file should suffice, I think. How have I been using linux for 10 years and never once heard of this Thank you.
|
# ? May 30, 2011 17:12 |
|
Modern Pragmatist posted:How have I been using linux for 10 years and never once heard of this
|
# ? May 31, 2011 00:17 |
|
You can also use mplayer, for example, mplayer -vo null -ao null -frames 0 foo.mkv, which is very noisy but also produces a lot of useful output:code:
|
# ? May 31, 2011 00:31 |
|
Question: I would like to mount an nfs share when my wifi finally connections. I'm running Ubuntu. Adding it to the .bash_profile doesn't work because there's no network connectivity at logon. How can I capture the connection established event and have it run a script? Could I somehow attempt to mount the share when I get an IP address via DHCP? Also, when resuming from standby it takes about 20 seconds for my wifi to re-establish my connection. How can I speed this up?
|
# ? May 31, 2011 12:21 |
|
politicorific posted:Question: There's a good how-to on the arch wiki: here. politicorific posted:Also, when resuming from standby it takes about 20 seconds for my wifi to re-establish my connection. How can I speed this up?
|
# ? May 31, 2011 12:35 |
|
Shares mounted perfectly, thank you!
|
# ? May 31, 2011 13:39 |
|
How do I associate video files with mplayer in Gnome/Nautilus v3? You can right click on files and do "Open with other application...", but that only shows GUI applications, and doesn't include any sort of option to locate a application yourself. After some googling, I am aware of ~/.local/share/applications/mimeapps.list, but it seems to use .desktop files to make connections, and mplayer obviously doesn't have one of those (if it did, it would be selectable in nautilus already, I imagine). Do I have to learn how to make .desktop files? I swear in Nautilus < 3.0 you were given the option to locate an application yourself .
|
# ? May 31, 2011 14:55 |
|
Kaluza-Klein posted:How do I associate video files with mplayer in Gnome/Nautilus v3? You can right click on files and do "Open with other application...", but that only shows GUI applications, and doesn't include any sort of option to locate a application yourself. So just putting mplayer there should work, IIRC. vvv⁻⁻⁻ Ugh, that's pretty annoying then. dont skimp on the shrimp fucked around with this message at 21:16 on May 31, 2011 |
# ? May 31, 2011 15:08 |
|
Zom Aur posted:I think you can just type whatever app you want in the "Open with other application..."-dialog, even if it doesn't have a .desktop file. Yeah, that is the problem. In v3, they seem to have removed any method of specifying the program name yourself. You are just given a list of known applications, and that is it. Now I have made my own .desktop file and it shows up in the gnome-shell menu, but it doesn't show up in the list of applications to associate with. Very frustrating! edit: After bothering the guys in freenode #gnome, it was suggested I mangle the totem.desktop file to do what I needed. Totem was uninstalled long ago, but I took it out of an rpm file. After copying the MimeType and Categories lines, the mplayer2.destktop file now lets me properly make an association! http://pastebin.com/4hzAm7Bn other people fucked around with this message at 15:29 on May 31, 2011 |
# ? May 31, 2011 15:11 |
|
Quick routing question: My routing table: code:
Question is: how do I fix this the proper way? Would this help? My /etc/network/interfaces is code:
kyuss fucked around with this message at 18:29 on May 31, 2011 |
# ? May 31, 2011 18:20 |
|
You can't have two 'default' routes, only one can be the default. What you need is just a second route for 10.1.x.y Something like code:
To get the route to be 'persistant', or stick, you'll have to add it somewhere else (do your tests from the commandline until you find what works) http://www.cyberciti.biz/tips/configuring-static-routes-in-debian-or-red-hat-linux-systems.html
|
# ? May 31, 2011 18:34 |
|
Bob Morales posted:You can't have two 'default' routes, only one can be the default. code:
|
# ? May 31, 2011 18:41 |
|
kyuss posted:That's what I thought. But this: Technically, those are both default routes because of their destination of 0.0.0.0. I would imagine the metric is different between the two and thats wlan0 is getting the packets. But I'm not a networking expert. Actually, the metric looks the same (you're using some language other than English), so maybe it was just the order they are loaded by the networking subsystem. Either way, if you add a more specific route for the eth0 network, it should fix the problem. Bob Morales fucked around with this message at 18:56 on May 31, 2011 |
# ? May 31, 2011 18:54 |
|
What does your network layout look like? Probably one interface is a wireless network in your house and the other is the internet?
|
# ? May 31, 2011 18:57 |
|
you can put your routes in /etc/init.d/ then make a symlink to rc3.d and or rc5.d so they'll load on which ever runlevel you use.
Twlight fucked around with this message at 20:23 on May 31, 2011 |
# ? May 31, 2011 20:19 |
|
Twlight posted:you can put your routes in /etc/init.d/ then make a symlink to rc3.d and or rc5.d so they'll load on which ever runlevel you use.
|
# ? Jun 1, 2011 02:06 |
|
Will put my route in rc.local, thanks guys For the record, I have a ton of switches in a lab setup that I'm tasked to run some tests on. I got tired from permanently switching chairs, so I put a notebook in the testing setup that sits both in the testing network (10.x.x.x) and the company WLAN (192.168.x.x). When connecting from my work notebook via the company WLAN to the testing notebook, I have the aforementioned routing table on the testing machine. I'm still curious about the multiple default route mechanics, though.
|
# ? Jun 1, 2011 08:01 |
|
A default route is the routing algorithm's last resort. If it can't find a specific route to a packet's destination in the table, it sends it to the default gateway. A second gateway will never be sent traffic unless the first one gets dropped from the table. This doesn't happen automatically and is a good example of why people use routing protocols. Why it chose 192.168.2.254 as the primary is a good question. I would have assumed it would have chosen a physical interface or a lower IP first, but I don't know.
|
# ? Jun 1, 2011 13:35 |
|
wrong thread
text editor fucked around with this message at 14:24 on Jun 1, 2011 |
# ? Jun 1, 2011 14:06 |
|
ClosedBSD posted:According to the wiki: Wrong thread I think.
|
# ? Jun 1, 2011 14:20 |
|
Bob Morales posted:Wrong thread I think. Yup, definitely was, my bad
|
# ? Jun 1, 2011 14:24 |
|
Bob Morales posted:Wrong thread I think. Yeah, but because of the username I had to read it twice while wondering if I was somehow unaware of a whole chunk of insider technology nomenclature.
|
# ? Jun 1, 2011 14:26 |
|
Misogynist posted:This is technically true, but also more or less what rc.local was designed for. And here I was doing more work than I needed to. Thanks Misogynist.
|
# ? Jun 1, 2011 17:35 |
|
Modern Pragmatist posted:Is there a command line utility for determining resolution and codec of a video file in linux? I'm attempting to write a script that will run as a cron job and convert video files that meet certain criteria. As mentioned, you might be able to use mplayer, or just run 'ffmpeg -i [filename]', and it should provide you some info. Alternatively, try MediaInfo; it's available for Windows, Linux and OS X, with and without GUI, and should give you more detail than you can stomach.
|
# ? Jun 1, 2011 19:38 |
|
Stupid backup question: I have an older server with some hard drives in it that I guess I'll use for backups. Not crucial backups, so there's no tape drive or off-site backups or fire safes. Spare me the lecture. One server I'm going back up is our Joomla test server. So there's the mysql database, and the actual web files. I will probably do the same for our Redmine server. My question is, should I run the backup script from the backup server, or from the server I'm backing up? I know it doesn't really matter, but maybe it does, and it will save me headaches further down the road, doing it one way versus the other. Pros for running from the backup server: I can schedule the jobs to run sequentially. Don't want to overwhelm the server with those 30MB Joomla backups. The jobs are all in one place, easier to manage Cons for running from the backup server: In theory if the server was turned off or had an error, I'm not backing up a single thing (maybe add an email notification to the script, no matter which server)
|
# ? Jun 1, 2011 20:55 |
|
Your pro/con list seems to cover the important stuff. I ended up choosing to pull from the clients because it was a headache setting up the clients to push.
|
# ? Jun 1, 2011 21:29 |
|
Dinty Moore posted:As mentioned, you might be able to use mplayer, or just run 'ffmpeg -i [filename]', and it should provide you some info. Alternatively, try MediaInfo; it's available for Windows, Linux and OS X, with and without GUI, and should give you more detail than you can stomach. So I actually ended up going the ffprobe route. file worked on some files but didn't reveal enough information about .mov files. I then tried out mediainfo but it was extremely slow. Now my script is working quite excellently. One question though. When I run it using nohup it complains about my use of [[ ]] in a bash script. However, if I run it by preceding the command with bash it works. code:
code:
|
# ? Jun 1, 2011 22:36 |
|
Bob Morales posted:Stupid backup question: At work, I use a bit of code that checks to see if all mounts were successful to help address this. If the mounts failed, it goes ahead and emails me which share failed and skips the backup. (In the event that it does fail, I can just check what happened in the morning and initiate a manual backup afterwards.) I run the script from the backup server and just throw it in crontab.
|
# ? Jun 2, 2011 01:09 |
|
politicorific posted:Question: The old school way to do this is with autofs/automounter. apt-get autofs, and set your shares up in it with a 15 min timeout. They will mount on directory access, and unmount on inactivity.
|
# ? Jun 2, 2011 14:43 |
|
I was pissed off by Unity, so I decided to switch distributions. I spent 89€ on a SSD and decided to play around a bit: Fedora 15 - picked it over its Gnome3 desktop, liked it at first, but then it started to crash on me, especially after waking up from standby / hibernate. Installed the catalyst driver for my graphics card on a hunch, but this made things worse - got garbled graphics in menus. I felt much of this was due to Fedora being licensing nazis, so I decided leave it at that. Linux Mint 11 - nice GUI, but it felt old after trying out Gnome3 for a few days. Tried to install Gnome3, had the GUI permanently crashing on me right after login, decided to try another distro. Arch Linux - ugly text installer that kept giving me poo poo because I tried to change the partition layout. Had to manually pick a console font because I dared to change the keyboard layout to other than US - weird. Installation was very quick after that. First fuckup was at boot, Grub somehow got my partition layout wrong. Fixed it by hand. Second fuckup after changing to Grub2 - it had the wrong settings from Grub1. Fixed it again. Installing xserver and Gnome3 on the other hand was a breeze. Had some trouble initially getting sound in flashplugin, because I didn't read its installation instructions carefully enough. So far Arch feels lightning fast, and easily configurable. Hardware support seems great. Currently, I have to start Gnome3 manually via "startx", but I kinda like it, will propably leave it at that.
|
# ? Jun 3, 2011 14:09 |
|
kyuss posted:I was pissed off by Unity, so I decided to switch distributions. welcome to arch linux! make sure to check out yaourt. It's basically another repository for unsupported software, and I mean any unsupported software. I love having arch since you know what you have on your computer and feels like it reduces the bloat on the machine. Ubuntu just doesn't feel right especially apt compared to pacman.
|
# ? Jun 3, 2011 15:47 |
|
kyuss posted:So far Arch feels lightning fast, and easily configurable. Hardware support seems great. Currently, I have to start Gnome3 manually via "startx", but I kinda like it, will propably leave it at that. https://wiki.archlinux.org/index.php/Start_X_at_Boot if you want it to be automatic, just don't do it the .bash_profile way unless you want it to start X after you login via command line
|
# ? Jun 3, 2011 16:00 |
|
ClosedBSD posted:https://wiki.archlinux.org/index.php/Start_X_at_Boot if you want it to be automatic, just don't do it the .bash_profile way unless you want it to start X after you login via command line he could just add gdm or whatever login manager he wants into rc.conf. That will start X for login which is really all that is important for most people.
|
# ? Jun 3, 2011 16:08 |
|
kcncuda71 posted:he could just add gdm or whatever login manager he wants into rc.conf. That will start X for login which is really all that is important for most people. Right, this is a much better way to do it: https://wiki.archlinux.org/index.php/Display_Manager
|
# ? Jun 3, 2011 16:13 |
|
Does anyone know the details of how filefrag works with the verbose (-v) switch? The man page says this: pre:OPTIONS ... -v Be verbose when checking for file fragmentation. pre:# filefrag disk.img.xz disk.img.xz: 178 extents found # filefrag -v disk.img.xz | tail 176 5732352 438468608 32768 177 5765120 438501376 27837 eof disk.img.xz: 14 extents found
|
# ? Jun 3, 2011 17:40 |
|
I have no idea what I did but I must have accidentally done something cause now when I use VIM my backspace key is in "insert mode" like in a text editor. You know, instead of deleting backwards it deletes whatever is at the pointer. How do I turn this off.
|
# ? Jun 3, 2011 21:23 |
|
Ziir posted:I have no idea what I did but I must have accidentally done something cause now when I use VIM my backspace key is in "insert mode" like in a text editor. You know, instead of deleting backwards it deletes whatever is at the pointer. How do I turn this off. This is mostly a guess, but I think that is one of the vi-like behaviors in vim adding: code:
|
# ? Jun 3, 2011 21:35 |
|
|
# ? Jun 7, 2024 06:29 |
|
No, that didn't help. I swear I had it working like regular backspace even just one hour ago.
|
# ? Jun 3, 2011 21:48 |