Video Thumbnails on Samsung TV

General discussion about the media server. Feature requests. Hints, tips and tricks.
Post Reply
chessdragon136
Posts: 20
Joined: Tue Aug 09, 2011 2:04 pm
AV Hardware: MyBookLive NAS
Samsung TV

Video Thumbnails on Samsung TV

Post by chessdragon136 » Tue Aug 09, 2011 3:32 pm

I am currently trying to get video thumbnails to work on my Samsung TV. My setup is the following:

MyBookLive NAS with Twonky 6.0.34
Samsung TV

I grabbed ffmpeg using apt-get ffmpeg and changed the file ffmpeg.location in cgi-bin of twonky setup to point to /usr/bin
Sadly, no luck..

Has anyone else managed to get video thumbnails working on a Samsung TV? Or am I doing something wrong (bad ffmpeg install..?) Or is it just not possible currently?

Thank you for your time

User avatar
sorcier
Posts: 3
Joined: Fri Oct 29, 2010 2:51 pm
AV Hardware: Debian 5, Twonky 5.0.1, PS3, Freebox HD (Setupbox from french ISP)
Location: France

Re: Video Thumbnails on Samsung TV

Post by sorcier » Tue Aug 09, 2011 8:11 pm

I have the same problem but on Linux Debian 5 with ffmpeg installed and all codecs installed. It doesn't work. I think so there isn't this feature in twonky unfortunately :(

Fussel
Posts: 11
Joined: Wed Aug 10, 2011 10:12 am
AV Hardware: Windows 7 PC
WD Mybook Live
Samsung LE32C650 TV
Samsung BD-C5900 Blueray Player

Re: Video Thumbnails on Samsung TV

Post by Fussel » Wed Aug 10, 2011 11:58 am

Here I am, I didn't see your post this morning when I wrote mine.

Just to recap, I have the same setting, Twonky 6.0.34 on Mybook Live with latest firmware and Samsung TV.

Regarding ffmpeg, I did not install anything by myself. i just saw a ffmpef file in usr/bin and thought that would be enough. I guess it might be connected to the "no transcoding" issue, I hope we get an answer by the Twonky team on this.

I had thumbnails with 6.0.34 on Windows7 PC with the patched thumbnail.desc file, but yet no luck on Linux.

I am not familiar with Linux notations, in Windows the ffmpeg.location was "c\}ffmpeg", I changed it to "usr/bin" on the Mybook. Is that right? Maybe it's "./usr/bin" or somethin else?

chessdragon136
Posts: 20
Joined: Tue Aug 09, 2011 2:04 pm
AV Hardware: MyBookLive NAS
Samsung TV

Re: Video Thumbnails on Samsung TV

Post by chessdragon136 » Wed Aug 10, 2011 12:15 pm

Yeah I have the feeling it is definitely an issue with the ffmpeg install and/or missing codecs.
And yeah it should just be /usr/bin

I just came across this: http://www.twonkyforum.com/mediawiki/in ... ranscoding
Worth trying I think..

Fussel
Posts: 11
Joined: Wed Aug 10, 2011 10:12 am
AV Hardware: Windows 7 PC
WD Mybook Live
Samsung LE32C650 TV
Samsung BD-C5900 Blueray Player

Re: Video Thumbnails on Samsung TV

Post by Fussel » Wed Aug 10, 2011 12:58 pm

Well, the problem here ist that transcoding options are not grayed out but completly missing. Does anybody have any experience with transcoding options on Linux releases prior to 6.0.34? Maybe there is something missing in this release?

But, however, go ahead and try it! Would be nice to hear some success stories :-)

chessdragon136
Posts: 20
Joined: Tue Aug 09, 2011 2:04 pm
AV Hardware: MyBookLive NAS
Samsung TV

Re: Video Thumbnails on Samsung TV

Post by chessdragon136 » Wed Aug 10, 2011 1:41 pm

You can show the transcoding item by editing the twonkymedia-server.ini in the /CacheVolume/twonkymedia folder..
There is an item called suppressmenu = and removing transcoding from that will show it in the web config.
Feel free to try that while im still playing with the other

chessdragon136
Posts: 20
Joined: Tue Aug 09, 2011 2:04 pm
AV Hardware: MyBookLive NAS
Samsung TV

Re: Video Thumbnails on Samsung TV

Post by chessdragon136 » Wed Aug 10, 2011 2:19 pm

Ok

Enabling transcoding and enabling conversion of images to jpeg results in this in the logs

14:12:59:155 [Info] - LOG_SYSTEM: transcode_this_item : transcode /shares/Public/Shared Videos/TV/test.avi
14:12:59:156 [Trace] - LOG_SYSTEM: transcode_this_item : JPEG1920x1080 --> /CacheVolume/twonkymedia/images/486d02ea0f40fb91ed16e5cec50a730b/1920x1080/test.avi
.jpg
14:12:59:156 [Info] - LOG_SYSTEM: system_call_waiting_prio : strProg /usr/bin/ffmpeg
14:12:59:156 [Info] - LOG_SYSTEM: system_call_waiting_prio : strParam -itsoffset -30 -i "/shares/Public/Shared Videos/TV/test.avi" -vcodec mjpeg -vframes 1 -an -f rawvideo -s "1920x1080" "/CacheVolume/twonkymedia/images/486d02ea0f40fb91ed16e5cec50a730b/1920x1080/test.avi
.jpg"
14:12:59:158 [Trace] - LOG_SYSTEM: system_call_waiting_prio : waitpid 24918...
14:12:59:200 [Trace] - LOG_SCAN: file_scanner : filescanner thread checking scan queue
14:12:59:200 [Trace] - LOG_SCAN: file_scanner : filescanner thread reading external import items
14:12:59:283 [Trace] - LOG_SCAN: file_scanner : filescanner thread checking plugins
14:12:59:292 [Trace] - LOG_SYSTEM: system_call_waiting_prio : waitpid 24918 done

14:12:59:292 [Warning] - LOG_SYSTEM: transcode_this_item : /CacheVolume/twonkymedia/images/486d02ea0f40fb91ed16e5cec50a730b/1920x1080/test.avi
.jpg not in fs, transcoder failed


Any ideas?

Fussel
Posts: 11
Joined: Wed Aug 10, 2011 10:12 am
AV Hardware: Windows 7 PC
WD Mybook Live
Samsung LE32C650 TV
Samsung BD-C5900 Blueray Player

Re: Video Thumbnails on Samsung TV

Post by Fussel » Wed Aug 10, 2011 2:28 pm

I found the file you are talking about, but I can't open it properly. It is UTF-16 (?), I don't know how to handle that, sorry.

I guess you might be right with write permissions, but unfortunatly I don't have any ideas abou that.

chessdragon136
Posts: 20
Joined: Tue Aug 09, 2011 2:04 pm
AV Hardware: MyBookLive NAS
Samsung TV

Re: Video Thumbnails on Samsung TV

Post by chessdragon136 » Wed Aug 10, 2011 2:42 pm

Ok to edit in ssh console (putty) you need to use vi

So in putty login in, cd to Cachevolume/twonkymedia/
vi twonkymedia-server.ini

Use arror keys to navigate
when on the line use Alt+a to go into append mode, delete the word transcode and a comma
hit ESC to escape from append mode
:w to write (yes that is a colon!)
:q to quit

restart twonky server.

Ive altered the permissions on the images folder but that's no good. To me ffmpeg doesnt seem to have writes to create a new file?? Opinions please.

Fussel
Posts: 11
Joined: Wed Aug 10, 2011 10:12 am
AV Hardware: Windows 7 PC
WD Mybook Live
Samsung LE32C650 TV
Samsung BD-C5900 Blueray Player

Re: Video Thumbnails on Samsung TV

Post by Fussel » Wed Aug 10, 2011 3:02 pm

Hold a second: Are you trying to convert an .avi to .jpg? Would be interestimg to see if this is working on a Windows plattform. I might try that later this evening.

Thanks for the instructions, by the way!

chessdragon136
Posts: 20
Joined: Tue Aug 09, 2011 2:04 pm
AV Hardware: MyBookLive NAS
Samsung TV

Re: Video Thumbnails on Samsung TV

Post by chessdragon136 » Wed Aug 10, 2011 3:31 pm

The thumbnail works by taking a frame 30 seconds in and converting it to a jpg yes. That is how the thumbnails are generated...

Fussel
Posts: 11
Joined: Wed Aug 10, 2011 10:12 am
AV Hardware: Windows 7 PC
WD Mybook Live
Samsung LE32C650 TV
Samsung BD-C5900 Blueray Player

Re: Video Thumbnails on Samsung TV

Post by Fussel » Wed Aug 10, 2011 3:43 pm

Ouch, you're right. Seems I'm suffering from tunnel vision a bit :-)

chessdragon136
Posts: 20
Joined: Tue Aug 09, 2011 2:04 pm
AV Hardware: MyBookLive NAS
Samsung TV

Re: Video Thumbnails on Samsung TV

Post by chessdragon136 » Wed Aug 10, 2011 6:33 pm

Sorry.. I've tried playing with permissions on the folders but to no luck.. It's annoying that it now shows in the twonky logs but still doesn't work..

/CacheVolume/twonkymedia/images/486d02ea0f40fb91ed16e5cec50a730b/1920x1080/test.avi.jpg not in fs, transcoder failed

The file is indeed not there..
What settings do people use on the transcoding page?

Again ideas welcome.

Thanks

505
Posts: 23
Joined: Mon Feb 01, 2010 2:23 pm
AV Hardware: Sheevaplug with TwonkyMedia server

Re: Video Thumbnails on Samsung TV

Post by 505 » Tue Aug 16, 2011 7:20 pm

Hi,
I've got almost the same setup, and got thumbnails fully working. The explanation is below.

The equipment:
- Samsung B650 (2009 series)
- Sheevaplug with Debian 6.0 (squeeze), 1.2GHz ARM processor, 512 MB ram
- Twonky Server 6.0.34

The basic setup:
I followed the instruction in the zip file for the linux (kirkwood) build. Only thing missing is a proper way to start twonky at the system start. The start/stop script is almost correct. Edit '/usr/local/twonkymedia/twonkymedia.sh' and change the start-stop run levels:

Code: Select all

# Default-Start:  2 3 4 5
# Default-Stop:   0 1 6
Make a link to the init.d folder:

Code: Select all

ln -s /usr/local/twonkymedia/twonkymedia.sh /etc/init.d/twonkymedia
And make sure it actually runs at startup:

Code: Select all

update-rc.d twonkymedia defaults
On the transcoding option page, only JPEG is selected.
That's the basic setup. Nothing special about that. Now for the thumbnail part.

First, better make sure Twonky is stopped, so do "/etc/init.d/twonkymedia stop"
You do need the ffmpeg package, which can be installed with "apt-get install ffmpeg".
You also need the program 'dtach', which can be installed with "apt-get install dtach"

Edit the file '/usr/local/twonkymedia/cgi-bin/ffmpeg.location'. It's content should be:

Code: Select all

/usr/bin
This tells twonky where it can find the ffmpeg program.

Next, edit the file '/usr/local/twonkymedia/cgi-bin/ffmpeg-video-thumb.desc':

Code: Select all

# generate video thumbs
#(c) 2010 by PacketVideo
exec: ffmpeg  -itsoffset -30  -i $infile -vcodec mjpeg -vframes 1 -an -f rawvideo -s 284x160 $outfile
# capabilities
from=video/*
to=image/jpeg
videothumb
synchronous
Edit the file '/usr/local/twonkymedia/twonkymedia.sh'. On line 91, replace '"$TWONKYSRV" -D' with

Code: Select all

dtach -n /tmp/twonkymedia "$TWONKYSRV"
That should do it. Now you can start twonky again with "/etc/init.d/twonkymedia start"

Now the explanation what I actually did.
The default location for ffmpeg is set to "c:\ffmpeg", which is wrong, so I changed it to the actual location
The command to generate a thumbnail was wrong. In the default setup, there is a variable for the delay in seconds (-$videothumbtime), which is converted to -"30". However, the quotes give an error, so I replaced that with -30. The 30 is the number of seconds into the movie to take the screenshot. 30 seconds is not the best time, especially with series titles, because it will always show the same frame. However, a higher number (longer into the movie), would mean more things to calculate. So depending how fast your server is, experiment a bit with this number.
Be default, Twonky runs as a daemon (the -D flag in the startup script). However, transcoding does not work in daemon mode. dtach is a program (like the program 'screen') to run a process in an a separate screen/window, so it can run in the background. This is used to simulate the daemon option. As an extra bonus, it gives you the option to see what twonky is doing transcoding-wise. Type

Code: Select all

dtach -a /tmp/twonkymedia
and you should see the transcoding process. Use this to verify that transcoding is taking place. To exit, press ctrl+\ Transcoding will still take place in the background.

To verify that transcoding is actually working, first use the flash browser. Switch to the thumbnail view (top right above the folder/file pane), and browse to a video folder. After that, test on your TV, and you should see thumbnails.
One caveat: whilst twonky is still generating the thumbnail, browsing the folder structure on the TV is slow. Be patience, and let twonky do the bulk of the generating first. If you add a new video file, the thumbnail will be generated within minutes automatically.
Get nice thumbnails in Twonky with tw-video-scraper plugin

chessdragon136
Posts: 20
Joined: Tue Aug 09, 2011 2:04 pm
AV Hardware: MyBookLive NAS
Samsung TV

Re: Video Thumbnails on Samsung TV

Post by chessdragon136 » Wed Aug 17, 2011 11:03 pm

Hi

Ok I followed most of that..
Made a link to the sh in int.d, altered it (also had to alter my working directory).

I don't quite see why I need dtach, than just remove the -D...? Or is it just so that it doesn't show up constantly in putty and the like?

It starts and runs on port 9000 (the default) However, I had changed it to 8000 in twonkymedia-server.ini (and it still says 8000 there,,) It also lost my key information so obviously wasnt looking into the right directory for that information (/CacheVolume/twonkymedia)

Edit: To the above, i found a twonkymedia folder inside the twonkymedia, which seems to be where it is now. Why has this happened? (/CacheVolume/twonkymedia/twonkymedia/) How do i correct this?

Help would be appreciated.

Edit - As a test, I used ffmpeg in the console, worked fine.. However.

1. It created the file test.avi.jpg in the same folder as the video file. The flash viewer did NOT recognise this.
2. Changing it to test.jpg, it showed up.. However, it did NOT show up on my tv (Samsung UE37D5520)

It looks like the script isn't creating the right filename for me (its including the .avi extension which shouldn't be there! HELP??

Also, what view is your tv set up in with the twonky (in the media receivers bit) A picture of your tv showing screenshots would be appreciated :S Not sure that yours and mine use the same software...

Thanks

User avatar
DaemonBeetle
Posts: 305
Joined: Mon Dec 28, 2009 11:05 am
AV Hardware: Plex Media Server, Samsung Smart TV (2009 and 2013)

Re: Video Thumbnails on Samsung TV

Post by DaemonBeetle » Thu Aug 18, 2011 8:49 am

If you don't use dtach then your system will apparently hang on boot, since it will never complete the twonky startup script. None of the startup scripts that appear after that in the startup process will run.

Following 505's instructions gets it working on both the flash interface and my B650 series Samsung TV.
No longer running Twonky

chessdragon136
Posts: 20
Joined: Tue Aug 09, 2011 2:04 pm
AV Hardware: MyBookLive NAS
Samsung TV

Re: Video Thumbnails on Samsung TV

Post by chessdragon136 » Thu Aug 18, 2011 6:00 pm

Ok some more questions and update

Images are now transcoding
They do NOT show up in flash twonky
They do NOT show up on TV

I have noticed that although I have changed the size of the images, they are still SAVED into a folder named 1920x1080..
If I copy the images into a folder named 160x160 they work both on twonky (and tv i believe)

Now, how do I change the folder destination...? It is just specified as $output which seems to have the 1920x1080 built in..Even a Regular Expression would do (tried to look it up but im useless with RegEx)

505
Posts: 23
Joined: Mon Feb 01, 2010 2:23 pm
AV Hardware: Sheevaplug with TwonkyMedia server

Re: Video Thumbnails on Samsung TV

Post by 505 » Tue Aug 23, 2011 8:55 am

chessdragon136 wrote:I don't quite see why I need dtach, than just remove the -D...? Or is it just so that it doesn't show up constantly in putty and the like?
According to the documentation on Twonky, transcoding does not work in daemon mode. Therefore you need to remove the -D flag. But like DaemonBeetle said, in a boot script, the program keeps running, and never completes the boot order. With dtach, the boot goes okay, and it allows you to see what Twonky is doing.
chessdragon136 wrote:I have noticed that although I have changed the size of the images, they are still SAVED into a folder named 1920x1080..
If I copy the images into a folder named 160x160 they work both on twonky (and tv i believe)
I also have a 1920x1080 folder with the images (even though none of the source videos are in HD), but also a 160x160 folder with images (all tough not in all image folders). I have no idea where the 160x160 folder comes from. The resolution is defined in the script (284x160), and the files in 1920x1080 are in that resolution.
If it still fails, look at the console output of twonky when it's making the thumbnails, and when browsing the files on you TV. That might give some information.
Get nice thumbnails in Twonky with tw-video-scraper plugin

chessdragon136
Posts: 20
Joined: Tue Aug 09, 2011 2:04 pm
AV Hardware: MyBookLive NAS
Samsung TV

Re: Video Thumbnails on Samsung TV

Post by chessdragon136 » Thu Sep 01, 2011 6:33 pm

Well I've left it for a week and have been using the system and still no thumbnails show up..
It is all transcoding but only into the 1920x1080 filder
SOME (1 or 2 in a couple of 100!) magically have thumbnails and when looking at the store a 160x160 folder was created and images copied into it (with the larger resolution).

Help or ideas welcome

Post Reply