transcode with mediatomb

coldforged <[email protected]>
Newsgroups gmane.comp.video.transcode.user
Message-ID <[email protected]>
Hello,

I am trying to use transcode with mediatomb to stream unsupported 
formats to my dvd player/network player: a jvc dd-3.
The supported formats on that player are few, but it does play avi 
(divx), asf and wmv from a upnp media server.
I set things up on my freebsd 7.2 box, and it streams the supported 
formats just fine using mediatomb.
Any unsupported format at the moment i transcode with ffmpeg, which 
actually works nice for mp4, mov, flv and so on using a commandline 
looking like this:

ffmpeg -i "$input" -target dvd -y "$output"

$input is the filename handed down by mediatomb, $output is the FIFO 
buffer mediatomb makes.

Now, i am trying to get something together to be able to play a dvd iso 
on the jvc through mediatomomb using transcoding.

I tried different transcoders like ffmpeg, vlc and transcode. Ffmpeg 
can't handle it (as far as i can tell), and on freebsd there's a problem 
with vlc in that the transcoded video does play sound but somehow the 
videostream is missing or not playable (not even if i use it on command 
line and store the feed in a file, which in then in turn try to play 
with vlc on a windows machine using samba to get at the file..).

With transcode, i can, or at least, it will transcode the iso. I 
installed it from the ports, and compiled and installed without any 
errors. I managed to get it transcoding in it's most simplest form to a 
file using:

transcode -i test.iso -x dvd -o test.avi -y xvid

When i open test.avi (using vlc on a windows machine), it has the main 
title on the dvd transcoded and plays just fine.
So I configured mediatomb to send a mimetype video/x-msvideo for any iso 
file it can find. the jvc player thinks this is playable, so it shows it 
on the list.
Next, to get mediatomb to start transcoding, i entered a profile for it 
in config.xml:

    <profile name="video-iso" enabled="yes" type="external">
       <mimetype>video/x-msvideo</mimetype>
       <first-resource>yes</first-resource>
       <hide-original-resource>yes</hide-original-resource>
       <accept-ogg-theora>yes</accept-ogg-theora>
       <agent command="mediatomb-transcode-iso" arguments="%in %out"/>
       <buffer size="1048576" chunk-size="131072" fill-size="262144"/>
     </profile>



Last, i made the shell script mediatomb-transcode-iso :

#!/bin/sh
transcoder="/usr/local/bin/transcode"
input="$1"
output="$2"
exec "$transcoder" -i "$input" -x dvd -o "$output" -y xvid


After that, what i end up with is:
- the jvc player does show the iso, so apparently it thinks it can play 
the given mimetype
- it tries to start to play the 'video file' when i click it
- it takes a couple of seconds, but then reports that it can't play the 
file afterall (no errors given, just a stop sign..)
- on the server side, i do see transcode getting started using ps -ax
- i added > /tmp/transcode.log in the script after the exec of 
transcode, and see it recognizing the dvd, starting things up and 
actually start transcoding
- after a couple of hundred frames (i guess up to the point the fifo 
buffer of mediatomb is filled) it stalls and mediatomb can't kill the 
process.

I tried switching things around a bit but no luck so far:
- mimetype in the profile to video/mpeg, and transcode -y mjpeg
- mimetype in the profile to video/x-msvideo, and transcode -y divx5

What i am thinking at the moment is that maybe the output stream muxing 
isn't correct for the given format (avi or mpeg)..

So i am wondering:
- is what i am trying to do at all possible? (meaning: using transcode 
under mediatomb to transcode things)
- if so, what options do i have to give transcode to make it export 
either a standard avi or mpeg stream which the player recognizes?
- did anybody get this running with mediatomb and if so, what's the 
config for it in config.xml and the script that starts the transcoding?
- also, what happens if a dvd has 2 movietitles on it? For example, i 
have made an iso of my band of brothers dvd's which has 2 episodes on 
every dvd..

Any help on this would be greatly appreciated..
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.