It looks like you're new here. If you want to get involved, click one of these buttons!
Ok guys, so I am in need of a script to write. It'll need to do the following:
Any ideas on where I could/should start with this?
Liam
http://www.vpn.sh - Secure and affordable VPN services
Comments
I could help, but unfortunately stuck at #4, lol. I know all the commands 1 -3 and 5. But 4 I have no idea how to run a FFMPEG conversion command...
I am sure someone here will help you! :) Be Patient :O
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksBash :)
PHP Looking Glass
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksI like Java. Do everything in Java!
Asad
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksOnly thing is, the script needs to be dynamic. Needs to be able to rename a file within that folder regardless of what the original file name is.
Basically it's for going through my collection of TV series.
Needs to access the folder where the video files are kept, rename the files individually to make them more recognisable, move them elsewhere, convert from avi to flv (stream through browser on home network for family), then remove original file.
Just lost atm D:.
http://www.vpn.sh - Secure and affordable VPN services
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksCouchPotato, Sickbeard, and Plex. Done and done.
CouchPotato (movies) and Sickbeard (tv) for renaming and keeping track of your collection. Plex for a media center that can stream to any device. It won't remove the original file, but it will on the fly perform an ffmpeg stream so you can watch the video on mobile and more if the original file format is not capable of playing on said device.
PHP Looking Glass
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks@liamwithers Windows?
Do it in Java, multithread that shit.
Asad
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksMaybe by defining the parameters....
What's the basis for the new file name for renaming files? What's the new folder going to be named?
And providing a sample of what you have, e.g. a sample directory listing.
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksMaybe he needs to run it in a 128mb VPS.
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks@Soylent With Java? Not a chance, 4GB should be enough right?
Asad
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksSeriously, bash
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksWhat you are writing on command line can be used exactly same in bash You can do all the stuffs you listed on command line, can't you? Now with a bit of tweak with bash codes such as loop, output and error handling, you can make robust script for whatever you want on Linux.
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksOk, so I could use Bash.. but basically it's my torrented collection from online. So some of the names of files are a little confusing, or when I've downloaded individual episodes, the layout for the name has been different. I want to change them all to be me more consistent.
The script doesn't need to access a SPECIFIC folder.. it needs to access a folder which I haven't defined a name for. It then needs to be able to make the conversion on any .avi files, whilst renaming them, without me defining the original name. Obviously it would be a lot easier if I was giving it direct instructions: Go to this folder, fetch this file, rename it to this, convert it, move it.
Obviously it's slightly different to that though, seeing as I'm dealing with multiple files, and would rather have the script do it for me than do it manually through all of them.
I understand you guys say I can do this in bash, but I've never used bash before.. anybody able to give me a pointer or two as to how to do this? Would rather have some first-hand knowledge than being pointed towards a tutorial site, because that's not what I need in this case.
Cheers
http://www.vpn.sh - Secure and affordable VPN services
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks@liamwithers - do it one file by hand, post the commands here - we can take generalising the commands into a bash script from there...
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks@liamwithers Use sickbeard to organise all the files, then maybe run the converter script to do whatever you want. Or maybe sickbeard lets you run scripts on files? I don't use it myself.
Asad
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks- Spam
- Abuse
- Troll
0 • Disagree Agree Thankshm.. in VIsual Basic it would be nice
Streaming lagu sunda powered by RamNode
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksCould PHP script that :L, seems pretty simple to do; just need to figure out your conversion script; there will be something, and just make it wait until finished, using arguments from the script found online.
Seems pretty easy :D!
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksPretty much this. PHP combined with Bash.
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksWhy would you bring PHP into something that can be done entirely in a shell script?
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks@Gary - Gives expandability to make a interface for you to view the converted file; have a gallery of files converted etc. Depends what you're fluent in. I'd prefer PHP to Bash.
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksOk, think I'm gonna be doing this in PHP.
For doing the FFMPEG command, is it simply:
shell_exec("FFMPEG COMMAND");?Also, can you use PHP variables within shell_exec?
Basically I'll be wanting to do the following:
ffmpeg -i $FILENAME $FILENAME.flv
$FILENAME being a PHP variable :)
http://www.vpn.sh - Secure and affordable VPN services
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksBasically.
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksOk, so I'm stuck for ideas.
Currently I've got a script that takes all of the video filenames from within a folder, and places them line-by-line in a text file like so:
I'm able to select each individual line as so (example to select fourth line):
$content = file('test.txt');echo $content[3];Now what I need to be able to do is perform an FFMPEG command on each one of these until I have reached the final line of the text file.
Any ideas on:
Thanks guys, appreciate your patience :)
http://www.vpn.sh - Secure and affordable VPN services
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksIt would be ffmpeg... *nix are case-sensitive.
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks@Damian yeah that's fine.. I know the command I'd need to use, just need to know how to do this for each video file which is defined in the text file. ffmpeg command I'd be using is:
Just need to know how this is all gonna work from each line of the text file :/
http://www.vpn.sh - Secure and affordable VPN services
- Spam
- Abuse
- Troll
0 • Disagree Agree Thankshttp://us.php.net/manual/en/control-structures.foreach.php is what you're looking for.
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksUse something like...
Do until EOF(1) { for each $line as $filename { ~~~~ } }
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks