ffmpeg issues?

Linux and UNIX specific discussions
Post Reply
acook90
Posts:4
Joined:Sun Oct 02, 2011 4:31 am
AV Hardware:PS3, Custom Linux Home Server (Ubuntu 11.04).
ffmpeg issues?

Post by acook90 » Sun Oct 02, 2011 5:02 am

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.

acook90
Posts:4
Joined:Sun Oct 02, 2011 4:31 am
AV Hardware:PS3, Custom Linux Home Server (Ubuntu 11.04).

Re: ffmpeg issues?

Post by acook90 » Sun Oct 02, 2011 5:22 am

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,

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: ffmpeg issues?

Post by DaemonBeetle » Sun Oct 02, 2011 9:39 am

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.
No longer running Twonky

acook90
Posts:4
Joined:Sun Oct 02, 2011 4:31 am
AV Hardware:PS3, Custom Linux Home Server (Ubuntu 11.04).

Re: ffmpeg issues?

Post by acook90 » Sun Oct 02, 2011 9:44 am

I'm right now trying some different things with ffmpeg, like specifying an audio format, so I'll report back on what works!

acook90
Posts:4
Joined:Sun Oct 02, 2011 4:31 am
AV Hardware:PS3, Custom Linux Home Server (Ubuntu 11.04).

Re: ffmpeg issues?

Post by acook90 » Sun Oct 02, 2011 1:11 pm

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.

Post Reply