Page 1 of 1

ffmpeg issues?

Posted: Sun Oct 02, 2011 5:02 am
by acook90
Hey guys,

I've just got the latest version of twonky running on a Ubuntu 11.04 headless server and everything seems to work fine except for I constantly have ffmpeg running at a crazy 400%, even after the database has been rebuilt and no files have been requested! Any one else have this issue?

Also, MKV transcoding works on all files except some have no audio, I couldn't find a solution to this anywhere!

Thanks in advance for any help.

Re: ffmpeg issues?

Posted: Sun Oct 02, 2011 5:22 am
by acook90
Doing a little bit more investigating, it could be the that ffmpeg is transcoding videos to cache? If this is the case, how often does it have to this, like each server restart or just the once for each file that needs it?

Thanks again,

Re: ffmpeg issues?

Posted: Sun Oct 02, 2011 9:39 am
by DaemonBeetle
I believe it is once per file (though I don't use transcoding in Twonky

The lack of audio suggests that the underlying MKV file doesn't have an audio track that is supported by ffmpeg. The mkvinfo command can be used to find out what the audio track is.

Re: ffmpeg issues?

Posted: Sun Oct 02, 2011 9:44 am
by acook90
I'm right now trying some different things with ffmpeg, like specifying an audio format, so I'll report back on what works!

Re: ffmpeg issues?

Posted: Sun Oct 02, 2011 1:11 pm
by acook90
Alright so I got it all working, all MKV's now play with sound! I changed it so when they transcode, they change the audio codec to something PS3 friendly. I know it's probably over kill to change the audio codec for all MKV's but at least they all now work as expected!... I also added to the command to include any subtitle files if they exist. Here is my new exec command:

exec: ffmpeg -threads 2 -i $infile -vcodec mpeg2video -sameq -scodec copy -acodec ac3 -ab 384k -f vob -copyts -y $outfile

-scodec copy option allows it to copy across subtitles included in the MKV. -acodec ac3 -ab 384k is changing the audio codec and bit-rate, i found AC3 worked best and that bit-rate I just randomly selected, it can be increased/decreased as required.

I hope this helps somebody else out!

* Also I changed it to be an asynchronous transcode. I just found this to worked better.