You are here

Converting DV videos on the DS211J for a Samsung TV

We use a Synology DS211J to store family's videos. Our Samsung LED TV is connected to the home LAN as well. But there is a slight problem that prevents us from watching most of our videos on the Samsung TV: most of those videos are in DV format. And this format is not handled by the TV...

The only solution is to convert videos to one of the supported formats. Quite simple, using ffmpeg on our PC. But this would imply lot of traffic over the LAN... I prefer trying to convert the videos running ffmpeg on the DS211J itself.

This article will describe the various steps I'll follow to reach this target.

I start with exactly the kind of article I was looking for: Overview on modifying the Synology Server, bootstrap, ipkg etc, available on Synology wiki.

Hardware

First step: identifying the CPU used by the DS211J. According to this page, it is a Marvell Kirkwood mv6281, 1.2Ghz ARM Processor, with 128MB of RAM 16-bit DDR2.

Installing ipkg

Second step: install ipkg for this CPU. The installation uses a script which, in our case, is http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/syno-mvkw-bootstrap_1.2-7_arm.xsh.

As explained here, the script is copied to the DS211J, then run. That's it!

Installing ffmpeg

Really easy, now that ipkg is installed: ipkg install ffmpeg.

And that's done: I can now use ffmpeg on the DS211J. Another proof of open systems superiority over closed systems Smile

Converting videos

Latest step: conversion of DV videos. Here is the script I wrote for this purpose:

#!/bin/sh
#
# Must be used with following find command:
#   find <directory> -type f -iname "*.dv" -exec <thisScript> '{}' \;
#
# Runs OK with file name using spaces.
# Supports large number of files, thanks to -exec: find does not
# builds an intermediate string containing all file names.
#
echo "=================================================================="
echo "file: "$1
#
# Get file name without dv suffix
#
fnwdv=$1
fnwodv=${fnwdv%.dv}
#
# Add avi suffix
#
fnwavi=${fnwodv}.avi
#
# Apply ffmpeg command
#
ffmpeg -i "$fnwdv" -target dvd "$fnwavi"

It must be run from the find command, as follows:

find <topDirectoryOfVideoFiles> -type f -iname "*.dv" -exec <thisScript> '{}' \;

It took a little bit less than 9 days to convert about 400 GB of DV files...