Hi, a new release of the MP3/MPlayer plugin is available from my homepage. Main feature of this release is the inclusion of the background/cover image patch.
http://www.muempf.de/down/vdr-mp3-0.9.11.tar.gz
NEWS:
20.02.2005: Version 0.9.11 development (vdr 1.2.6/1.3.21) - Now using propper readdir() to scan directory contents rather than the external find & sort tools. - Added cover image display during MP3 replay. See the README on how this has to be configured. If you was using the old image patch, be aware that there are now new commandline options and that the layout of the cache directory has changed. Initial patch made by Eloy, currently maintained by Tobias Grimm for ctvdr-debian package.
Stefan Huelswitt wrote:
Hi, a new release of the MP3/MPlayer plugin is available from my homepage. Main feature of this release is the inclusion of the background/cover image patch.
http://www.muempf.de/down/vdr-mp3-0.9.11.tar.gz
NEWS:
20.02.2005: Version 0.9.11 development (vdr 1.2.6/1.3.21)
- Now using propper readdir() to scan directory contents rather than the external find & sort tools.
- Added cover image display during MP3 replay. See the README on how this has to be configured. If you was using the old image patch, be aware that there are now new commandline options and that the layout of the cache directory has changed. Initial patch made by Eloy, currently maintained by Tobias Grimm for ctvdr-debian package.
I have created a patch to the default image_convert.sh script to support both ntsc and pal by setting an initial FORMAT variable in the script.
Best Regards,
N.B. Some of the resolutions *may* still need adjustment. Please let me know. I am especially interested in NTSC displays. Thanks.
--- image_convert.sh.example 2005-02-19 21:50:10.000000000 -0800 +++ image_convert.sh 2005-02-19 21:49:46.000000000 -0800 @@ -3,10 +3,22 @@ # requires: ...topnm, pnmscale, pnmcomp, ppmntsc, ppmtoy4m, mpeg2enc #
+# Set format to "ntsc" or "pal" +FORMAT=ntsc + +if [ $FORMAT = "ntsc" ]; then # target image width (taking into account visible screen area) -TW=632 +TW=600 # target image height +TH=420 +fi + +if [ $FORMAT = "pal" ]; then +# target image width (taking into account visible screen area) +TW=632 +# target image height TH=512 +fi
TMP=/tmp/image_convert.$$.pnm IMG=$1 @@ -53,11 +65,23 @@ # # now run the conversion # + +if [ $FORMAT = "ntsc" ]; then +pnmscale $S $TMP | \ + pnmpad -black -width 704 -height 480 | \ + ppmntsc | \ + ppmtoy4m -v 0 -n 1 -r -F 30000:1001 | \ + mpeg2enc -f 7 -T 90 -F 4 -nn -a 2 -v 0 -o "$MPG" +fi + +if [ $FORMAT = "pal" ]; then pnmscale $S $TMP | \ pnmpad -black -width 704 -height 576 | \ ppmntsc --pal | \ ppmtoy4m -v 0 -n 1 -r -F 25:1 | \ mpeg2enc -f 7 -T 90 -F 3 -np -a 2 -v 0 -o "$MPG" +fi + # # cleanup #
Stefan Huelswitt schrieb:
[...]
- Now using propper readdir() to scan directory contents rather than the external find & sort tools.
Wow! Scanning is pretty fast now. I have a huge music archive and it used to take some seconds until the dir-list was shown.
The next benefit is, that this is more busybox compatible and I can throw away the native versions of 'find' and 'sort'.
Thanks Alfred
C.Y.M wrote:
Stefan Huelswitt wrote:
Hi, a new release of the MP3/MPlayer plugin is available from my homepage. Main feature of this release is the inclusion of the background/cover image patch.
http://www.muempf.de/down/vdr-mp3-0.9.11.tar.gz
NEWS:
20.02.2005: Version 0.9.11 development (vdr 1.2.6/1.3.21)
- Now using propper readdir() to scan directory contents rather than the external find & sort tools.
- Added cover image display during MP3 replay. See the README on how
this has to be configured. If you was using the old image patch, be aware that there are now new commandline options and that the layout of the cache directory has changed. Initial patch made by Eloy, currently maintained by Tobias Grimm for ctvdr-debian package.
I have created a patch to the default image_convert.sh script to support both ntsc and pal by setting an initial FORMAT variable in the script.
Best Regards,
N.B. Some of the resolutions *may* still need adjustment. Please let me know. I am especially interested in NTSC displays. Thanks.
There is a small problem with the image_convert.sh script. If an image exists but it is not yet in cache, VDR will throw up a threading error while the image is converted. Perhaps we can use an "echo ... |at now" for the conversion so vdr is not held up while the processing is taking place?
Best Regards,
On 20 Feb 2005 "C.Y.M" syphir@syphir.sytes.net wrote:
There is a small problem with the image_convert.sh script. If an image exists but it is not yet in cache, VDR will throw up a threading error while the image is converted. Perhaps we can use an "echo ... |at now" for the conversion so vdr is not held up while the processing is taking place?
I don't understand what you mean.
The conversion is already done asynchronous.
Anyway, a log would be helpfull...
Regards.
Stefan Huelswitt wrote:
On 20 Feb 2005 "C.Y.M" syphir@syphir.sytes.net wrote:
There is a small problem with the image_convert.sh script. If an image exists but it is not yet in cache, VDR will throw up a threading error while the image is converted. Perhaps we can use an "echo ... |at now" for the conversion so vdr is not held up while the processing is taking place?
I don't understand what you mean.
The conversion is already done asynchronous.
Anyway, a log would be helpfull...
Here is an example of the error in the syslog:
Feb 20 10:28:06 sid vdr[7544]: mp3: player thread started (pid=7544) Feb 20 10:28:08 sid vdr[4248]: error reading '/dev/input/event2' Feb 20 10:28:11 sid vdr[7545]: ERROR: thread 81926 won't end (waited 3 seconds) - canceling it... Feb 20 10:28:22 sid vdr[7544]: mp3: player thread ended (pid=7544)
How to reproduce:
Put an image file in a directory with a matching mp3 file. This error occurs the first time the image is converted to a mpg file. Once the cache file exists, the error does not happen any more.
I would also like to add that everything *appears* to work correctly from a users standpoint. The only problem is the error in the syslog (but VDR does not actually shutdown).
Best Regards,
On 20 Feb 2005 "C.Y.M" syphir@syphir.sytes.net wrote:
Here is an example of the error in the syslog:
Feb 20 10:28:06 sid vdr[7544]: mp3: player thread started (pid=7544) Feb 20 10:28:08 sid vdr[4248]: error reading '/dev/input/event2' Feb 20 10:28:11 sid vdr[7545]: ERROR: thread 81926 won't end (waited 3 seconds)
- canceling it...
Feb 20 10:28:22 sid vdr[7544]: mp3: player thread ended (pid=7544)
How to reproduce:
Put an image file in a directory with a matching mp3 file. This error occurs the first time the image is converted to a mpg file. Once the cache file exists, the error does not happen any more.
Well as usual: I can't reproduce this here.
One interesting thing: what process is vdr[7545] and which thread is 81926? The conversion isn't made asynchronous with threads but with fork(). So possibly this is not related.
Regards.
Stefan Huelswitt wrote:
On 20 Feb 2005 "C.Y.M" syphir@syphir.sytes.net wrote:
Here is an example of the error in the syslog:
Feb 20 10:28:06 sid vdr[7544]: mp3: player thread started (pid=7544) Feb 20 10:28:08 sid vdr[4248]: error reading '/dev/input/event2' Feb 20 10:28:11 sid vdr[7545]: ERROR: thread 81926 won't end (waited 3 seconds)
- canceling it...
Feb 20 10:28:22 sid vdr[7544]: mp3: player thread ended (pid=7544)
How to reproduce:
Put an image file in a directory with a matching mp3 file. This error occurs the first time the image is converted to a mpg file. Once the cache file exists, the error does not happen any more.
Well as usual: I can't reproduce this here.
Hmm, make sure you dont have a default background image defined either...
One interesting thing: what process is vdr[7545] and which thread is 81926?
I would assume that 7545 is the thread that is calling the image_convert.sh script. But, I have no idea what 81926 is.. What I was thinking is that if a thread gets stuck waiting for a process to finish, that it affects all the other threads (since this is not multithreaded).
The conversion isn't made asynchronous with threads but with fork(). So possibly this is not related.
I can reproduce it every time though..
What I was thinking is something like this for a fix:
if [ $FORMAT = "pal" ]; then echo " \ pnmscale $S $TMP | \ pnmpad -black -width 704 -height 576 | \ ppmntsc --pal | \ ppmtoy4m -v 0 -n 1 -r -F 25:1 | \ mpeg2enc -f 7 -T 90 -F 3 -np -a 2 -v 0 -o "$MPG" \ "| at now fi
C.Y.M wrote:
What I was thinking is something like this for a fix:
if [ $FORMAT = "pal" ]; then echo " \ pnmscale $S $TMP | \ pnmpad -black -width 704 -height 576 | \ ppmntsc --pal | \ ppmtoy4m -v 0 -n 1 -r -F 25:1 | \ mpeg2enc -f 7 -T 90 -F 3 -np -a 2 -v 0 -o "$MPG" \ "| at now fi
Sorry, this method did not solve the problem..
Best Regards, C.Y.M.
On 20 Feb 2005 "C.Y.M" syphir@syphir.sytes.net wrote:
Stefan Huelswitt wrote:
One interesting thing: what process is vdr[7545] and which thread is 81926?
I would assume that 7545 is the thread that is calling the image_convert.sh script. But, I have no idea what 81926 is.. What I was thinking is that if a thread gets stuck waiting for a process to finish, that it affects all the other threads (since this is not multithreaded).
The conversion isn't made asynchronous with threads but with fork(). So possibly this is not related.
As I said before, the conversion is not a thread, so the message cannot be directly related to this.
You have to find out which VDR thread causes the message.
Inside the MP3 plugin there is only one place with a Cancel(3) and this is in the non-blocking file reader in libsndfile decoder, while there are more than 10 place with a Cancel(3) in vdr 1.3.21.
Regards.
Stefan Huelswitt wrote:
- Added cover image display during MP3 replay. See the README on how this has to be configured. If you was using the old image patch, be aware that there are now new commandline options and that the layout of the cache directory has changed. Initial patch made by Eloy, currently maintained by Tobias Grimm for ctvdr-debian package.
Odd problems. The background image is never shown unless it is found from cache, when the image conversion has to be run I keeps telling me the image is queued until I stop playback, then it says it was converted and next time I play it is found from cache and works just fine :)
..Esa
On 21 Feb 2005 Esa Viitala cue@scape.net wrote:
Odd problems. The background image is never shown unless it is found from cache, when the image conversion has to be run I keeps telling me the image is queued until I stop playback, then it says it was converted and next time I play it is found from cache and works just fine :)
Which VDR version? And which system are you running on?
The image convert starts with a line "convert started" and is finished when "convert finished" appears. This may take a while depending on your CPU. Shortly after the finish line appeared the image should be loaded and displayed.
In any case you may mail me a complete log for diagnostic.
Regards.
On 21 Feb 2005 Sascha Volkenandt lists@magoa.net wrote:
Am Sonntag, 20. Februar 2005 00:17 schrieb Stefan Huelswitt:
20.02.2005: Version 0.9.11 development (vdr 1.2.6/1.3.21)
- Now using propper readdir() to scan directory contents rather than the external find & sort tools.
I hope you mean readdir_r? *fG*
I was waiting for such a comment ;)
Actualy it is readdir(). There is no need to use readdir_r() and there was never a need to change this in VDR core IMO.
Regards.
On 20 Feb 2005 "C.Y.M" syphir@syphir.sytes.net wrote:
Here is an example of the error in the syslog:
Feb 20 10:28:06 sid vdr[7544]: mp3: player thread started (pid=7544) Feb 20 10:28:08 sid vdr[4248]: error reading '/dev/input/event2' Feb 20 10:28:11 sid vdr[7545]: ERROR: thread 81926 won't end (waited 3 seconds)
- canceling it...
Feb 20 10:28:22 sid vdr[7544]: mp3: player thread ended (pid=7544)
How to reproduce:
Put an image file in a directory with a matching mp3 file. This error occurs the first time the image is converted to a mpg file. Once the cache file exists, the error does not happen any more.
I would also like to add that everything *appears* to work correctly from a users standpoint. The only problem is the error in the syslog (but VDR does not actually shutdown).
Does this patch solves the problem?
Regards.
Stefan Huelswitt wrote:
diff -urN -x '*.o' -x .dependencies mp3-0.9.11/data-mp3.c mp3-unstable/data-mp3.c --- mp3-0.9.11/data-mp3.c 2005-02-19 12:11:41.000000000 +0100 +++ mp3-unstable/data-mp3.c 2005-02-22 18:18:58.000000000 +0100 @@ -45,7 +39,65 @@ const char *imagecache = "/var/cache/images/mp3"; const char *imageconv = "image_convert.sh";
-// --- cSong ------------------------------------------------------------- +// --- cImageConvert -----------------------------------------------------------
Thank you, Stefan. This fixes that threading issue I was talking about a few days ago when an image is generated (not yet in cache). Although, now with this new patch, the image does not display until I re-select the mp3 (if the image is not already in cache). But, its better than before. :)
Thanks again....
On 24 Feb 2005 "C.Y.M" syphir@syphir.sytes.net wrote:
Thank you, Stefan. This fixes that threading issue I was talking about a few days ago when an image is generated (not yet in cache). Although, now with this new patch, the image does not display until I re-select the mp3 (if the image is not already in cache). But, its better than before. :)
Can you please mail me a console log for the case of a not already cached image?
Regards.
Stefan Huelswitt wrote:
On 24 Feb 2005 "C.Y.M" syphir@syphir.sytes.net wrote:
Thank you, Stefan. This fixes that threading issue I was talking about a few days ago when an image is generated (not yet in cache). Although, now with this new patch, the image does not display until I re-select the mp3 (if the image is not already in cache). But, its better than before. :)
Can you please mail me a console log for the case of a not already cached image?
Sure.. I have a default "background.jpg" background image set. First I deleted the "background.jpg.mpg" file from cache. Then I selected a song to play.. the background was black. Next, I added another song to the que and the background image was then shown (because the first song regenerated the cache).
Feb 24 11:11:43 sid vdr[17893]: mp3: playback started with instant playlist Weird Al Yankovic - it's all about the pentiums.mp3 Feb 24 11:11:43 sid vdr[26611]: transfer thread ended (pid=26611, tid=2392077) Feb 24 11:11:43 sid vdr[20123]: TS buffer on device 1 thread ended (pid=20123, tid=2342924) Feb 24 11:11:43 sid vdr[20122]: buffer stats: 95128 (4%) used Feb 24 11:11:43 sid vdr[20122]: receiver on device 1 thread ended (pid=20122, tid=2326539) Feb 24 11:11:43 sid vdr[17893]: buffer stats: 155852 (7%) used Feb 24 11:11:43 sid vdr[11463]: Text2Skin: menu display update thread ended (pid=11463, tid=2441225) Feb 24 11:11:43 sid vdr[11791]: mp3: player thread started (pid=11791) Feb 24 11:12:08 sid vdr[11953]: Text2Skin: menu display update thread started (pid=11953, tid=2523147) Feb 24 11:12:16 sid vdr[17893]: mp3: playback started with instant playlist Weird Al Yankovic - Yoda.mp3 Feb 24 11:12:16 sid vdr[11953]: Text2Skin: menu display update thread ended (pid=11953, tid=2523147)
Best Regards, C.Y.M.
On 24 Feb 2005 "C.Y.M" syphir@syphir.sytes.net wrote:
Sorry, but...
Stefan Huelswitt wrote:
Can you please mail me a console log for the case of a not already cached image?
Note the word "console"...
Regards.
Stefan Huelswitt wrote:
On 24 Feb 2005 "C.Y.M" syphir@syphir.sytes.net wrote:
Sorry, but...
Stefan Huelswitt wrote:
Can you please mail me a console log for the case of a not already cached image?
Note the word "console"...
Sorry about that...
instant: file Al Green - here I am.mp3 mgr: next -> 0 mgr: background scan thread started (pid=8297) mgr: scanning (id3) Al Green - here I am.mp3 mgr: background scan idle mp3: player active true requested... norm: lim_lev=0.700000 lim_acc=12 norm: table size=13518 start=0b330000 jump=00010000 norm: accuracy 0.000000022352 mp3: play mp3: player active true done mp3-dvb: using DVB output mp3: heartbeat buffer=0 now=3034 mp3: starting play mgr: bgr-scan -> throttle (26170) mgr: playing Al Green - here I am.mp3 mp3: found song level=0.363800 peak=1.114500 norm: gain=0.687191 dogain=1 dolimit=0 (target=0.250000 level=0.363800 peak=1.114500) mp3: isStream=0 levelgood=1 haslevel=1 image: checking image for hades/20's - 70's/A - E/Al Green/Al Green - here I am.mp3 image: check /home/mp3/hades/20's - 70's/A - E/Al Green/Al Green - here I am.jpg image: check /home/mp3/hades/20's - 70's/A - E/Al Green/Al Green - here I am.png image: check /home/mp3/hades/20's - 70's/A - E/Al Green/Al Green - here I am.gif image: check /home/mp3/hades/20's - 70's/A - E/Al Green/cover.jpg image: check /home/mp3/hades/20's - 70's/A - E/Al Green/cover.png image: check /home/mp3/hades/20's - 70's/A - E/Al Green/cover.gif image: check /home/mp3/hades/20's - 70's/A - E/artist.jpg image: check /home/mp3/hades/20's - 70's/A - E/artist.png image: check /home/mp3/hades/20's - 70's/A - E/artist.gif image: check /home/mp3/background.jpg image: found image: loading image /home/mp3/background.jpg image: not cached image: convert queued image: using static default image image: convert started /home/mp3/background.jpg -> /etc/vdr/images/home/mp3/background.jpg.mpg mad: decode hdr error, frame=0 count=1: lost synchronization mp3: heartbeat buffer=0 now=3035 image: still queued mp3: new input sample rate 44100 mad: new resample ratio 0.918750 (from 44100 kHz to 48000 kHz) mgr: bgr-scan -> run (26734) mgr: background scan idle wakeup mgr: background scan idle image: still queued image: still queued image: still queued image: convert finished mp3: heartbeat buffer=1047856 now=3036 image: loading image /home/mp3/background.jpg image: cached mp3: write delayed 653 ms instant: file Al Green - let's get married.mp3 mgr: background scan idle wakeup mgr: scanning (id3) Al Green - let's get married.mp3 mgr: background scan idle mp3: heartbeat buffer=1047856 now=3056 mp3: skip to start of song mp3: stopping play mp3: scale stats clipped=0 peak_clip=0.000000 peak=0.708483 norm: stats tot=2370816 lim=0/0.000% clip=0/0.000% peak=0.715 mgr: bgr-scan -> throttle (48116) mp3: starting play mgr: playing Al Green - here I am.mp3 mp3: found song level=0.363800 peak=1.114500 norm: gain=0.687191 dogain=1 dolimit=0 (target=0.250000 level=0.363800 peak=1.114500) mp3: isStream=0 levelgood=1 haslevel=1 image: loading image /home/mp3/background.jpg image: cached mad: decode hdr error, frame=0 count=1: lost synchronization mgr: bgr-scan -> run (48486) mgr: background scan idle wakeup mgr: background scan idle action: poll logger 0: Interrupted system call mp3: player active false requested... mp3: stopping play mp3: scale stats clipped=0 peak_clip=0.000000 peak=0.708483 norm: stats tot=1656576 lim=0/0.000% clip=0/0.000% peak=0.715 mp3: player active false done mgr: background scan idle wakeup mgr: background scan thread ended (pid=8297) cache: saved cache to file