Ticket #148 (assigned enhancement)

Opened 8 years ago

Last modified 7 years ago

implement transcoding for media files

Reported by: dev Assigned to: dev (accepted)
Priority: major Milestone: 0.7
Component: MediaServer Server Version:
Keywords: Cc: tiran


maybe using gentrans?

Change History

08.12.2008 13:29:38 changed by jmsizun

  • milestone changed from 1.0 to 0.6.

(follow-up: ↓ 3 ) 21.12.2008 15:23:12 changed by scuba

I would suggest the way that mediacoder has solved this: http://mediatomb.cc/dokuwiki/transcoding:transcoding

It uses the config file to map formats, codecs and transcoding software. In that way you can use any encoder and not just the one of your selection. However, since you script for yourself it can be hard to determine bitrate and other settings for a good stream.

(in reply to: ↑ 2 ) 21.12.2008 15:27:17 changed by scuba

I meant Mediatomb of course...

31.12.2008 14:01:41 changed by dev

  • status changed from new to assigned.
  • milestone changed from 0.6 to 0.7.

audio transcoding implemented and checked against PS3 and XBox 360

video will be targeted in the next release

23.04.2009 09:21:07 changed by Mike

Here's another thought for transcoding. I'm sure this has been discussed already, but I like to add these wishes here, so they stay connected.

When implementing transcoding a very important format is Matroshka (mkv). Please consider this as a high priority format too. Quicktime MOV is interesting for Apple Trailers but otherwise not that much used in media collections. Also streaming of VIDEO_TS folders (i.e. DVDs copied to disk) would be a killer feature (not sure this requires transcoding as the actual video files are mpeg2 encoded).


27.08.2009 14:23:04 changed by tiran

  • cc set to tiran.

I'm interested in transcoding as well. We have talked on #coherence yesterday (Crys_).

I'd like to point out image transcoding, too. My Sony Bravia tv takes rather long to display a large JPEG file. I estimate more than a second for a 2272x1704 JPEG. How about resizing the image to 1920x1080 pixels with low compression? I'm going to test multiple images resolutions later.

28.08.2009 15:44:19 changed by tiran

Update: I've got video streaming working with PS3 Media Server (http://otmanix.de/2009/08/04/ps3-media-server-rev-356/) and mencoder. So it's possible to stream videos to my Sony Bravia W5500.

I've used upnp inspector to extract a list of supported formats, too:

http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_FLAGS=8cf00000000000000000000000000000 http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_MED;DLNA.ORG_FLAGS=8cf00000000000000000000000000000 http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG;DLNA.ORG_FLAGS=8cf00000000000000000000000000000 http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:audio/L16:DLNA.ORG_PN=LPCM;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_HD_24_AC3_ISO;SONY.COM_PN=AVC_TS_HD_24_AC3_ISO;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_HD_24_AC3;SONY.COM_PN=AVC_TS_HD_24_AC3;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_HD_24_AC3_T;SONY.COM_PN=AVC_TS_HD_24_AC3_T;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_PS_PAL;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_PS_NTSC;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_50_L2_T;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_60_L2_T;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_EU_ISO;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_EU;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_EU_T;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_50_AC3_T;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_60_AC3_T;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_HD_50_L2_ISO;SONY.COM_PN=HD2_50_ISO;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_HD_60_L2_ISO;SONY.COM_PN=HD2_60_ISO;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_HD_50_L2_T;SONY.COM_PN=HD2_50_T;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_HD_60_L2_T;SONY.COM_PN=HD2_60_T;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_HD_50_AC3_ISO;SONY.COM_PN=AVC_TS_HD_50_AC3_ISO;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_HD_60_AC3_ISO;SONY.COM_PN=AVC_TS_HD_60_AC3_ISO;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_HD_50_AC3;SONY.COM_PN=AVC_TS_HD_50_AC3;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_HD_60_AC3;SONY.COM_PN=AVC_TS_HD_60_AC3;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_HD_50_AC3_T;SONY.COM_PN=AVC_TS_HD_50_AC3_T;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_HD_60_AC3_T;SONY.COM_PN=AVC_TS_HD_60_AC3_T;DLNA.ORG_FLAGS=8d700000000000000000000000000000 http-get:*:video/x-mp2t-mphl-188:*

04.09.2009 10:30:33 changed by ryu

My Bravia KDL-40W5500 is working well with video streaming and coherence (I have added it to supported devices). For this to work, I have manually transcoded an HD mkv video with ffmpeg to VOB container (default mpeg container just doesn't work) with mpeg2video and mp2. This afternoon I will test with mp3 and ac3 audio also.

06.09.2009 21:58:11 changed by dev

with [1388] we now have some initial video transcoding via a GStreamer pipeline and alternatively an external process.

Transcoders can be defined in the config, if so they will override the internal ones.

Some first bits of documentation on the TransCoding page.

07.09.2009 13:36:13 changed by tiran

With your latest changes in SVN my TV does no longer recognize coherence as a video provider. The coherence share is not listed in the video category. Music und picture provider are still working as before.

I know from experiments that Sony Bravia TVs are anal about the video and audio formats.

(follow-up: ↓ 12 ) 09.09.2009 16:29:18 changed by tiran

Our debugging session on #coherence was a success. My TV is able to play back videos IFF they have the correct format. The gstreamer pipeline we discussed yesterday doesn't work: no video, sound distorted.

I pulled this mencoder pipeline from PS3 media player. It creates a transcoded video format my TV is able to stream and play from coherence.

mencoder -ss 0 -quiet INFILE.avi -quiet -quiet -oac lavc -of mpeg -quiet -quiet -mpegopts format=mpeg2:muxrate=500000:vbuf_size=1194:abuf_size=64 -ovc lavc -channels 6 -lavdopts debug=0:threads=2 -lavcopts autoaspect=1:vcodec=mpeg2video:acodec=ac3:abitrate=256:threads=2:keyint=1:vqscale=1:vqmin=2 -subfont /usr/share/fonts/truetype/msttcorefonts/Arial.ttf -ass-color ffffff00 -ass-border-color 00000000 -ass-font-scale 1.0 -ass-force-style FontName?=Arial,Outline=1,Shadow=1,MarginV=10 -quiet -quiet -subdelay 20000 -quiet -quiet -ofps 24000/1001 -quiet -quiet -mc 0.1 -af lavcresample=48000 -srate 48000 -o OUTFILE.mpg

(in reply to: ↑ 11 ) 09.09.2009 18:11:18 changed by dev

Replying to tiran:

if you put this pipeline into a process <transcoder> section of your config file, with a '%s' for the source file and sending the file to stdout that should work with Coherence too

  <pipeline>/usr/bin/mencoder ... %s ...</pipeline>

The name of the XML elements might change, pls check with the TransCoding page.

24.01.2010 23:29:01 changed by TeleTommy

could you please post the complete <transcoder> section working with your sony?