newrez - Increase Screen Rez For Netbook

Nautilus Scripts by marc41 146 comments

Good point. Should I drop them in $HOME? Or maybe even $HOME/Desktop which will make them obvious AND clickable?? *AND* draggable to the launcher!!

What do you think? - Nov 10 2010
newrez - Increase Screen Rez For Netbook

Nautilus Scripts by marc41 146 comments

I'm going to start testing this on my other systems. My suspicion is that because xrandr sees your hardware as "default" instead of a device name (like "VGA1"). It is the device name found on the line containing "default" that I'm parsing from the xrandr output.

Interesting though that it does produce output for the device "default" and is apparently referring to "Screen 0". My script is currently not looking there. Perhaps that's what's needed.

I need to see if xrandr can be pointed at "Screen 0" (which is probably coming from /etc/X11/xorg.conf). This is getting interesting... - Nov 10 2010
newrez - Increase Screen Rez For Netbook

Nautilus Scripts by marc41 146 comments

I'm going to start testing this on my other systems. My suspicion is that because xrandr sees your hardware as "default" instead of a device name (like "VGA1"). It is the device name found on the line containing "default" that I'm parsing from the xrandr output.

Interesting though that it does produce output for the device "default" and is apparently referring to "Screen 0". My script is currently not looking there. Perhaps that's what's needed.

I need to see if xrandr can be pointed at "Screen 0" (which is probably coming from /etc/X11/xorg.conf). This is getting interesting... - Nov 10 2010
newrez - Increase Screen Rez For Netbook

Nautilus Scripts by marc41 146 comments

P.S.

newrez CAN be launched from the panel. In addition, the little scripts it leaves in /tmp can also be launched from the panel, letting the user hop between their own defined resolutions. Perhaps a drawer full of them would make sense.

Is there a category for launcher-apps to post this to? :-)
- Nov 10 2010
newrez - Increase Screen Rez For Netbook

Nautilus Scripts by marc41 146 comments

I suppose this could have been implemented somewhere else within the system. It started out at the command line as an experiment, and evolved into a bash script due to the math required to compute the scaling for an arbitrary resolution (scaling is based on the ratio of desired resolution to maximum hardware resolution). As a shell script, it was natural to just use zenity to GUIfy the interface.

From concept to posting, newrez was about two hours of work. I've done a bit more to it since then, and have considered that implementing the mode changes could be done elsewhere. Writing one-line files to /tmp that can be inserted elsewhere was a step in that direction. These files are specific to the native display resolution and the arbitrary resolution input by the user. A complete set of all possibilities would be quite large.

It seems that xorg.conf style mode lines cannot include the 'scale' arguments. The 1-line scripts can be used in /etc/X11/xinit/xinitrc.d and possibly elsewhere, but this requires a bit of user intervention. Referencing a script in Startup-Applications seemed a reasonably friendly "automation" that any user could handle.

And a big consideration is that this needs to work on a variety of distributions and releases. As it is now, relying only on three common utilities, it's quite universal.

All that said, if you have ideas for integrating this more tightly, I'd certainly like to hear them.

PM me and we can talk.... - Nov 10 2010
newrez - Increase Screen Rez For Netbook

Nautilus Scripts by marc41 146 comments

OK, there does not seem a way to make a proper mode for /etc/X11/xorg.conf. However (not for the faint of heart) THIS seems to work:

Copy your favorite /tmp/newrez-XXXX script from /tmp to /etc/X11/xinit/xinitrc.d
Edit the script as follows:
.enclose the entire line in parenthesis
.just after the open-parenthesis, insert: sleep15;
.after the close parenthesis, append: &

On a slower laptop, you may need a longer sleep (the xrandr must not run until X is up) - Nov 09 2010
newrez - Increase Screen Rez For Netbook

Nautilus Scripts by marc41 146 comments

From what I've been reading about xrandr since putting this script together (it's been less than 24 hours), "maybe"...

There IS a way to use xrandr (along with "gtf" or "cvt") to create a new "mode". Once the new mode is created, it can be selected when configuring a display. If the new mode is added to /etc/X11/xorg.conf then it can be made permanent.

I will have to actually try this though. Every example I've seen of this described the resolution plus a number of things relating to scan rates and such, but nothing I've come across shows the use of "scale".

And SCALE is the reason this works. This script does not set a hardware resolution, it sets a framebuffer resolution and then scales it down to fit the hardware. So I have no idea (yet) if this can be used as a true "mode".

Further, most systems don't have an xorg.conf file any more. They auto-configure when X comes up. So even IF these modes work, they won't work for most users.

But, I'll give it a shot and report back :-)

-- Marc - Nov 09 2010
newrez - Increase Screen Rez For Netbook

Nautilus Scripts by marc41 146 comments

DONE! Get version 0.3 - Nov 09 2010
newrez - Increase Screen Rez For Netbook

Nautilus Scripts by marc41 146 comments

Hmmm...

I could have the script put the actual "xrandr" command that it executes into a small file in /tmp. From there you could move them somewhere permanent, like /usr/local/bin or ~/bin

There are a few things that could be done with those files:

1) If you put them in ~/.gnome2/nautilus-script, you could have instant access to these resolutions without re-running the script.

2) If you drag them to the launcher bar, you could switch resolutions with a single click.

3) You could reference the script of your choice in the Gnome "Startup Applications"

4) Whatever else you can think of!!

How does this sound?

-- Marc - Nov 09 2010
newrez - Increase Screen Rez For Netbook

Nautilus Scripts by marc41 146 comments

I have sent you a message with instructions... - Nov 09 2010
newrez - Increase Screen Rez For Netbook

Nautilus Scripts by marc41 146 comments

Hmmm... What is the output of the command "xrandr -q" on your system? Is your display a laptop LCD, stand-alone LCD, something else?

I just wrote this last night, so not a whole lot of testing yet. - Nov 09 2010
newrez - Increase Screen Rez For Netbook

Nautilus Scripts by marc41 146 comments

Hmmm... What is the output of the command "xrandr -q" on your system? Is your display a laptop LCD, stand-alone LCD, something else?

I just wrote this last night, so not a whole lot of testing yet. - Nov 09 2010
newrez - Increase Screen Rez For Netbook

Nautilus Scripts by marc41 146 comments

THANKS!

I've got a netbook that's 1024x600 and it can be frustrating. I had been using different trick: start a vncserver on 5901 at 1280x800 and then connect with a scaling viewer. But that was slow.

When I found that xrandr could do this, just HAD to script it and share :-)

Glad you like it!!!

-- Marc - Nov 09 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

Hi -- The script does not have any provision for subtitles built in (yet...) nor does it explicitly recognize the mkv file type. ffmpeg DOES know mkv, but I'm sure you noticed that when using one as input you must select ffmpeg as the converter, and to choose mkv for output you must specify "other" and type it in.

The changes to recognize mkv as input is easy, as is adding it to the output types offered.

Subtitling is something I had not considered, but ffmpeg definitely supports it. As such, even without my modifying the code to specifically handle this, it would be a rather simple matter for you to add it through my script's "custom command" function.

Notice the "Key-in options" checkbox when choosing ffmpeg options. Here, you could add the "-newsubtitle myfile.srt" option as well as anything else needed, like "-slang ABC" to specify language.

Assuming you are more familiar with the mkv format and subtitling than I am (which I'm certain of), you can use these ffmpeg options and store them using my script for future reference and use.

Further, my script not only offers "custom options" but "submissions" as described above. Meaning, if you come up with an interesting/useful custom option for my script and email it to me, I will add it to the "submissions" download. Yours would be the second such submission, and I do include an attribution :-)

This is an interesting idea. I'd be glad to help work out the option set needed to add as a "submission", which I think is the best way to implement it in the script.

PM me and we can discuss this in detail.

-- Marc - Sep 12 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

Hello - sorry for the delay in responding.

I have just tested this.
Source file: AVI 620x256
Conversion: WMV
Options chosen: w-320

On my system, this produced a 320x132 MPEG-4 video

You could look at the text file /tmp/ffmpeg.XXXXX which captures the output during the conversion. See if there are any warnings there.

What older version of my script were you using? Perhaps that will be a clue.

What is your source video file type?

-- Marc - Aug 06 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

That is not a very clear message and I should change it. What it means is that the "links" or the package "elinks" must be installed on your for this this script to work.

Just go to your package manager and install either of those.

I will put a better message in the next release.

-- Marc - Jul 20 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

That is not a very clear message and I should change it. What it means is that the "links" or the package "elinks" must be installed on your for this this script to work.

Just go to your package manager and install either of those.

I will put a better message in the next release.

-- Marc - Jul 20 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

That is not a very clear message and I should change it. What it means is that the "links" or the package "elinks" must be installed on your for this this script to work.

Just go to your package manager and install either of those.

I will put a better message in the next release.

-- Marc - Jul 20 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

There are three ways to launch this program using the Gnome GUI (it can also be used from the command line).

To use the script as a "Nautilus Script", it just needs to be copied or linked to ~/.gnome2/scripts

To use the script as a drag-and-drop, drag it to one of the launcher panels.

A "Nautilus Action" is very much like a Nautilus Script. The differences are:
1 - requires the package "nautilus-actions"
2 - Each new "action" needs to be configured
3 - There is much more control in setting up an Action than a Script
4 - The program pointed to by an "Action" does not need to be in a special place

If you Google "nautilus actions" you can get more description.

I hope this is working well for you!

-- Marc - Jul 20 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

Hi --

You just need to install the Linux package "links" or "elinks", which is needed by my script.

I suppose that window could be better formatted :-)

--Marc - Jun 08 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

Hi --

You just need to install the Linux package "links" or "elinks", which is needed by my script.

I suppose that window could be better formatted :-)

--Marc - Jun 08 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

Hello

I guess the PATH thing is turning into an issue. Here's the deal...

When the program is run without selecting any files (whether from the command line or as a script), it needs to fins itself in $PATH. In all other cases this is not needed.

It was recently suggested that I add a test to ensure that it could be found in $PATH (and that it had not been renamed). I now see that this should be optional.

I will make changes. Until then, here is how to eliminate the requirement in the current 0.83 version:

Edit the script, and either comment or delete line 1344

Next version will behave better :-)

-- Marc - Jun 03 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

Hello!

First, you can check your PATH by typing: echo $PATH

It probably already includes ~/bin and /usr/local/bin

If you add something new to your PATH by editing /etc/bashrc or ~/.bashrc, you must "source" that file for it to take effect. You can do this by logging out and back in, or by typing "source /etc/bashrc" (or ~/.bashrc), or by "dotting the file" by typing ". /etc/bashrc" (or ~/.bashrc).

Then check your PATH again with: echo $PATH
The new additions to PATH should now be there.

You can also type: whereis avconvert
This will report everything found in $PATH that begins with the word "avconvert"

Another thing that may help is that you can type: which avconvert
This command will search through PATH and show the one instance of avconvert in PATH that will be executed when you type that command.

I'm sorry that this change to the program has become a problem. I will look for a way to change it so that this is not necessary.

-- Marc - May 30 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

Hi

There are a couple of ways to install. This will work for you:

Download the file and save it to your desktop. Double-click the saved file. You should get some sort of archive manager pop up. Use it to 'extract' the file. If this works, you will then see a file named simply "avconvert" on your desktop.

Now open a "terminal" (command line) session. Then type these two commands:

mv avconvert ~/bin
ln ~/bin/avconvert ~/.gnome2/nautilus-scripts

This will cause the new program to be accessible from two places -- first, from the command line (which the script needs under some circumstances) and second, from the "scripts" context-menu you get when right-clicking on a file.

Once this is done, you can right-click on any of the types of files avconvert operates on and it will "do its magic". You can also use your favorite methods of selecting multiple files before right-clicking.

Let me know if this gets you up and running.

-- Marc - May 04 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

Try doing this to see what that library might be named:

ffmpeg >/tmp/ffcheck 2>&1

then open /tmp/ffcheck with your favorite editor and find "mp3" in that file. On my system it shows "--enable-libmp3lame". That ought to give you an idea what to use.

Let me know if this helps. Sorry for the delay in responding.

-- Marc - May 04 2010
imagelabel - Attach text to images

Nautilus Scripts by marc41 3 comments

Hey, thanks!

I didn't know about
echo "Hello $(whoami)"

As for the chain of events, I did consider asking the questions in sequence. In fact that's how it worked at first. I changed it to multiple background tasks later. This was because I found that I might want, for instance, to change the font size repeatedly without cycling through all the prompts again.

So, the last response to each dialog is remembered, and all can be changed independently and in any sequence. However, as you see, it is when clicking OK to the text input that the preview is refreshed.

The way to exit is this: Either type "save" or "quit" in the text dialog. This ends the program. Quit just cleans up and exits. Save triggers a dialog to "save-as" the resulting file.

So that's WHY it was done this way. I wish zenity would allow a multi-section dialog which could have avoided all this confusion.

Does the save/quit help? I realize now that the explanation wasn't so great.

And THANKS for the $(whoami) tip. Setting $iam manually is a habit going way back to my Unix days :-)

-- Marc - Apr 24 2010
imagelabel - Attach text to images

Nautilus Scripts by marc41 3 comments

No comments and no votes? Does this work for you? - Apr 22 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

Sorry for not responding sooner :-(

Here is the reason for that change:
There are a few different ways this script can be executed. It can be a Nautilus-Action, a Nautilus-Script, a drag-and-drop icon on the Gnome-Panel, and it can be run from the command line.

From the command line and as a Nautilus-Script, it is possible to execute the script withOUT specifying any files. When this happens, the script will pop up a file-selection dialog in zenity.

After selecting your file(s), the script re-executes itself with the selected file(s) as arguments. (This may not have been the BEST thing to do, but it was expedient).

Therefore, the script needs to be able to find itself in $PATH to be re-executed. Another solution to this would have been to include ~/.gnome2/nautilus-scripts into your own PATH setting.

It was another user who pointed out that this message needed to be added.

-- Marc - Apr 15 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

As we are discussing in PM:

This is a potential $PATH issue. When executed with no args (no selected files) the script will pop up a selection dialog, then re-execute itself. If it is not found in $PATH then this will fail.

This would typically happen if the download was moved to nautilus-scripts.

The most direct solution is to link this to /usr/local/bin or to ~/bin

Working on a test to detect/fix this

-- Marc - Apr 03 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

Thanks for catching this! It will be fixed in version 0.83

-- Marc - Apr 03 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

HI - glad you like the script!

When setting up the script as a Nautilus-Action, it will only launch if one or more files are selected.

However, I also designed the script to be usable from the command line. In that case, the idea was that it could be launched with file names ('avconvert file-one file-two "file three with spaces"') or without (just 'avconvert'). With no file names, the initial dialog window is for selecting source files.

As a Nautilus-Script, that is the bahavior. So starting it when no files are selected takes you to a window for selecting files.

That's a feature I actually like. However, I would suggest for you to remove it as a Script and set it up as an Action.

Another way to use it, if you like, is to drag it to the gnome-panel. In this way, the script is activated by selecting file(s) and then drag-and-drop to the panel icon.

I hope this helps. It's actually by-design that the script runs even with no files selected.

Enjoy! :-)

-- Marc - Apr 01 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

Glad you like my little program, and...

Yes, lots of stuff open. I had tried to show all the steps in a conversion by restarting the same one repeatedly and stopping at each step along the way.

Actually, much of that is outdated by now - many things have changed since then. Should re-do them (and maybe simpler this time :-)

-- Marc - Mar 30 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

DONE in 0.82 - Mar 25 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

DONE in 0.82

(2-pass mencoder rotate, with calculated bitrate and framerate from original to force high quality) - Mar 25 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

DONE in 0.82 - Mar 25 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

I'm working on a new release right now, so your suggestion came at a good time. I will check into this!

-- Thanks - Mar 23 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

Sorry for the delay in responding...

I will add image rotation - should not be hard to do. Will keep you posted... - Mar 07 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

... I've not forgotten, just very busy lately ... - Jan 28 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

I just re-read this message.

OK. In ffmpeg I am doing a 1-pass, and I agree it could be 2-pass. I will check into that.

I can see there is a bit more work to be done in a few different areas, if this is to move from being a quick tool for converting things like youtube, to a full-featured converter of archive quality. - Jan 27 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

Yes, I had thought of mencoder AFTER, too. And then there's that other problem of mencoder's file incompatibility.

Which brings me to the "THREE PASS OPTION" (YUCK!!).

1 - ffmpeg with whatever options the user wants, generating a file that mencoder CAN input

2 - mencoder rotate-only

3 - ffmpeg the rotated file to the desired format

There must be a better way -- **IS THERE ANYBODY ELSE OUT THERE READING THESE COMMENTS WHO HAS A BETTER IDEA???** - Jan 25 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

Up until your suggestion for rotation, I have been doing a 1-pass with ffmpeg only.

But because ffmpeg cannot do a rotate, I added an extra step when either "rotate" box is checked. So when rotate is selected, I use mencoder to rotate the video, then run the original ffmpeg routine to modify the rotated verson.

I chose to do the rotate first because I have read that many files produced by mencoder do not work on Windows. This is why I did not do the ffmpeg first. It also let me be very simple-minded about mencoder - just copy the input to the output with only the rotate command. However, this was obviously TOO simple because apparently mencoder does not accept all file types.

The BEST solution would be to somehow rotate within ffmpeg. I have found that there is a "flip", but no rotate.

Hmmm... - Jan 25 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

Hi

Regarding compression defaults:
Magellan13 (and now you) have both brought this up. My intent (next time I'm ready to dedicate some time to this) is to set all the defaults equal to the values in the original file. This sounds easier than it actually is, because the current values as reported by ffmpeg are not at all in the same format that ffmpeg requires as options to set those values. Further, if multiple source files are selected, these values need to be re-evaluated for each file. But, it will be in some future version, I promise :-)

As for the rotation:
It sounds like this will actually then require a three-pass operation when the source file is not something that mencoder can deal with. UGH! Yes, the temporary file could be put in /tmp. That's actually how I did it at first. Then I wrestled with the concern that I'd end up either filling the drive with "rotate-*" files, or need to remove them automatically. And if I remove them silently, and a conversion happens to fail, the user will not know whether the mencoder phase or the ffmpeg phase was at fault. That's why I put them in the destination folder instead. Any ideas on this?

So does it seem now that rotation requires three phases?
1 - use ffmpeg to create a file of a type mencoder understands
2 - use mencoder to rotate
3 - use ffmpeg for the 'desired' transformations

Or perhaps I should just separate "rotate" into a separate function altogether. It would then need the warnings:

A - source files for rotate must be one of XXX, YYY, or ZZZ -- use avconvert to convert to one of these first
B - files created with mencoder will not always work on a Windows machine, and may need to be re-encoded using ffmpeg

Any suggestions would be appreciated!

-- Marc - Jan 24 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

The "submissions" download now includes your entry -- YOU'RE THE FIRST ONE!

Thanks - Jan 19 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

PS - thanks for your suggestions!

I've also fixed the comments in the ffopts* files - Jan 19 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

(1) Erroneous comments in the .audio and .video config files have been removed

(2) I have added an mencoder first-pass to rotate videos. If rotation (right or left) is selected, then mencoder will first be used to generate a temporary file. This file is named "rorate-" followed by your source-file name, and is saved to your target-file directory. After the rotation, ffmpeg uses this file as its source and applies your requested conversion.

Download version 0.81 and let me know how this works for you!

-- Marc - Jan 19 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

>>> i have also been trying to do a rotate, (mobile camera often being held sideways), put it looks like ffmpeg doesn't do that, yet.

I am researching this. It seems ffmpeg has a "vertical flip" (though I haven't been able to make it work yet), but no rotate. However, there IS a rotate in mencoder. I will look into possibly handling this as a two-pass operation.

From what I've read, mencoder produces files that Windows "may" not be able to read. But if it were used to rotate first, then re-encode with ffmpeg (and apply whatever other conversions) this may be a good solution.

>>> BTW do you realise that there is help inside the .audio file etc., which says that that is where this stuff should go and that it won't be overwritten.

OOPS!!!! My original intent was to pre-seed the .audio and .video files and then allow changes there. Later, (1) I wanted to change the defaults and (2) there were user suggestions to keep "custom" separate and (3) I had the idea for "submissions". These changes were made, and I completely forgot about those comments in the audio&video files. Thanks -- I will fix that!!! - Jan 19 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

I appreciate that you took the time to ask. Certainly, that would be fine. The whole idea of posting (and continuing to develop) this script was to make it useful and available.

In your attribution, it would be good (for users) if you include a reference to the script's listing at gnome-look.org because the information on this site will help people understand and get the most from the script.

Thanks! - Jan 18 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

If you add your option to the avconvert.ffopts.custom file instead, then it will not be overwritten. The .audio and .video are intentionally overwritten by the script. The .custom file is only written if it does not already exist.

Further, there is the .submissions file. I had hoped that when someone found the solution to a situation (as you just have), that such options lines would be submitted to me either in these comments or via email. My intent is to accumulate useful options (with comments) into a separately downloadable and installable file. You'll see that in the downloads area of the posting.

If you don't mind, I'd like to use your line as the very first submission. And to everyone else out there: send me your custom commands and I'll compile them and make them available to everyone!

So, can I include your line?

-- Marc - Jan 18 2010
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

Thank you, too. I really appreciate that! - Dec 22 2009
Audio/Video/Image/Text/ISO Convert

Nautilus Scripts by marc41 383 comments

Thanks so much! - Dec 15 2009