INDEX  F.A.Q.  SEARCH  LATEST POSTS     Rules  Register  Profile  Private messages  Login


Login:   Username:  Password:   Log me on automatically    
Register I forgot my password I forgot my username Resend the activation key

Help with metadata when converting to FLV using flvtool2?

Forum Index -> ffmpegX -> ffmpegX general discussion Printer-friendly version
Reply to topic
Author Message
Sharon M
Member


Joined: 26 May 2009
Location: United States

Post Posted: May 26, 2009 03:42 Posts Comp View users profile Send private message Reply with quote

Hi, I'm a new forum member and quite a newbie to all things video. Also, although I'm not afraid of using the command line, I have little experience with unix beyond the basics, and none with ruby.

Early this morning I installed ffmpegX and am quite pleased to have successfully converted a VOB file to FLV. However, I have been spending the bulk of the day trying to resolve one problem with the metadata. I've learned a bunch from other posts on this forum but have not found the solution I need.

The resulting .flv file runs just fine within an swf player embedded in a web page. Unlike problems described in other posts in this forum, there was no problem with playback whatsoever. However, there is no progress bar -- there is a grey bar, but no black indicator showing how much has played; the elapsed and remaining time both continue to display 00:00 throughout playback; and there is no way to click or drag to a new time point; the only playback controls are start/stop/pause.

Some possibly relevant facts:

• Other .flv files provided to me by somebody else, converted from the same original DVD but on a different platform using different software, display a working progress bar properly, so the problem is not with the player or with the code I use to control it. It's the .flv file that is the problem.

• I installed flvtool2 (v. 1.0.6) exactly according to spec, and more than once. Interestingly, though, I've seen indication in other posts that there should have been some feedback after each command. However, I received none. After pressing return after each command, I just got a new command line prompt. (The sudo command did generate a request for password, though. And by the way, I am the only user of the computer and have administrator privileges.) There were neither error messages nor confirmation. So I could not be sure it was ever installed, though I've double and triple checked the procedure and can find nothing I neglected. The facts below suggest that it was not installed, but I don't know why. The download was successful, and I executed the commands from within that directory. (I placed the directory inside /Applications. Any problem with that?)

• One post by user Case, who has posted frequently on this topic, suggests that after successful installation, I should find flvtool2 in /usr/bin. I do not find it there, or anywhere, but can't discern why not. (And when I've tried to execute flvtool2 directly from the command line, as described on some other websites, I've gotten "Command not found.")

• Several other posts by Case describe how a script inside ffmpegX.app points to ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby, whereas ruby might actually be located at /usr/bin/ruby. This was exactly the situation on my system (OS 10.4.11, same as Case, I believe), so I modified the script file exactly as described. Unfortunately this did not change my result. I then re-executed the flvtool2 installation steps, and rebooted. Still no help.

• After converting my file, the very last line in the ffmpegX Process Information window reads:

/bin/sh: line 1: /Applications/ffmpegX.app//Contents/Resources/flvtool2: Permission denied

This is of course the script file containing the (now modified) path to ruby. (I didn't notice whether this happened before I modified the script file, but it is the result afterward.) What does this refer to? Permission to execute the script? Permission to execute ruby? Or what?

So! Can anybody help me? What am I doing wrong? Or is this some strange bug, and if so, is there a workaround? I have been pulling my hair out over this! I feel I've done a pretty good job of sleuthing today, for a beginner, but with nothing to show for it.

Thanks!


Case
Explorer


Joined: 04 Feb 2004
Location: Middle Earth

Post Posted: May 26, 2009 12:38 Posts Comp View users profile Send private message Reply with quote

First of all, thanks for your detailed description, as well as trying to solve this by using previous posts.

It does seem like everything is fine, except for flvtool2.

Sharon M wrote:
I placed the directory inside /Applications. Any problem with that?
I don't know, but I never do that for installers, unless a ReadMe file tells me to.
Try it once more, while keeping the "flvtool2-1.0.6" folder on the desktop. I'll try to be detailed:

Download FLVtool2 from http://rubyforge.org/frs/download.php/17497/flvtool2-1.0.6.tgz and decompress the package into a folder. Download a fresh copy to be safe.
flvtool2-1.0.6.tgz should be 26,953 bytes
flvtool2-1.0.6.tar should be 153,600 bytes
flvtool2-1.0.6 (the folder) should be 109,783 bytes, and should have 26 items (including subfolders).

Open Terminal.app
Type: cd [plus one space character] [drop the folder flvtool2-1.0.6 here] [press return key]
You should see the prompt change from the 'home' working directory (~) to include the path to the new working directory:
Code:
Computer-name:~ username$ cd /Users/username/Desktop/flvtool2-1.0.6/
Computer-name:~/Desktop/flvtool2-1.0.6 username$

Type: ruby setup.rb config [press return key]
This should give feedback in the Terminal like:
Code:
---> bin
<--- bin
---> lib
---> lib/flv
<--- lib/flv
---> lib/flvtool2
<--- lib/flvtool2
<--- lib

Type: ruby setup.rb setup [press return key]
This should give feedback like:
Code:
---> bin
updating shebang: flvtool2
<--- bin
---> lib
---> lib/flv
<--- lib/flv
---> lib/flvtool2
<--- lib/flvtool2
<--- lib

Type: sudo ruby setup.rb install [press return key]
This will prompt you to enter your user account password.
After that it should give feedback like:
Code:
rm -f InstalledFiles
---> bin
mkdir -p /usr/bin
install flvtool2 /usr/bin/
<--- bin
---> lib
mkdir -p /usr/lib/ruby/site_ruby/1.8
install flv.rb /usr/lib/ruby/site_ruby/1.8/
install flvtool2.rb /usr/lib/ruby/site_ruby/1.8/
install mixml.rb /usr/lib/ruby/site_ruby/1.8/
install miyaml.rb /usr/lib/ruby/site_ruby/1.8/
---> lib/flv
mkdir -p /usr/lib/ruby/site_ruby/1.8/flv
install amf_string_buffer.rb /usr/lib/ruby/site_ruby/1.8/flv
install audio_tag.rb /usr/lib/ruby/site_ruby/1.8/flv
install core_extensions.rb /usr/lib/ruby/site_ruby/1.8/flv
install meta_tag.rb /usr/lib/ruby/site_ruby/1.8/flv
install stream.rb /usr/lib/ruby/site_ruby/1.8/flv
install tag.rb /usr/lib/ruby/site_ruby/1.8/flv
install video_tag.rb /usr/lib/ruby/site_ruby/1.8/flv
<--- lib/flv
---> lib/flvtool2
mkdir -p /usr/lib/ruby/site_ruby/1.8/flvtool2
install base.rb /usr/lib/ruby/site_ruby/1.8/flvtool2
install version.rb /usr/lib/ruby/site_ruby/1.8/flvtool2
<--- lib/flvtool2
<--- lib

If you made typing errors, you should at least get an error like
Code:
No such file or directory
or
Code:
Resource temporarily unavailable

To avoid typing errors, you could use copy-and-paste for the commands.

Please tell us where your procedure differs/starts to differ.


Sharon M
Member


Joined: 26 May 2009
Location: United States

Post Posted: May 26, 2009 15:02 Posts Comp View users profile Send private message Reply with quote

Thank you, Case. Astounding! Success, combined with failure, combined with success. As described below in detail. (In addition to getting help with the last little failure, I hope all this detail will help somebody else down the road...)

Quote:
Quote:
I placed the directory inside /Applications. Any problem with that?

I don't know, but I never do that for installers, unless a ReadMe file tells me to.
Try it once more, while keeping the "flvtool2-1.0.6" folder on the desktop.


Ah, I guess I wasn't clear on the concept that this was just an installer. I treated it the same as the other downloaded components (mencoder, mpeg2enc, mplayer), which I also put in /Applications (with no apparent problem). So then, once I have a successful install, I can completely discard the flvtool2-1.0.6 folder?

Okay, so first, I moved the existing flvtool2-1.0.6 to the trash, and then I followed your procedure. Here is the result:

Quote:
flvtool2-1.0.6.tgz should be 26,953 bytes
flvtool2-1.0.6.tar should be 153,600 bytes
flvtool2-1.0.6 (the folder) should be 109,783 bytes, and should have 26 items (including subfolders).


The .tgz opened directly to the folder without ever showing me a .tar, but the .tgz and the folder were just as you say.

Performed the install. This time, I did get feedback, just as you describe. The location of the folder must somehow have been the key. (What a dumb little thing!)

After the install, the folder now has 27 instead of 26 items, with the addition of a file called "InstalledFiles" (a text file listing flvtool2 placed in /usr/bin, plus 13 other files all placed in /usr/lib/ruby/site_ruby/1.8 and folders therein). This did not happen on my previous installs.

I looked at /usr/bin and indeed, flvtool2 is there.

I ran ffmpegX again. Since I had not reinstalled that, it still contains the modified script.

Now here's the failure. I encoded another video. Unfortunately, I still got the "Permission denied" message at the end, and the resulting .flv file still does not contain metadata.

However, here is some more success. I tried running flvtool2 manually, from the command line, as I saw described on another website:

Code:
flvtool2 -UP filepath/filename.flv


This generated tons of feedback (in a good way) and I noticed the last-modified time on the .flv file was updated. This new file plays properly, with all the metadata!!!

So, this just leaves me wondering why ffmpegX didn't invoke flvtool2 properly. I wonder if I'll have to always remember to run it manually? Restarting ffmpegX and even rebooting did not help. I can certainly live with this if necessary, so thanks a million, Case! But if you have thoughts on that last little issue, I'd love to hear them.


Case
Explorer


Joined: 04 Feb 2004
Location: Middle Earth

Post Posted: May 26, 2009 23:54 Posts Comp View users profile Send private message Reply with quote

Sharon M wrote:
So then, once I have a successful install, I can completely discard the flvtool2-1.0.6 folder?
Yes.

Sharon M wrote:
Now here's the failure. I encoded another video. Unfortunately, I still got the "Permission denied" message at the end.
Weird error, one that you're the first to report here, as far as I recall.

Sharon M wrote:
However, here is some more success. I tried running flvtool2 manually, from the command line. [...] This generated tons of feedback (in a good way) and I noticed the last-modified time on the .flv file was updated. This new file plays properly, with all the metadata.
Proof that flvtool2 itself is properly installed and in working condition. smile.gif

Sharon M wrote:
So, this just leaves me wondering why ffmpegX didn't invoke flvtool2 properly. [...] If you have thoughts on that last little issue, I'd love to hear them.
1/ Re-check the content of the script file flvtool2 inside ffmpegX, to contain
Code:
#! /usr/bin/ruby
require 'flvtool2'
2/ Repair permissions with Disk Utility (should be part of regular maintenance). Try ffmpegX again.
3/Check permissions on all files and folders involved. I'll try to get a list for comparison.
I have no idea how the permission could have gotten extra restrictions without explicitly doing so. But no doubt such a file or folder can be found and fixed.


Case
Explorer


Joined: 04 Feb 2004
Location: Middle Earth

Post Posted: May 27, 2009 00:08 Posts Comp View users profile Send private message Reply with quote

Sharon M wrote:
I treated it the same as the other downloaded components (mencoder, mpeg2enc, mplayer), which I also put in /Applications (with no apparent problem).
The ffmpegX components self-installer copies the three binaries, so you do not need to keep these downloaded files around after installation, certainly not in /Applications . It doesn't hurt, though.

Sharon M
Member


Joined: 26 May 2009
Location: United States

Post Posted: May 27, 2009 00:25 Posts Comp View users profile Send private message Reply with quote

Yep, the script file is correct. I think I already repaired permissions but now did it again for good measure, then ran ffmpegX again. Still permission denied.

Ah, okay, got it about the binaries. I think I'm finally clear on all this!


Sharon M
Member


Joined: 26 May 2009
Location: United States

Post Posted: May 27, 2009 19:48 Posts Comp View users profile Send private message Reply with quote

P.S. I've discovered a situation where I actually don't want ffmpegX to insert metadata: when joining two .flv files into one. Seems not to work to convert two files to .flv, add the metadata, and join them, but works fine if I convert each file to .flv, then join them (I did the joining in MPEG Streamclip), and only then use flvtool2 to add the metadata.

So, this was easy enough, ironically because I still have the problem that ffmpegX doesn't invoke flvtool2 automatically. But if I manage to get that problem solved and get ffmpegX adding metadata at the end of each conversion, is there any way to turn that feature off, on a case-by-case basis? I suppose I could temporarily change the name of flvtool2 in order to force it to fail, but it would be nice if there was something more elegant!


Sharon M
Member


Joined: 26 May 2009
Location: United States

Post Posted: May 27, 2009 20:06 Posts Comp View users profile Send private message Reply with quote

P.P.S. permissions on the flvtool2 script file are:

-rw-r--r--

And I notice that the permissions on the original version (I only modified a copy, changed the name of the original, and kept both) are:

-rwxr-xr-x

This must have happened when I modified the script, using TextEdit. What is the command to change permissions? (I'm sure I knew that once, a long time ago...) I feel sure this will fix the problem!


Last edited by Sharon M on May 28, 2009 00:51, edited 1 time in total


Case
Explorer


Joined: 04 Feb 2004
Location: Middle Earth

Post Posted: May 27, 2009 23:58 Posts Comp View users profile Send private message Reply with quote

Code:
chmod 755 <filename>
Does that solve it?

explanation:
r = 4
w = 2
x = 1

rwx = 4 + 2 + 1 = 7
r-x = 4 + 0 + 1 = 5

-rwxr-xr-x = (owner) rwx, (group) r-x, (other) r-x = 7 5 5


Last edited by Case on May 31, 2009 07:00, edited 1 time in total


Sharon M
Member


Joined: 26 May 2009
Location: United States

Post Posted: May 30, 2009 14:55 Posts Comp View users profile Send private message Reply with quote

Whoops, I hadn't seen your latest post (wasn't notified, maybe I forgot to log in the previous time). But I had seen your earlier version, when it just said "chmod 755 filename", and I already knew the explanation. So, I just now finally had a chance to give it a try.

And YES, that solved it! Perfect! Thanks for all your help!

Sharon


Case
Explorer


Joined: 04 Feb 2004
Location: Middle Earth

Post Posted: May 31, 2009 06:53 Posts Comp View users profile Send private message Reply with quote

The board doesn't notify for edits.

And you're welcome. smile.gif


Reply to topic All times are GMT - 6 Hours
Forum Index -> ffmpegX -> ffmpegX general discussion Page 1 of 1





You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Jump to:  
Display:   
DVDFab DVD to DVD/Mobile & Blu-ray to Blu-ray offers a 20% discount until Nov 8. More info or download trial!
About   Advertise   Forum Archive   RSS Feeds   Statistics