Yet Another Recording Downloader for the Wiz
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
I got myself a Ubuntu One account and downloaded the client, which crashes every time I try to run it. From the crash log, it looks like a reference through a null pointer.
Anyone seen this, or seen any useful reports about it?
I'm running OS X Mountain Lion 10.8.2. I've sent a report in to Ubuntu helpdesk, but it's still Sunday where they live.
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
Thanks. I discovered that by accident after I posted.Luke wrote:You can upload files from the UbuntuOne web page.
Next, to find out how to export files so that they download with sensible names.
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
Version 0.5.4 beta1 limited release now available, with files hosted on Ubuntu One.Luke wrote:You can upload files from the UbuntuOne web page.
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
Seems to work fine with YARDWiz. Only limited testing though, mainly just downloading and pausing/resuming.prl wrote:Version 0.5.4 beta1 limited release now available, with files hosted on Ubuntu One.
If anybody else wants to test getWizPnP version 0.5.4 beta1 with YARDWiz, you can simply replace the existing getWizPnP.exe in the YARDWiz install folder with the beta version from the above link.
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
Seems to have been caused by my home directory path having a space in one of its elements. Who's been naughty and not checked an error return value in Ubuntu One, then? Worked around for now.prl wrote:...I got myself a Ubuntu One account and downloaded the client, which crashes every time I try to run it. From the crash log, it looks like a reference through a null pointer.
...
I've uploaded all my Beyonwiz software releases to U1, and I'll gradually start fixing the links in OpenWiz, newest first.
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
Example:
Here is an example of a file that might be called /etc/paths.d/vlc
Code: Select all
/Applications/VLC.app/Contents/MacOS/VLC
Note, I have no idea if this will work as I don't have OSX 10.8 installed.
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
That seems to be the correct place to add things that should go in everyone's $PATH variable. XQuartz uses it in 10.8, and sets the X11 path in my $PATH variable.Luke wrote:Assuming you have actually installed VLC (note that VLC is not included with YARDWiz, it is available from VideoLAN), make sure the path to the VLC executable is in your $PATH environment variable. This article suggests it can be done by adding directories that should be in the PATH into files under the /etc/paths.d directory.
Example:
Here is an example of a file that might be called /etc/paths.d/vlcCode: Select all
/Applications/VLC.app/Contents/MacOS/VLC
Note, I have no idea if this will work as I don't have OSX 10.8 installed.
The convention appears to be that the file is named nn-appname, and the nn is used to control the order that the application paths are added to the $PATH variable. The XQuartz one on my system is named /etc/paths.d/40-XQuartz, so a consistent name for VLC might be something like /etc/paths.d/50-VLC.
If VLC is installed in the Applications folder as suggested in the downloaded, that path should be the right contents for /etc/paths.d/50-VLC (you can change the last part of the path to whatever you like and it should still work, but the file must be in the /etc/paths.d folder).
Don't bother trying to find /etc/paths.d in the Finder. It's not normally visible there. But it is visible from the command-line interface in Terminal. TextEdit can't access the directory directly, either.
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
You need to log out and log back in before the fix can work. Apologies if that's obvious to you and you've already done it.DavidR wrote:Yes VLC is installed and working.
Tried the fix above and it still doesn't work.
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
Google code generates and publishes the SHA1checksums automatically and doesn't have an option to use MD5 (though I could generate them manually and insert them into the download description text field).prl wrote:Hi, Luke. I just noticed that you publish an SHA1 checksum for the OSX YARDWiz DMG.
Unfortunately, OS X doesn't appear to come with a command-line SHA1 command. MD5, yes, nut not SHA1.
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
I suspected something like the SHA1 checksum being generated automatically. I probably wouldn't have bothered with checking an MD5 checksum if there had been one there, though.Luke wrote:Google code generates and publishes the SHA1checksums automatically and doesn't have an option to use MD5 (though I could generate them manually and insert them into the download description text field).prl wrote:Hi, Luke. I just noticed that you publish an SHA1 checksum for the OSX YARDWiz DMG.
Unfortunately, OS X doesn't appear to come with a command-line SHA1 command. MD5, yes, nut not SHA1.
If I'd been hacked sufficiently to point me to a fake YARDWiz page containing malware, the hackers probably would have also been smart enough to post checksums that correspond to the malware I'd be downloading.
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
I'm seeing (or rather not seeing) the same thing as DavidR; there's no VLC icon at the bottom of the queue window and no Play in VLC entry in the context menu for a recording in the recordings list.
The VLC directory is listed when I print the PATH variable in Terminal, and I can run VLC just by typing the command VLC in a Terminal window, so the correct path is being loaded into the shell run by Terminal.
However, it looks as though neither the paths in /etc/paths nor the paths in /etc/paths.d are in the environment that YARDWiz uses. Logging out and back in after adding the VLC information to /etc/paths.d doesn't seem to help.
The YARDWiz log file says that YARDWiz's PATH is:
Code: Select all
DEBUG __init__._ApplyConfig: PATH
/Applications/YARDWiz.app/Contents/Resources
.
/usr/bin
/bin
/usr/sbin
/sbin
Perhaps YARDWiz could add the paths in those files to its PATH variable, and additionally (as the documentation says it does for Windows) add the usual installation location for VLC to the PATH as it does for the YARDWiz resources.
I'm happy to help with any testing. I owe Luke a lot for his testing of getWizPnP.
Speaking of which, Luke, do you think that getWizPnP 0.5.4beta1 is ready for release?
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
Fixed (I think...) Had to create the file /etc/launchd.conf and add the line
setenv PATH /Applications/VLC.app/Contents/MacOS/:/usr/bin:/bin:/usr/sbin:/sbin
You'd need to add anything else in your existing path that's not default.
It could also be that the line we were adding to paths and /paths.d/vlc is /Applications/VLC.app/Contents/MacOS/VLC and not /Applications/VLC.app/Contents/MacOS - we were specifying the app and not its path.
See
http://apple.stackexchange.com/question ... at-will-be
EDIT: see this about editing info.plist for the app in question http://apple.stackexchange.com/question ... 9845#79845
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
I've now done that, and I get the context menu Play in VLC and the VLC icon (required reboot, not just logout to do it). And it didn't work for me either. If I select Play VLC in the context menu for a recording, nothing happens. If I start a download and then click on the VLC icon at the bottom of the queue, I get an error message in the Log window saying:DavidR wrote:EDIT: spoke to soon. I've got the VLC icon appearing, but it won't launch VLC.
Fixed (I think...) Had to create the file /etc/launchd.conf and add the line
setenv PATH /Applications/VLC.app/Contents/MacOS/:/usr/bin:/bin:/usr/sbin:/sbin
You'd need to add anything else in your existing path that's not default.
Code: Select all
Downloading Test/Seven Morning News...
Finished playing recording
vlc: unknown option or missing mandatory argument `--qt-minimal-view'
Try `vlc --help' for more information.
When I run vlc --help, there is no --qt-minimal-view (and indeed no other --qt-*) option listed.
If I go into YARDWiz Tools>Options...>Settings and remove the --qt-minimal-view option from VLC commandline arguments, then VLC runs for both the context menu and the VLC icon playing a recording as it downloads.
It could be that that's what you were doing, but it wasn't what I was doing. I was able to use /etc/paths.d/50-VLC to let me run VLC from the Terminal without specifying a path.DavidR wrote:...
It could also be that the line we were adding to paths and /paths.d/vlc is /Applications/VLC.app/Contents/MacOS/VLC and not /Applications/VLC.app/Contents/MacOS - we were specifying the app and not its path. ...
The problem with /etc/paths and /etc/paths.d isn't that I was getting the path wrong (I tested that), but that those files don't appear to be used to construct PATH in the environment that YARDWiz has. As I said in my previous post.
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
- Although the man page for launchctl implies that ~/.launchd.conf can be used to configure launchd in a per-user way, the man page for launchd.conf contradicts that. The man page for launchd.conf is correct.
- Unfortunately launchctl can't expand environmental variables, so you can't do something like "setenv PATH $PATH:/Applications/VLC.app/Contents/MacOS" in /etc/launchd.conf to just add to the path launchd already has.
- launchd starts as the first process at boot time, and it only reads /etc/launchd.config at that time.
- If you want to experiment with paths in launchd, you can run something like "launchctl setenv PATH /some:/new/path"
- Messing about with system configuration files in Terminal is probably not something the average YARDWiz users will want to do.
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
Can I make a suggestion about the PATH that is set up by YARDWiz for itself? The one I saw in the log files has the current directory '.' earlier in the path than the normal system command directories like /bin and /usr/bin.
The current directory, if it appears at all in $PATH, should be after all the system directories in $PATH. This prevents some (fairly simple-minded) security attacks.
The current directory shouldn't be in YARDWiz's PATH unless it's actually necessary, and if it is there it should be late in the list, after all the system command directories.
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
Sounds goodLuke wrote:Agreed, I'll add the VLC path to YARDWiz, the same as what I do for Windows users.prl wrote:
- Messing about with system configuration files in Terminal is probably not something the average YARDWiz users will want to do.
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
Haven't really had a chance to test well, but the major issue from 0.5.3 (resuming) seems to be resolved. I'll have another go at testing over the weekend.prl wrote:Speaking of which, Luke, do you think that getWizPnP 0.5.4beta1 is ready for release?
I've uploaded a YARDWiz beta with VLC fixes (removed --qt-minimalview arg and added OSX specific VLC path) and moved '.' to the end of the PATH. I'd appreciate it if someone could test on OSX 10.8 (I've still only got a 10.6.7 'hackintosh' virtual machine which is a pain to upgrade).
http://code.google.com/p/yardwiz/downlo ... X-10.6.dmg
As an aside, testing the compiled version of getWizPnP 0.5.4beta1 on OSX the first time produced the following error, possibly because the existing unpacked par in $TEMPDIR was 0.5.2. Removing it as per the error message resolved the issue.
getWizPnP: private subdirectory /var/folders/I4/I4wbd3buF8Crh3zsvPa-UE+++TI/-Tmp-//par-bnl is unsafe (please remove it and retry your operation)
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
Thanks, Luke. I'll download the YARDWiz beta and give it a spin.Luke wrote:Haven't really had a chance to test well, but the major issue from 0.5.3 (resuming) seems to be resolved. I'll have another go at testing over the weekend.prl wrote:Speaking of which, Luke, do you think that getWizPnP 0.5.4beta1 is ready for release?
I've uploaded a YARDWiz beta with VLC fixes (removed --qt-minimalview arg and added OSX specific VLC path) and moved '.' to the end of the PATH. I'd appreciate it if someone could test on OSX 10.8 (I've still only got a 10.6.7 'hackintosh' virtual machine which is a pain to upgrade).
http://code.google.com/p/yardwiz/downlo ... X-10.6.dmg
Perhaps a new version of par/pp sets the permissions on $TMPDIR/par-username tighter than previous versions or checks more carefully. When I first run getWizPnP 0.5.4beta1, the par cache has Unix permissions 700. But I get the same permissions when I run 0.5.3 after deleting the old par cache, and no error if I then run 0.5.4beta1. However, if I delete the par cache, run 0.5.3, manually change the permissions on the par cache to 755, and then run 0.5.4beta1, I can force the error. However, if I then run 0.5.2, I get no error. If I delete the par cache and run 0.5.2 it creates the cache with 755 permissions.Luke wrote:As an aside, testing the compiled version of getWizPnP 0.5.4beta1 on OSX the first time produced the following error, possibly because the existing unpacked par in $TEMPDIR was 0.5.2. Removing it as per the error message resolved the issue.
getWizPnP: private subdirectory /var/folders/I4/I4wbd3buF8Crh3zsvPa-UE+++TI/-Tmp-//par-bnl is unsafe (please remove it and retry your operation)
So it appears that the permissions on the par cache have been tightened up, but I don't recall seeing this error message.
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
http://code.google.com/p/yardwiz/downlo ... X-10.6.dmg
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
I had Default to TS Format for Downloads set for all the tests.
It seems to be pretty much random whether VLC starts playing the recording immediately, or it just shows the VLC control panel and I have to start play manually.
Each time VLC starts in a YARDWiz session, an extra --no-video-title gets added to the argument list, so it can end up lookilg like this in ps:
Code: Select all
1671 ?? S 0:00.78 vlc --extraintf=rc --rc-host=localhost:51440 --quiet --verbose=0 --rc-fake-tty --deinterlace-mode=mean --no-video-title --no-video-title --no-video-title --no-video-title --no-video-title /var/folders/nm/mzgkvw5j06bg3c4rvfvqc8dm0000gn/T/tmpNwCRLh.ts
I just don't seem to be able to get some recordings to play in VLC.
When I try to play a non-playable recording using Play in VLC in the recording download window, getWizPnP runs (I can see it in a ps listing), but VLC doesn't (or at least it exits/crashes before I get to look at it in ps). There's no error message in the log file. When it's in this state, Play in VLC is greyed out in the context menu, and if I kill getWizPnP from a Terminal window the log file shows:
Code: Select all
Error, unable to download /var/folders/nm/mzgkvw5j06bg3c4rvfvqc8dm0000gn/T/tmpcb5JqJ.ts.
getWizPnP STDOUT:PRIME Canberra: Better Homes And Gardens/The 80's Revisited - Deborah Conway, Jon Stevens and Richard Clapton / Piano Bar / The Rubik's Cube Bedroom / Ant Farms and Sea Monkeys / Crepe Suzette - Copy
getWizPnP STDERR:
If I start downloading a non-playable recording (i.e. one that Play In VLC won't play), the VLC icon at the bottom of the window remains greyed out.
I haven't seen anything peculiar in the info window for any of the recordings that don't play. Here's one:
Code: Select all
PRIME Canberra: Better Homes And Gardens/The 80's Revisited - Deborah Conway, Jon Stevens and Richard Clapton / Piano Bar / The Rubik's Cube Bedroom / Ant Farms and Sea Monkeys / Crepe Suzette
Ant farms and sea monkeys suggest a bizarre cast of mind; so too,
perhaps a Rubik's Cube bedroom. Or the fashions of the eighties, not
so the music though, Deborah Conway, Jon Stevens and Richard Clapton
take us down memory lane. And crepe suzette and piano bars a good in
any decade. Or century.
Index name: recordings/Test/Better Homes And Gardens Jul.23.2010_19.28
Fri Jul 23 19:28:00 2010 - Fri Jul 23 20:45:00 2010
playtime: 77:00 recording size: 3099.1 MB bit rate: 5.4 Mb/s
autoDelete: Never
That non-playable one was on PRIME Canberra, but none of the old copies I have of Wallace and Gromit's World of Invention that I've tried to play, play either. Here's the info fro one of them:
Code: Select all
ABC1: Wallace And Gromit's World Of Invention/From A To B
In the last episode of the series, Wallace and Gromit explore
incredible transportation inventions from around the globe as the
desire for freedom and escape have driven human inventiveness through
the ages. In the segment 'Contraption Countdown' the focus is on
peculiar transport devices and we find out how to cross the River
Thames in a plastic bag.
Index name: recordings/Wallace & Grommit/Wallace And Gromit's World Of Invention Feb.27.2011_18.28
Sun Feb 27 18:28:00 2011 - Sun Feb 27 19:25:00 2011
playtime: 57:00 recording size: 2239.6 MB bit rate: 5.2 Mb/s
autoDelete: Never
Final item is a suggestion: Why separate pause and resume download buttons? Why not swap the function and icon by context, rather than greying out the non-appliccable one?
Sorry that it's got a bit long-winded, but I wanted to get everything down that I'd tried.
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
Here's what's in the log for one that plays:
Code: Select all
DEBUG utilities.subproc: getWizPnP --version
DEBUG utilities.subproc: ['getWizPnP', '--version']
DEBUG utilities.__init__: /var/folders/nm/mzgkvw5j06bg3c4rvfvqc8dm0000gn/T/tmpJRruIt.ts
DEBUG utilities.subproc: getWizPnP --all -q -R --BWName -O /var/folders/nm/mzgkvw5j06bg3c4rvfvqc8dm0000gn/T -T tmpJRruIt "recordings/Test/Escape To The Sun Jan.9.2011_22.43" -H 10.1.1.8 -p 49152 -t
DEBUG utilities.subproc: ['getWizPnP', '--all', '-q', '-R', '--BWName', '-O', '/var/folders/nm/mzgkvw5j06bg3c4rvfvqc8dm0000gn/T', '-T', 'tmpJRruIt', 'recordings/Test/Escape To The Sun Jan.9.2011_22.43', '-H', '10.1.1.8', '-p', '49152', '-t']
DEBUG utilities.subproc: vlc --extraintf=rc --rc-host=localhost:49435 --quiet --verbose=0 --rc-fake-tty --deinterlace-mode=mean --no-video-title /var/folders/nm/mzgkvw5j06bg3c4rvfvqc8dm0000gn/T/tmpJRruIt.ts
DEBUG utilities.subproc: ['vlc', '--extraintf=rc', '--rc-host=localhost:49435', '--quiet', '--verbose=0', '--rc-fake-tty', '--deinterlace-mode=mean', '--no-video-title', '/var/folders/nm/mzgkvw5j06bg3c4rvfvqc8dm0000gn/T/tmpJRruIt.ts']
Code: Select all
DEBUG utilities.subproc: getWizPnP --version
DEBUG utilities.subproc: ['getWizPnP', '--version']
DEBUG utilities.__init__: /var/folders/nm/mzgkvw5j06bg3c4rvfvqc8dm0000gn/T/tmpDa9duu.ts
DEBUG utilities.subproc: getWizPnP --all -q -R --BWName -O /var/folders/nm/mzgkvw5j06bg3c4rvfvqc8dm0000gn/T -T tmpDa9duu "recordings/Test/Better Homes And Gardens Jul.23.2010_19.28" -H 10.1.1.8 -p 49152 -t
DEBUG utilities.subproc: ['getWizPnP', '--all', '-q', '-R', '--BWName', '-O', '/var/folders/nm/mzgkvw5j06bg3c4rvfvqc8dm0000gn/T', '-T', 'tmpDa9duu', 'recordings/Test/Better Homes And Gardens Jul.23.2010_19.28', '-H', '10.1.1.8', '-p', '49152', '-t']
I also noted another oddity. When I run ps to look at the processes that YARDWiz is forking, getWizPnP shows up like this:
Code: Select all
482 ?? S 0:09.30 ./getWizP --all -q -R --BWName -O /var/folders/nm/mzgkvw5j06bg3c4rvfvqc8dm0000gn/T -T tmpDa9duu recordings/Test/Better Homes And Gardens Jul.23.2010_19.28 -H 10.1.1.8 -p 49152 -t
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
Fixed.prl wrote:Each time VLC starts in a YARDWiz session, an extra --no-video-title gets added to the argument list
That's similar to how I originally implemented it. I was using two buttons in the same spot and showing/hiding as required which worked fine on Windows but didn't work correctly on Ubuntu so I was lazy and just put the two buttons next to each other. I've just rewritten to use a single button and switch icon/tooltip/function as required. This works on Ubuntu, should have done this in the first place...prl wrote:Final item is a suggestion: Why separate pause and resume download buttons? Why not swap the function and icon by context, rather than greying out the non-appliccable one?
Not sure if I can debug the VLC issues in OSX, but I'll have a look.
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
I'm not sure I should be suggesting this, but I could have a play with the 0.4.3beta2 source.
My Python's a bit rusty*, though (and never was all that great).
* Now that's a bizarre image!
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
Feel free to play with the code, it is open-source after all (note: I'm not a programmer, have no programming training and only taught myself python to automate data analysis tasks at work). Have you tried ruling out VLC itself by downloading then playing directly in VLC (not via YARDWiz)? What version of VLC? VLC 2.x seems to be a major rewrite, I had better luck with 1.1.9 - http://download.videolan.org/pub/videol ... 1.9/macosxprl wrote:What really puzzles me is why the problem I'm seeing depends on the recording.
I'm not sure I should be suggesting this, but I could have a play with the 0.4.3beta2 source.
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
From what I can see from the logs, the problem isn't that VLC won't play the recordings, but that YARDWiz doesn't even start VLC.Luke wrote:Feel free to play with the code, it is open-source after all (note: I'm not a programmer, have no programming training and only taught myself python to automate data analysis tasks at work). Have you tried ruling out VLC itself by downloading then playing directly in VLC (not via YARDWiz)? What version of VLC? VLC 2.x seems to be a major rewrite, I had better luck with 1.1.9 - http://download.videolan.org/pub/videol ... 1.9/macosxprl wrote:What really puzzles me is why the problem I'm seeing depends on the recording.
I'm not sure I should be suggesting this, but I could have a play with the 0.4.3beta2 source.
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
I think that's just OSX chopping off the last 2 characters in the terminal as getWizPnP still runs correctly. From my last test:prl wrote:I also noted another oddity. When I run ps to look at the processes that YARDWiz is forking, getWizPnP shows up like this:It looks like argv[0] is getting truncated to 9 characters. Perhaps there's a copy of 9 chars from the executable path name that used to work when the name was "getWizPnP", but now truncates, because "./getWizPnP" is 11 chars, and so argv[0] is being truncated to "./getWizP", and the "nP" is being chopped off. I'm not sure whether this is happening in YARDWiz code or in the Python libraries, but the fact that it's specific to the length of the string "getWizPnP", points more to it being in YARDWiz.Code: Select all
482 ?? S 0:09.30 ./getWizP --all -q -R --BWName -O /var/folders/nm/mzgkvw5j06bg3c4rvfvqc8dm0000gn/T -T tmpDa9duu recordings/Test/Better Homes And Gardens Jul.23.2010_19.28 -H 10.1.1.8 -p 49152 -t
Code: Select all
bnls-Mac:~ bnl$ ps -e|grep -i wiz
272 ?? 0:35.51 /Users/bnl/YARDWiz-0.4.3/dist/YARDWiz.app/Contents/MacOS/YARDWiz -psn_0_114716
353 ?? 0:02.08 ./getWizP --all -q -R --BWName -O /var/folders/I4/I4wbd3buF8Crh3zsvPa-UE+++TI/-Tmp- -T tmpD7gTst recordings/Motor Sport_ Speedweek Jan.13.2013_11.27 -H 192.168.0.4 -p 49152 -t
355 ttys000 0:00.01 grep -i wiz
bnls-Mac:~ bnl$ ps -e|grep -i vlc
356 ?? 0:00.76 vlc --extraintf=rc --rc-host=localhost:49521 --quiet --verbose=0 --rc-fake-tty --deinterlace-mode=mean --no-video-title /var/folders/I4/I4wbd3buF8Crh3zsvPa-UE+++TI/-Tmp-/tmpD7gTst.ts
359 ttys000 0:00.03 grep -i vlc
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
Argv[0] is just a piece of text passed to the exec() or execv() system calls. It doesn't necessarily say anything about what was passed as the name of the executable to run (that's a separate argument to exec[v]). However, the convention is that argv[0] is the name of the executable.Luke wrote:I think that's just OSX chopping off the last 2 characters in the terminal as getWizPnP still runs correctly. From my last test:prl wrote:I also noted another oddity. When I run ps to look at the processes that YARDWiz is forking, getWizPnP shows up like this:It looks like argv[0] is getting truncated to 9 characters. Perhaps there's a copy of 9 chars from the executable path name that used to work when the name was "getWizPnP", but now truncates, because "./getWizPnP" is 11 chars, and so argv[0] is being truncated to "./getWizP", and the "nP" is being chopped off. I'm not sure whether this is happening in YARDWiz code or in the Python libraries, but the fact that it's specific to the length of the string "getWizPnP", points more to it being in YARDWiz.Code: Select all
482 ?? S 0:09.30 ./getWizP --all -q -R --BWName -O /var/folders/nm/mzgkvw5j06bg3c4rvfvqc8dm0000gn/T -T tmpDa9duu recordings/Test/Better Homes And Gardens Jul.23.2010_19.28 -H 10.1.1.8 -p 49152 -t
Code: Select all
bnls-Mac:~ bnl$ ps -e|grep -i wiz 272 ?? 0:35.51 /Users/bnl/YARDWiz-0.4.3/dist/YARDWiz.app/Contents/MacOS/YARDWiz -psn_0_114716 353 ?? 0:02.08 ./getWizP --all -q -R --BWName -O /var/folders/I4/I4wbd3buF8Crh3zsvPa-UE+++TI/-Tmp- -T tmpD7gTst recordings/Motor Sport_ Speedweek Jan.13.2013_11.27 -H 192.168.0.4 -p 49152 -t 355 ttys000 0:00.01 grep -i wiz bnls-Mac:~ bnl$ ps -e|grep -i vlc 356 ?? 0:00.76 vlc --extraintf=rc --rc-host=localhost:49521 --quiet --verbose=0 --rc-fake-tty --deinterlace-mode=mean --no-video-title /var/folders/I4/I4wbd3buF8Crh3zsvPa-UE+++TI/-Tmp-/tmpD7gTst.ts 359 ttys000 0:00.03 grep -i vlc
It's perfectly possible to run something like exec("/bin/ls", "not_ls_at_all", NULL), and it will show up in ps as "not_ls_at_all". It's also possible for an executable to modify its own argument list, though that's unusual.
The fact that getWizPnP runs means that the executable path name was correct. The fact that YARDWiz's argv[0] shows up as /Users/bnl/YARDWiz-0.4.3/dist/YARDWiz.app/Contents/MacOS/YARDWiz strongly suggests that it's not an OS limitation that's causing argv[0] to be chopped off for ./getWizPnP.
What do you see in ps if you run ./getWizPnP from the Terminal?
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
prl wrote:What do you see in ps if you run ./getWizPnP from the Terminal?
Code: Select all
bnls-Mac:Resources bnl$ ./getWizPnP
ABC1: 7.30 (ACT) *LOCKED
etc…
bnls-Mac:Resources bnl$ echo $PATH
/Library/Frameworks/Python.framework/Versions/2.6/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/bin:/
bnls-Mac:Resources bnl$ getWizPnP
-bash: getWizPnP: command not found
bnls-Mac:Resources bnl$ PATH=$PATH:.
bnls-Mac:Resources bnl$ getWizPnP
ABC1: 7.30 (ACT) *LOCKED
etc…
Code: Select all
bnls-Mac:~ bnl$ ps -e|grep -i wiz|grep -v grep
453 ttys000 0:01.21 ./getWizPnP
bnls-Mac:~ bnl$ ps -e|grep -i wiz|grep -v grep
458 ttys000 0:01.44 ./getWizP
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
If I don't have '.' in my path, and I run ./getWizPnP, then I see:
Code: Select all
Cambyses:~ prl$ ps -e | grep -i w\\iz
1807 ttys000 0:01.23 ./getWizPnP
Cambyses:~ prl$
Code: Select all
Cambyses:~ prl$ ps -e | grep -i w\\iz
1813 ttys000 0:01.22 ./getWizP
Cambyses:~ prl$
It's weird. If I try the same thing with a real binary like sleep, no such truncation happens. So it appears that it's not a problem in the shell, but could be a problem with the startup code in the packed version of getWizPnP.
Just as an aside, here's a perl one-liner to demonstrate the disconnect between the executable name and argv[0].
Code: Select all
Cambyses:getWizPnP prl$ perl -e '$prog="/bin/sleep"; exec $prog "not_sleeping_just_napping", "30"' &
[1] 1876
Cambyses:getWizPnP prl$ ps -e | grep slee\\p
1876 ttys000 0:00.01 not_sleeping_just_napping 30
Cambyses:getWizPnP prl$
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
I think it's worth checking whether VLC will actually play them once completely downloaded by getWizPnP and I'll put in some extra debugging code to see if I can find out what's going on with YARDWiz.
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
- I don't have python 2.6, I have python 2.7.
- I don't have a python binary anywhere in /Library/Frameworks, only in /usr/bin.
- When I try to manually emulate what's in the build-yardwiz-osx.sh script by copying getWizPnP into yardwiz-read-only, and then running "python setup.py py2app", the build proceeds to make a YARDWiz app and DMG in the dist directory, but I get a whole bunch of errors from the strip command: "/usr/bin/strip: changes being made to the file will invalidate the code signature in: /Volumes/Cambyses_User/Users/prl/Computer/src/Beyonwiz/yardwiz-read-only/dist/YARDWiz.app/Contents/Resources/lib/python2.7/lib-dynload/fcntl.so (for architecture x86_64)" which makes me uneasy about the build.
- The uneasiness is confirmed when I try to run the built YARDWiz app, and I get a pop-up window just saying "YARDWiz error" with an option to open the console. When I do, there is just a console message saying "Dock: no information back from LS about running process", and then "YARDWiz: YARDWiz error".
I'll download one of my "unplayable" recordings and see if I can play it directly in VLC.
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
Edit: actually, it might not be that straightforward as I assume you probably don't have the wxpython python library installed.
That build script is just a helper for my specific environment. The simplest way to run would be to copy any updated files to an existing YARDWiz.app folder structure (not sure of the exact path as I'm at work now) they're just stored as .py/.pyc files so you can just replace them.
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
When I downloaded one of the "unplayable" (via the Play in VLC menu item) recordings, the download starts, but there's no progress shown in the progress bar. The log shows:
Code: Select all
Downloading Test/BHG Tail1...
Error, unable to download /Volumes/Cambyses_User/Users/prl/Desktop/BHG Tail1 2010-07-23.ts.
getWizPnP STDOUT:PRIME Canberra: BHG Tail1/The 80's Revisited - Deborah Conway, Jon Stevens and Richard Clapton / Piano Bar / The Rubik's Cube Bedroom / Ant Farms and Sea Monkeys / Crepe Suzette - Copy
getWizPnP STDERR:
Retrying (attempt 2).
Downloading Test/BHG Tail1...
Error, unable to download /Volumes/Cambyses_User/Users/prl/Desktop/BHG Tail1 2010-07-23.ts.
getWizPnP STDOUT:PRIME Canberra: BHG Tail1/The 80's Revisited - Deborah Conway, Jon Stevens and Richard Clapton / Piano Bar / The Rubik's Cube Bedroom / Ant Farms and Sea Monkeys / Crepe Suzette - Copy
getWizPnP STDERR:Recording BHG Tail1 2010-07-23 - The 80's Revisited - Deborah Conway, Jon Stevens and Richard Clapton - Piano Bar - The Rubik's Cube Bedroom - Ant Farms and Sea Monkeys - Crepe Suzette.ts already exists
Use --force to overwrite it
Copy failed: Forbidden
Retrying (attempt 3).
Downloading Test/BHG Tail1...
Error, unable to download /Volumes/Cambyses_User/Users/prl/Desktop/BHG Tail1 2010-07-23.ts.
getWizPnP STDOUT:PRIME Canberra: BHG Tail1/The 80's Revisited - Deborah Conway, Jon Stevens and Richard Clapton / Piano Bar / The Rubik's Cube Bedroom / Ant Farms and Sea Monkeys / Crepe Suzette - Copy
getWizPnP STDERR:Recording BHG Tail1 2010-07-23 - The 80's Revisited - Deborah Conway, Jon Stevens and Richard Clapton - Piano Bar - The Rubik's Cube Bedroom - Ant Farms and Sea Monkeys - Crepe Suzette.ts already exists
Use --force to overwrite it
Copy failed: Forbidden
Strangely, if I download the same recording using either the plain Perl version of getWizPnP (0.5.4beta1) or the packed version of getWizPnP included in YARDWiz 0.4.3beta2, I don't get the errors and the downloaded recording TS file is byte-for-byte identical with the one that getWizPnP run from YARDWiz says didn't download.
Even stranger is that even if I manually run the getWizPnP in YARDWiz with exactly the same arguments that YARDWiz uses, I don't get any errors either (and the downloaded recording is byte-for-byte identical with the other downloads).
If I download a "playable" recording, the progress bar works and I get no download errors:
Code: Select all
Downloading Test/Seven Morning News...
Download of /Volumes/Cambyses_User/Users/prl/Desktop/Seven Morning News 2012-02-17.ts complete.
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
You're right. I don't have wxpython installed. That can easily be corrected, I imagine. What version should I get?Luke wrote:You don't need to build, just run python yardwiz or ./yardwiz from the source directory. The script just needs to be able to find getWizPnP.pl/getWizPnP in your PATH.
Edit: actually, it might not be that straightforward as I assume you probably don't have the wxpython python library installed.
That build script is just a helper for my specific environment. The simplest way to run would be to copy any updated files to an existing YARDWiz.app folder structure (not sure of the exact path as I'm at work now) they're just stored as .py/.pyc files so you can just replace them.
I've also discovered that I do have python2.6 installed. It's just not in /Library/Frameworks/Python.framework where your script has it, it's in /System/Library/Frameworks/Python.framework. I guess that this is either an OS X 10.6/10.8 difference or an XCode version difference. I'm not sure whether python comes with the standard distribution of OS X or is in XCode.
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
Python 2.6 is not required, that's just what I've got installed on the OSX VM. YARDWiz runs fine using Python 2.7.
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
The problem arises because I have $episode (the perl variable corresponding to the --episode option) set in my config file. This means that getWizPnP appends the episode name (if there is one) to the downloaded file name. YARDWiz is unaware of this, and when it checks to see that the file exists, or tries to find the size of the file, it fails, because the file is being downloaded to a different name from what YARDWiz expects. Hence the "download failed" error and the lack of the progress bar.
I haven't looked at the code that runs VLC, but I assume that it waits for the recording file to be present before it starts VLC, which, because it's looking for the wrong filename, never happens.
This is why all the recordings I've looked at have either both problems or neither problem. The problem occurs if a recording has an episode name set, which is why some recordings were OK, and some failed like this.
A workaround for this is to change like 543 of yardwizgui/utilities.py from:
Code: Select all
cmd=[wizexe,'--all','-q','-R','--BWName','-O',d,'-T',f,program['index']]+self.device.args
Code: Select all
cmd=[wizexe,'--all','-q','-R','--BWName','-O',d,'--noepisode','--nodate','--nodateLast','-T',f,program['index']]+self.device.args
Possible better fixes to the problem are:
- An option to getWizPnP to ignore the user config file and run with the normal coded defaults.
- An option to allow the specification of an alternative config file.
However, I think I can now report that YARDWiz playback using VLC does work on 10.8.2.
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
-
- Wizard God
- Posts: 32710
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
Luke wrote:Hahaha, I should have thought that you of all people might have a custom config file... - http://code.google.com/p/yardwiz/issues/detail?id=2
How would you prefer to address the problem?
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV