Transcoding WMA to MP3 for Samsung TV

swsearcy
Posts: 6
Joined: Mon Dec 27, 2010 2:36 am
AV Hardware: Twonky Server
Samsung TV
Sony Blu Ray

Transcoding WMA to MP3 for Samsung TV

Postby swsearcy » Mon Dec 27, 2010 2:54 am

I installed ffmpeg in hopes of being able to transcode wma music files into MP3 to play on my Samsung TV. However, after installing ffmpeg, only the video transcoding options in Twonky Server (6.0.30) became un-greyed. What must be done to enable the Transcode music to MP3 option?

Thank you,
Scott

PeeBee
Posts: 392
Joined: Sat Jun 13, 2009 12:16 pm
AV Hardware: Buffalo LS Pro; PS3; Samsung LE37B650

Re: Transcoding WMA to MP3 for Samsung TV

Postby PeeBee » Mon Dec 27, 2010 1:58 pm

You need to edit the ffmpeg.location file so it points to where ffmpeg is installed and create a .desc file for each type of conversion you need. In this case you need to create a ffmpeg-wma-mp3.desc file containing the correct command line parameters to convert from wma to mp3 (assuming ffmpeg can do this and I'm not sure it can from what I've read).

From what I've seen online, converting from wma to mp3 is a 2-part process; first to wav using something like mplayer, then to mp3 using something like lame.

Check out the any-mp3.desc file in the cgi-bin folder. This suggests that the conversion can be done by any2mp3 but this is just a script that runs (get it from http://www.fileden.com/files/2008/11/12/2184486/Softwares/Linux/any2mp3 and calls mplayer and lame to do the conversion. So it might work if you get a copy of this script (but this maybe Linux/Unix only as it is a shell script), mplayer and lame, and edit the relevant .location files. It doesn't look straightforward.

Block conversion of your wma files to mp3 or re-ripping your CDs to mp3 are other options. iTunes will automatically convert any wma files added to it - if you first set your import option to mp3 instead of m4a then it will automatically create mp3 versions of all wma files added. Re-rippiing leads to better quality files though as you are not cross-encoding.

PB
Samsung LE37B650T2WXXU; Liteon 5055GDL+ HDD/DVD Recorder; Playstation 3; Iomega Screenplay HD 500GB; Buffalo Linkstation Pro LS-320GL (running Twonky 6.0.30, SqueezeBox Server 7.6 and acting as a Print Server)

swsearcy
Posts: 6
Joined: Mon Dec 27, 2010 2:36 am
AV Hardware: Twonky Server
Samsung TV
Sony Blu Ray

Re: Transcoding WMA to MP3 for Samsung TV

Postby swsearcy » Tue Dec 28, 2010 1:52 am

PB,
Thank you for such a thorough and thoughtful response.

I did previously edit the ffmpeg.location file and created the ffmpeg-wma-mp3.desc file. From a command prompt I ran ffmpeg with the parameters and options used in ffmpeg-wma-mp3.desc to confirm that ffmpeg would in fact do the conversion, which it did.

From posts on other sites, I got the impression that maybe Twonky only used vlc for audio transcoding, so I installed it, confirmed that the vlc.location file was correct and created vlc-wma-mp3.desc. As with ffmpeg, I ran vlc from a command prompt to confirm that I had the correct parameters and options. With vlc, the music transcode option became un-greyed and could be checked. Unfortunately though, the transcoding doesn't appear to be working because the TV still displays "unsupported file type" error message when playing wma files. Do I need to change the profile for Samsung TV in some way? What can I do to troubleshoot the problem better?

Thanks again.
Scott

PeeBee
Posts: 392
Joined: Sat Jun 13, 2009 12:16 pm
AV Hardware: Buffalo LS Pro; PS3; Samsung LE37B650

Re: Transcoding WMA to MP3 for Samsung TV

Postby PeeBee » Tue Dec 28, 2010 12:09 pm

You could try adding ,WMA to the end of the TR:JPEG160x160,JPEG1920x1080 line in the Samsung Tv profile in the clients .db file.

Could you post back the contents of your ffmpeg-wma-mp3.desc file? I have a Samsung TV as well so can try and get transcoding working in parallel to you. I have servers running on my Win 7 PC and on my LS Pro NAS to play with.

PB
Samsung LE37B650T2WXXU; Liteon 5055GDL+ HDD/DVD Recorder; Playstation 3; Iomega Screenplay HD 500GB; Buffalo Linkstation Pro LS-320GL (running Twonky 6.0.30, SqueezeBox Server 7.6 and acting as a Print Server)

PeeBee
Posts: 392
Joined: Sat Jun 13, 2009 12:16 pm
AV Hardware: Buffalo LS Pro; PS3; Samsung LE37B650

Re: Transcoding WMA to MP3 for Samsung TV

Postby PeeBee » Tue Dec 28, 2010 6:46 pm

I've now got wma to mp3 transcoding working on my Win 7 version of Twonky 6.0.30.

1. Put ffmpeg.exe into c:\ffmpeg to match ffmpeg.location file.
2. Created ffmpeg-wma-mp3.desc file:

Code: Select all

# transcode audio (wma to mp3)
#(c) 2008 by PacketVideo
exec: ffmpeg -i $infile -ab 256K $outfile
# capabilities
from=audio/x-ms-wma
to=audio/mpeg
synchronous
priority=idle


Note use of audio/mpeg not audio/mp3 as that didn't work - audio/mpeg was used in the any-mp3.desc file.

3. Added ,WMA to end of TR line for Samsung TV entry in clients.db.
4. Restarted server. At this point the MP3 check box on the Transcode config page became available though I did not select it at this point.
5. Tried wma files on TV - still came up with file type unsupported.
6. Added wma file type to Samsung TV profile in clients.db - MT:wma audio/x-ms-wma. I wasn't sure when the profile is read in so I chenged the entry on the Media Receivers page for my TV to a different entry, saved the changes and then set it back to Samsung TV again.
7. Retried wma files on TV - still said file type unsupported but retried files and they then played. The first time seems to kick twonky into transcoding the files and then they are available for subsequent plays (stored in the db\cache folder). Never tried this at step 5 so I'm not sure if step 6 is needed or not. [edit: I have now fixed this by changing the .desc file entry from asynchronous to synchronous as suggested in this post - http://www.twonkyforum.com/viewtopic.php?f=18&t=7258#p26801]

The check boxes on the Transcode config page are for background transcoding - if checked then twonky will transcode all files that need to be converted and store them for later use. This should mean that they will play immediately when asked for rather than have the wait while they are transcoded on the fly, though they will take up more disk space.

PB
Samsung LE37B650T2WXXU; Liteon 5055GDL+ HDD/DVD Recorder; Playstation 3; Iomega Screenplay HD 500GB; Buffalo Linkstation Pro LS-320GL (running Twonky 6.0.30, SqueezeBox Server 7.6 and acting as a Print Server)

swsearcy
Posts: 6
Joined: Mon Dec 27, 2010 2:36 am
AV Hardware: Twonky Server
Samsung TV
Sony Blu Ray

Re: Transcoding WMA to MP3 for Samsung TV

Postby swsearcy » Wed Dec 29, 2010 3:40 am

Hmmm. I was very encouraged to see your post and felt that my mistake was using mp3 rather than mpeg in the ffmpeg-wma-mp3.desc file. However, I still can't get it working, but am close. I followed your directions exactly and am using Twonky 6 on a Win2K3 Windows Home Server. I copied your ffmpeg-wma-mp3.desc file. My Samsung TV profile is:

NA:Samsung TV
DD:Samsung DTV
XM:DLNA15
XM:FORCE_DURATION
XM:FORCE_4TH_FIELD
XM:NOEMBEDDEDALBUMART
TR:JPEG160x160,JPEG1920x1080,WMA
DB:FIX
MT:mkv video/x-mkv
MT:mpeg,mpeg2,vdr,spts,tp,ts video/mpeg
HP:chunked
MT:m4a audio/mp4
MT:wma audio/x-ms-wma

I can tell that transcoding is taking place because there are folders in C:\Documents and Settings\All Users\Application Data\twonkymedia\db\cache. In those folders are \mp3 folders which contain the transcoded songs with filenames song.wma.mp3. However, I still get unsupported file type on the TV, even if I try to play the song more than once. I'm trying to troubleshoot with the Twonky log, but am not having much luck just yet. I'll let you know what I find.

I thought it was a little strange that the transcoded songs were named song.wma.mp3, but maybe not because the thumbnails are named song.wma.jpg.

p.s. I tried with and without MT:wma in the Samsung TV profile.

PeeBee
Posts: 392
Joined: Sat Jun 13, 2009 12:16 pm
AV Hardware: Buffalo LS Pro; PS3; Samsung LE37B650

Re: Transcoding WMA to MP3 for Samsung TV

Postby PeeBee » Wed Dec 29, 2010 10:56 am

Did you try setting the profile for the TV to something different, saving the changes then setting it back to Samsung TV again and saving again? As I said I'm not sure when the clients.db profile is read in so if you change it it might not get read in automatically. You could try clearing all the devices and letting the TV get detected again.

I'm away for a few days but I'll be able to look in on your progress though I won't be able to try anything until Monday.

TTFN

PB
Last edited by PeeBee on Thu Dec 30, 2010 10:43 pm, edited 1 time in total.
Samsung LE37B650T2WXXU; Liteon 5055GDL+ HDD/DVD Recorder; Playstation 3; Iomega Screenplay HD 500GB; Buffalo Linkstation Pro LS-320GL (running Twonky 6.0.30, SqueezeBox Server 7.6 and acting as a Print Server)

swsearcy
Posts: 6
Joined: Mon Dec 27, 2010 2:36 am
AV Hardware: Twonky Server
Samsung TV
Sony Blu Ray

Re: Transcoding WMA to MP3 for Samsung TV

Postby swsearcy » Wed Dec 29, 2010 12:24 pm

First, thank you for your assistance! Yes, I did set the profile to Samsung Phone, saved the settings, changed it back to Samsung TV, then saved the settings. After making several changes though, now I don't see the transcoding taking place. In a couple days I will go back to the beginning, take better notes, and report back. Thanks again.
Scott

swsearcy
Posts: 6
Joined: Mon Dec 27, 2010 2:36 am
AV Hardware: Twonky Server
Samsung TV
Sony Blu Ray

Re: Transcoding WMA to MP3 for Samsung TV

Postby swsearcy » Thu Dec 30, 2010 8:55 am

Well, I am at a complete loss. With background transcoding enabled, Twonky does successfully transcode the wma files to mp3 using the parameters in ffmpeg-wma-mp3.desc. However, whenever a wma file is selected on the TV, Twonky appears to send the wma file rather than transcoding it or using the previously transcoded file in the cache. The following is a sequence from the Twonky log.

12/30/10 02:11:58:125 [Info] - LOG_HTTP: HTTP_accept_Impl : entering receive module
12/30/10 02:11:58:125 [Info] - LOG_HTTP: HTTP_send_receive : header = HEAD /disk/DLNA-PNWMABASE-OP01-FLAGS01700000/O0$1$8I46090.wma HTTP/1.0
getcontentFeatures.dlna.org: 1
Host: xxx.xxx.xxx.xxx:9000


12/30/10 02:11:58:125 [Info] - LOG_HTTP: HTTP_send_header : sending HTTP/1.1 200 OK
Content-Type: audio/x-ms-wma
Content-Length: 3193611
Date: Thu, 30 Dec 2010 07:11:58 GMT
Pragma: no-cache
Cache-control: no-cache
Last-Modified: Mon, 12 Oct 2009 17:29:25 GMT
Accept-Ranges: bytes
Connection: close
contentFeatures.dlna.org: DLNA.ORG_PN=WMABASE;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01700000000000000000000000000000
transferMode.dlna.org: Streaming
EXT:
Server: Windows NT/5.0, UPnP/1.0, pvConnect UPnP SDK/1.0, TwonkyMedia UPnP SDK/1.1

I've checked 5+ times to ensure that everything is setup as you described. Out of curiosity, shouldn't MP3 be listed on the TR: line rather than WMA since MP3 is the transcoded format? I tried it that way but it didn't make a difference.

Maybe there's something funky about running Twonky on WHS that's getting in the way.
Scott

swsearcy
Posts: 6
Joined: Mon Dec 27, 2010 2:36 am
AV Hardware: Twonky Server
Samsung TV
Sony Blu Ray

Re: Transcoding WMA to MP3 for Samsung TV

Postby swsearcy » Sun Jan 09, 2011 3:06 pm

PB,
If you have a minute, what do you see in the Twonky log when a file is transcoded? This has to be something simple because background transcoding does work when enabled, but Twonky doesn't appear to transcode on the fly when a wma file is selected.

Thanks,
Scott

ptbhackett
Posts: 5
Joined: Mon Jan 16, 2012 11:22 pm
AV Hardware: Twonky Server
Samsung UE32C6310UK
Roku Soundbridge
Netgear MP101

Re: Transcoding WMA to MP3 for Samsung TV

Postby ptbhackett » Tue Jan 17, 2012 1:30 am

Did you ever get transcoding of WMA to MP3 working for the Samsung TV ? I've given this a try following the posts here and have not succeeded. I have tried both vlc and ffmpeg. Both of these can transcode m4a to mp3 which then plays OK on the TV. However, it doesn't work for WMA. No mp3 files are created in the cache when trying to play a wma file although I can create an mp3 if I go to the command line and type the same, so it's not a problem with the transcoding software as far as I can tell. If only it would work like it does for m4a. Does that shed any light on where the problem may lie, with the TV or the server software? Any help appreciated.

Twonky_Rick
Posts: 3816
Joined: Wed Nov 19, 2008 1:59 am
AV Hardware: Samsung 650 Series TV (2010), 4.5TB HP MediaSmart server with 100,000 songs, 5) AT&T U-Verse STB, CE form-factor Media Center PC and 6 other networked PCs running TwonkyManager, 2 Sonos ZP80, Sonos S5 speaker, Apple TV (running XBMC), Roku Soundbridge, X-Box 360, Sony PS3, Kodak 10" Wireless Photo Frame, iPhone with PlugPlayer software, Sonos CR-100.
Location: San Diego
Contact:

Re: Transcoding WMA to MP3 for Samsung TV

Postby Twonky_Rick » Tue Jan 17, 2012 2:17 am

You might want to repost this in the server section. There are more transcoding experts there. :D

- Rick
Follow me on Twitter! mostlytech1
Checkout my blog: http://mostly-tech.com/


Return to “Internet-Ready TVs”

Who is online

Users browsing this forum: No registered users and 2 guests

cron