UPDATE 02/13/07
Updated software With attached file "avc_hdtv_record_source.zip"
changes include. No need to find your source device node or channel number, using plugreport. Edited dvcont to send "record" and "stop" commands to avc_hdtv_record, it is now possible to schedule a recording using a script to run dvcont. avc_hdtv_record saves the recorded stream to file named with the date you started the recording. as in Feb_12_2007_09_30_16.
Record and playback via IEEE 1394 (a.k.a. Firewire) with linux .
My system a SAMSUNG DLP HLRxx68w and a 5 year old PC.
This should work under any HDTV or settop cable box with an 1394 interface.
Runs under linux Kernel 2.6.16-1.2133,. Setup was is a snap, if I can do it you can too. just follow the Step by step section below.
Runs under command line terminal.
You will need to know a little about linux commands, but it is not rocket science.
I have been able to record and playback local HD broadcasts with an antenna as the source will excellent sound and picture. Record and playback is hit and miss via cablecard, sound and picture are out of sync. I think I know what the problem is but haven't nailed the root cause, yet. Although I can playback with VLC with no sync problems.
I use the Redhat Linux distribution FC5, will kernel version stated above. FC5 can be found at fedora.redhat.com/docs/fedora-install-guide-en/fc5/ The Libraries can be downloaded and installed via yum (as in "yum install libiec61883"), source files can be found at linux1394.org and or Google it.
You can Record and playback (playback with VLC) 5C protected Digital content, at least up to copy once level, I haven't seen a copy never level of 5C yet.
Also have not tried recording a SD source. But who would want too?
I can't take any credit for getting this to work all I did was edit (cough hack) the avc_vcr.c source found it libavc1394 and hacked through the example source files found in libraw1394, libavc1394, and libiec6183 . Thanks goes to Dan Dennedy and linux1394 crew. Thanks Dan!
Minimum PC hardware:
Pentium II 650 MHz
394 Mb ram
IDE ATA-33
ATA-33 Hard Drive greater that 20G
PCI IEEE1394 card
note: I have a Penguin Gear PG-FW-310 Nec chip and 3 External ports.
Specs found at www.byteccusa.com/product/PCI/PG-FW-310.htm
\tCost $15.00 that with a 1394 cable.
\tsee linux1394.org for other Compatible 1394 cards.
Minimum OS:
Redhat FC5 (http://fedora.redhat.com)
Kernel = 2.6.16-1.2133_FC5 (updated via software updater.)
a root password
and user account
Libraries Requirements :
Use yum to install as in "yum install libraw1394-devel"
libraw1394 ver 1.2.1
libraw1394-devel ver 1.2.1
libiec61883 ver 1.0.0.0
libiec61883-utils
libavc1394 ver 0.5.3
libavc1394-devel
Source code Requirements :
found at linux1394.org and or sourceforge.net
tar files
libiec61883-1.0.0
libavc1394-0.5.3
Hacked Source code:
avc_vcr_hdtv.c
mpg1394grab.c
test-mpeg2.c
Setup Install:
1.Install FC5
update kernel to 2.6.16-1.2133
via package updater
2. Download Source code Requirements files and configure and build but do not install.
Make a directory under your user account call it ieee_project.
mkdir /home/(your user accont)/ieee_project
Copy all Source code Requirements files to this directory.
Extract using desktop folder thingy.
Open a terminal window
login as root on terminal window
su
then password
3 Change directory to /home/(user account)/ieee_project/ libiec61883-1.0.0
"cd /home/(user account)/ieee_project/ libiec61883-1.0.0"
configure make files
"./configure"
build code
"make"
4. Change directory to cd /home/(user account)/ieee_project/ libiec61883-1.0.0/examples
"cd /home/(user account)/ieee_project/ libiec61883-1.0.0/examples"
Copy mpg1394grab.c into this directory.
cp mpg1393grab.c /home/(user account)/ieee_project/ libiec61883-1.0.0/examples/
Build mpg1394grab.c
gcc -lraw1394 /usr/lib/libiec61883.so.0 -o mpg1394grab mpg1394grab.c -D_FILE_OFFSET_BITS=64
Copy test-mpeg2.c into this directory.
cp test-mpeg2.c /home/(user account)/ieee_project/ libiec61883-1.0.0/examples/
answer yes to overwrite
To build test-mpeg2.c remove test-mpeg2.o
"rm /home/(user account)/ieee_project/ libiec61883-1.0.0/examples/ test-mpeg2.o
then
"make"
5 Change directory to /home/(user account)/ieee_project/ libavc13940-0.5.3
"cd /home/(user account)/ieee_project/ libavc13940-0.5.3"
"./configure"
"make"
\tChange directory to /home/(user account)/ieee_project/ libavc13940-0.5.3
"cd /home/(user account)/ieee_project/ libavc13940-0.5.3/test"
Copy avc_vcr_hdtv.c into this directory.
"cp avc_vcr_hdtv.c /home/(user account)/ieee_project/ libavc13940-0.5.3/test/"
Copy build_avc_vcr_hdtv.sh into this directory.
"cp build_avc_vcr_hdtv.sh /home/(user account)/ieee_project/ libavc13940-0.5.3/test/"
Build avc_vcr_hdtv.c
Run the scrpt file
"sh build_avc_vcr_hdtv.sh"
output = "creating avc_vcr_hdtv"
Configure 1394 card:
1 Run setrom
"./setrom"
\tThis utility configures the csr rom of the 1394 card so it appears as an avc device.
\t
2. Run avc_vcr_hdtv
"./avc_vcr_hdtv"
output = Starting AV/C target; press Ctrl+C to quit...
3 Connect ieee1394 cable between ieee1394 cards first port and the HDTV.
4. Open a terminal window
Change to the directory of source code libavc1394-0.5.3/test
cd /home/(user account)/ieee_project/ libavc13940-0.5.3/test "
5. Run romtest
"./romtest"
output similar to
Librom1394 Test Report
=================================================
Node 0:
-------------------------------------------------
bus info block length = 4
bus id = 0x31333934
bus options:
isochronous resource manager capable: 1
cycle master capable : 1
isochronous capable : 1
bus manager capable : 0
cycle master clock accuracy : 100 ppm
maximum asynchronous record size : 2048 bytes
GUID: 0x00004c0100003f1f
directory:
node capabilities : 0x000083c0
vendor id : 0x0000004c
unit spec id : 0x0000a02d
unit software version: 0x00010001
model id : 0x00ae1f08
textual leaves : Kino Rocks!
Node 1:
-------------------------------------------------
bus info block length = 4
bus id = 0x31333934
bus options:
isochronous resource manager capable: 1
cycle master capable : 1
isochronous capable : 1
bus manager capable : 1
cycle master clock accuracy : 100 ppm
maximum asynchronous record size : 2048 bytes
GUID: 0x0000f01000013ad4
directory:
node capabilities : 0x000083c0
vendor id : 0x000000f0
unit spec id : 0x00000989
unit software version: 0x00000100
model id : 0x00010001
textual leaves : SAMSUNG HL-R5067W VL_LIN_Apr282005 16:19:58
Note the node number of the HDTV, node 1 in this example
The node number may change every time you the reset (power down, and or disconnect the cable) on a 1394 device.
6. Run plugreport
plugreport
output similar to
Host Adapter 0
==============
Node 0 GUID 0x00004c0100003f1f
------------------------------
oMPR n_plugs=1, data_rate=0, bcast_channel=0
oPCR[0] online=1, bcast_connection=0, n_p2p_connections=0
channel=1, data_rate=2, overhead_id=15, payload=146
iMPR n_plugs=1, data_rate=0
iPCR[0] online=1, bcast_connection=0, n_p2p_connections=0
channel=0
Node 1 GUID 0x0000f01000013ad4
------------------------------
oMPR n_plugs=1, data_rate=2, bcast_channel=0
oPCR[0] online=1, bcast_connection=0, n_p2p_connections=0
channel=0, data_rate=0, overhead_id=0, payload=146
iMPR n_plugs=1, data_rate=2
iPCR[0] online=1, bcast_connection=0, n_p2p_connections=0
channel=1
Note the channel number of the HDTV node 1 iPCR[0] plug, channel=1 in this example.
Recording:
1. Tune to a local HD channel with an antenna as the source.
2. Run avc_vcr_hdtv in a terminal window if not already
3. Open a terminal window
4.. cd to libiec61883-1.0.0/examples/
cd /home/(user account)/ieee_project/ libiec61883-1.0.0/examples/
3. run mpg1394grab
./mpg1394grab n (node of HDTV) > (a file name)
Record for at least five minutes.
Quit mpg1394grab
Ctrl + c
4. List files and check length
ls l
the file length should be greater than zero
To Playback:
1.\tsetup HDTV to select the PC ieee1394 device (Kino Rocks) for playback.
2.\tRun avc_vcr_hdtv in a terminal window if not already.
3.Run test-mpeg2
./test-mpeg2 -t (node of HDTV) c (Channel number (iPCR[0]) of the destination device) (file name)
Notes:
If file length is zero:
1. Try another port on pc 1394 card
2. Run plugreport while recording note the n_p2p_connections
On source ( oPCR[0] ) and destinsion (iPCR[0] ) plugs should = 1.
3.If file length is greater than zero but file cannot be played back via VLC or HDTV. Get a hex editor or viewer installed and have a look at the file. The first offset should equal 0x47XXXXXX (X is dont care) if it is not then the source device is encrypting the stream, you then may want to remove power on all devices, and try again. Else?
You can try to record with test-mpeg2
./test-mpeg2 r (node of source) > (file name)
I have found this is not as reliable as mpg1394grab. Check it out as it might work on your system.
You should have only two devices on the 1394, as the code may cough if it sees more than two devices.
Enjoy!
10/20/06 EDIT
1. Corrected wrong file name avc_hdtv to avc_vcr_hdtv
2. Added a script file to build avc_vcr_hdtv.c build_avc_vcr_hdtv.sh
3. Corrected typos
11/02/06
1. Corrected typos in file bulid_avc_vcr_hdtv.sh
2. Corrected build of test-mpeg2.c
02/12/07
1. Added avc_hdtv_record_source.zip to file list.
2. avc_hdtv_record finds the node and channel of the source device no need to run plugreport. Also saves the ts stream file named with the date you started to record. How to included in zip. edited dvcont to send "record" and "stop" commands to avc_hdtv_record. It is now possible to schedule a recording using a script to run dvcont.
Updated software With attached file "avc_hdtv_record_source.zip"
changes include. No need to find your source device node or channel number, using plugreport. Edited dvcont to send "record" and "stop" commands to avc_hdtv_record, it is now possible to schedule a recording using a script to run dvcont. avc_hdtv_record saves the recorded stream to file named with the date you started the recording. as in Feb_12_2007_09_30_16.
Record and playback via IEEE 1394 (a.k.a. Firewire) with linux .
My system a SAMSUNG DLP HLRxx68w and a 5 year old PC.
This should work under any HDTV or settop cable box with an 1394 interface.
Runs under linux Kernel 2.6.16-1.2133,. Setup was is a snap, if I can do it you can too. just follow the Step by step section below.
Runs under command line terminal.
You will need to know a little about linux commands, but it is not rocket science.
I have been able to record and playback local HD broadcasts with an antenna as the source will excellent sound and picture. Record and playback is hit and miss via cablecard, sound and picture are out of sync. I think I know what the problem is but haven't nailed the root cause, yet. Although I can playback with VLC with no sync problems.
I use the Redhat Linux distribution FC5, will kernel version stated above. FC5 can be found at fedora.redhat.com/docs/fedora-install-guide-en/fc5/ The Libraries can be downloaded and installed via yum (as in "yum install libiec61883"), source files can be found at linux1394.org and or Google it.
You can Record and playback (playback with VLC) 5C protected Digital content, at least up to copy once level, I haven't seen a copy never level of 5C yet.
Also have not tried recording a SD source. But who would want too?
I can't take any credit for getting this to work all I did was edit (cough hack) the avc_vcr.c source found it libavc1394 and hacked through the example source files found in libraw1394, libavc1394, and libiec6183 . Thanks goes to Dan Dennedy and linux1394 crew. Thanks Dan!
Minimum PC hardware:
Pentium II 650 MHz
394 Mb ram
IDE ATA-33
ATA-33 Hard Drive greater that 20G
PCI IEEE1394 card
note: I have a Penguin Gear PG-FW-310 Nec chip and 3 External ports.
Specs found at www.byteccusa.com/product/PCI/PG-FW-310.htm
\tCost $15.00 that with a 1394 cable.
\tsee linux1394.org for other Compatible 1394 cards.
Minimum OS:
Redhat FC5 (http://fedora.redhat.com)
Kernel = 2.6.16-1.2133_FC5 (updated via software updater.)
a root password
and user account
Libraries Requirements :
Use yum to install as in "yum install libraw1394-devel"
libraw1394 ver 1.2.1
libraw1394-devel ver 1.2.1
libiec61883 ver 1.0.0.0
libiec61883-utils
libavc1394 ver 0.5.3
libavc1394-devel
Source code Requirements :
found at linux1394.org and or sourceforge.net
tar files
libiec61883-1.0.0
libavc1394-0.5.3
Hacked Source code:
avc_vcr_hdtv.c
mpg1394grab.c
test-mpeg2.c
Setup Install:
1.Install FC5
update kernel to 2.6.16-1.2133
via package updater
2. Download Source code Requirements files and configure and build but do not install.
Make a directory under your user account call it ieee_project.
mkdir /home/(your user accont)/ieee_project
Copy all Source code Requirements files to this directory.
Extract using desktop folder thingy.
Open a terminal window
login as root on terminal window
su
then password
3 Change directory to /home/(user account)/ieee_project/ libiec61883-1.0.0
"cd /home/(user account)/ieee_project/ libiec61883-1.0.0"
configure make files
"./configure"
build code
"make"
4. Change directory to cd /home/(user account)/ieee_project/ libiec61883-1.0.0/examples
"cd /home/(user account)/ieee_project/ libiec61883-1.0.0/examples"
Copy mpg1394grab.c into this directory.
cp mpg1393grab.c /home/(user account)/ieee_project/ libiec61883-1.0.0/examples/
Build mpg1394grab.c
gcc -lraw1394 /usr/lib/libiec61883.so.0 -o mpg1394grab mpg1394grab.c -D_FILE_OFFSET_BITS=64
Copy test-mpeg2.c into this directory.
cp test-mpeg2.c /home/(user account)/ieee_project/ libiec61883-1.0.0/examples/
answer yes to overwrite
To build test-mpeg2.c remove test-mpeg2.o
"rm /home/(user account)/ieee_project/ libiec61883-1.0.0/examples/ test-mpeg2.o
then
"make"
5 Change directory to /home/(user account)/ieee_project/ libavc13940-0.5.3
"cd /home/(user account)/ieee_project/ libavc13940-0.5.3"
"./configure"
"make"
\tChange directory to /home/(user account)/ieee_project/ libavc13940-0.5.3
"cd /home/(user account)/ieee_project/ libavc13940-0.5.3/test"
Copy avc_vcr_hdtv.c into this directory.
"cp avc_vcr_hdtv.c /home/(user account)/ieee_project/ libavc13940-0.5.3/test/"
Copy build_avc_vcr_hdtv.sh into this directory.
"cp build_avc_vcr_hdtv.sh /home/(user account)/ieee_project/ libavc13940-0.5.3/test/"
Build avc_vcr_hdtv.c
Run the scrpt file
"sh build_avc_vcr_hdtv.sh"
output = "creating avc_vcr_hdtv"
Configure 1394 card:
1 Run setrom
"./setrom"
\tThis utility configures the csr rom of the 1394 card so it appears as an avc device.
\t
2. Run avc_vcr_hdtv
"./avc_vcr_hdtv"
output = Starting AV/C target; press Ctrl+C to quit...
3 Connect ieee1394 cable between ieee1394 cards first port and the HDTV.
4. Open a terminal window
Change to the directory of source code libavc1394-0.5.3/test
cd /home/(user account)/ieee_project/ libavc13940-0.5.3/test "
5. Run romtest
"./romtest"
output similar to
Librom1394 Test Report
=================================================
Node 0:
-------------------------------------------------
bus info block length = 4
bus id = 0x31333934
bus options:
isochronous resource manager capable: 1
cycle master capable : 1
isochronous capable : 1
bus manager capable : 0
cycle master clock accuracy : 100 ppm
maximum asynchronous record size : 2048 bytes
GUID: 0x00004c0100003f1f
directory:
node capabilities : 0x000083c0
vendor id : 0x0000004c
unit spec id : 0x0000a02d
unit software version: 0x00010001
model id : 0x00ae1f08
textual leaves : Kino Rocks!
Node 1:
-------------------------------------------------
bus info block length = 4
bus id = 0x31333934
bus options:
isochronous resource manager capable: 1
cycle master capable : 1
isochronous capable : 1
bus manager capable : 1
cycle master clock accuracy : 100 ppm
maximum asynchronous record size : 2048 bytes
GUID: 0x0000f01000013ad4
directory:
node capabilities : 0x000083c0
vendor id : 0x000000f0
unit spec id : 0x00000989
unit software version: 0x00000100
model id : 0x00010001
textual leaves : SAMSUNG HL-R5067W VL_LIN_Apr282005 16:19:58
Note the node number of the HDTV, node 1 in this example
The node number may change every time you the reset (power down, and or disconnect the cable) on a 1394 device.
6. Run plugreport
plugreport
output similar to
Host Adapter 0
==============
Node 0 GUID 0x00004c0100003f1f
------------------------------
oMPR n_plugs=1, data_rate=0, bcast_channel=0
oPCR[0] online=1, bcast_connection=0, n_p2p_connections=0
channel=1, data_rate=2, overhead_id=15, payload=146
iMPR n_plugs=1, data_rate=0
iPCR[0] online=1, bcast_connection=0, n_p2p_connections=0
channel=0
Node 1 GUID 0x0000f01000013ad4
------------------------------
oMPR n_plugs=1, data_rate=2, bcast_channel=0
oPCR[0] online=1, bcast_connection=0, n_p2p_connections=0
channel=0, data_rate=0, overhead_id=0, payload=146
iMPR n_plugs=1, data_rate=2
iPCR[0] online=1, bcast_connection=0, n_p2p_connections=0
channel=1
Note the channel number of the HDTV node 1 iPCR[0] plug, channel=1 in this example.
Recording:
1. Tune to a local HD channel with an antenna as the source.
2. Run avc_vcr_hdtv in a terminal window if not already
3. Open a terminal window
4.. cd to libiec61883-1.0.0/examples/
cd /home/(user account)/ieee_project/ libiec61883-1.0.0/examples/
3. run mpg1394grab
./mpg1394grab n (node of HDTV) > (a file name)
Record for at least five minutes.
Quit mpg1394grab
Ctrl + c
4. List files and check length
ls l
the file length should be greater than zero
To Playback:
1.\tsetup HDTV to select the PC ieee1394 device (Kino Rocks) for playback.
2.\tRun avc_vcr_hdtv in a terminal window if not already.
3.Run test-mpeg2
./test-mpeg2 -t (node of HDTV) c (Channel number (iPCR[0]) of the destination device) (file name)
Notes:
If file length is zero:
1. Try another port on pc 1394 card
2. Run plugreport while recording note the n_p2p_connections
On source ( oPCR[0] ) and destinsion (iPCR[0] ) plugs should = 1.
3.If file length is greater than zero but file cannot be played back via VLC or HDTV. Get a hex editor or viewer installed and have a look at the file. The first offset should equal 0x47XXXXXX (X is dont care) if it is not then the source device is encrypting the stream, you then may want to remove power on all devices, and try again. Else?
You can try to record with test-mpeg2
./test-mpeg2 r (node of source) > (file name)
I have found this is not as reliable as mpg1394grab. Check it out as it might work on your system.
You should have only two devices on the 1394, as the code may cough if it sees more than two devices.
Enjoy!
10/20/06 EDIT
1. Corrected wrong file name avc_hdtv to avc_vcr_hdtv
2. Added a script file to build avc_vcr_hdtv.c build_avc_vcr_hdtv.sh
3. Corrected typos
11/02/06
1. Corrected typos in file bulid_avc_vcr_hdtv.sh
2. Corrected build of test-mpeg2.c
02/12/07
1. Added avc_hdtv_record_source.zip to file list.
2. avc_hdtv_record finds the node and channel of the source device no need to run plugreport. Also saves the ts stream file named with the date you started to record. How to included in zip. edited dvcont to send "record" and "stop" commands to avc_hdtv_record. It is now possible to schedule a recording using a script to run dvcont.
avc_source.zip 8.197265625k . file
build_avc_vcr_hdtv.zip 0.3623046875k . file
avc_hdtv_record_source.zip 13.033203125k . file
















