Convert Channels DVR .edl file to VideoRedo .VPrj file

Since I can't upload an excel spreadsheet here, I'll try to explain it.

It's a simple excel spreadsheet.
It converts the contents of a .edl file pasted in cell A2.
To the contents for a .VPrj file in cell D2 and below using excel formulas.
I'm just using it to test the new Smart Commercial Detection accuracy.
If you need to convert lots of edl files, you should probably write a script to do that (maybe sed taking input from edl and outputting to VPrj).

The edl (edit decision list) file created by Channels DVR is a tab delimited text file with time values in seconds.
Each line contains 3 tab separated values.
First value is start of the commercial break.
Second value is end of the commercial break.
Third value, always "3", signifies Commercial Break action and is not used here.

Excel formulas in cells D2 and below do the conversion to the VideoRedo .VPrj format.
The VPrj time stamps are in 1/10,000,000 seconds.

Formula in cell D2

=$E$2

Formula in cell D3

=IF(ISNUMBER($A2),CONCATENATE($E$3,($A2*10000000),$E$4,($B2*10000000),$E$5),IF($A1<>"",$E$6,""))

Formula in cells D4 and below are copied from D3 such that the values $A2, $B2 and $A1 are incremented by 1 per row

Formula in cell D4

=IF(ISNUMBER($A3),CONCATENATE($E$3,($A3*10000000),$E$4,($B3*10000000),$E$5),IF($A2<>"",$E$6,""))

I copied this formula down to cell D101 to accomodate up to 100 commercial breaks

Formula in cell D101

=IF(ISNUMBER($A100),CONCATENATE($E$3,($A100*10000000),$E$4,($B100*10000000),$E$5),IF($A99<>"",$E$6,""))

To use it, open the excel spreadsheet.
Open the Channels DVR generated edl file in notepad or some text editor that preserves tab characters.
Copy the contents of the edl file to the clipboard (I use <CTRL-A> select all, then <CTRL-C> copy).
Highlight cell A2 of the spreadsheet and paste the clipboard contents to it (I use <CTRL-V> paste).

You now have the contents for the VPrj file in cell D2 and below.
Create a new blank file named Apply.VPrj and open it with your text editor.
Copy the spreadsheet cells D2 and below to the clipboard, then paste that into the file Apply.VPrj and save it.

Now you open the recording in VideoRedo, choose menu item Edit>Apply Project File and select your Apply.VPrj file.

You could probably do all this in less time than it took to read.

EXAMPLE

Content of .edl file

0	8.41	3
385.12	505.27000000000004	3
987.59	1107.04	3
1387.3600000000001	1487.92	3
1717.42	1798.93	3

Content of .VPrj file

<VideoReDoProject Version="3"><CutList>
<Cut><CutTimeStart>0</CutTimeStart><CutTimeEnd>84100000</CutTimeEnd></Cut>
<Cut><CutTimeStart>3851200000</CutTimeStart><CutTimeEnd>5052700000</CutTimeEnd></Cut>
<Cut><CutTimeStart>9875900000</CutTimeStart><CutTimeEnd>11070400000</CutTimeEnd></Cut>
<Cut><CutTimeStart>13873600000</CutTimeStart><CutTimeEnd>14879200000</CutTimeEnd></Cut>
<Cut><CutTimeStart>17174200000</CutTimeStart><CutTimeEnd>17989300000</CutTimeEnd></Cut>
</CutList></VideoReDoProject>

Spreadsheet image

And to save you from having to type these in,
copy and paste this in cell A1

PASTE LINES OF START/END TIMECODES FROM .EDL FILE IN CELL A2

copy and paste this in cell D1

THEN COPY XML FROM CELL D2 AND DOWN AND PASTE INTO NEW .VPrj PROJECT FILE

copy and paste this into cell E1 to fill in E1-E6

Cells in E2-E6 are used for building VRD VPrj file contents in Column D
<VideoReDoProject Version="3"><CutList>
<Cut><CutTimeStart>
</CutTimeStart><CutTimeEnd>
</CutTimeEnd></Cut>
</CutList></VideoReDoProject>
1 Like

Thanks for the example.

I'm adding this to the DVR in the next build, via /dvr/files/XXX/commercials.vprj

3 Likes

Thank You!

Must edl be enabled under experimental to get this? Thanks.

No not related to that setting

So it’s automatic as long as commercial detection is on? Thanks

um ok. so how do i use this? how is this enabled? a little more info please. thanks.

Just as you would access any other file: http://X.X.X.X:8089/dvr/files/###/commercials.vprj. Just fill in your DVR's IP address, and replace the hashes with the file ID of the recording you want the commercials for.

You don't enable it; it's part of the latest pre-releases, so you don't have to do anything but access the endpoint.

1 Like

Any reason the VPRJ was not put along side the file and EDL with the correct name ?

1 Like

i see now, thanks. wish it was more intuitive or descriptive. this should be a setting like edl next to the recording.

ive been asking this for YEARS (well, it seems like years to me, maybe less). who knows why, some things just needs to be overly complicated i guess.

1 Like

It may seem like there is no love for the VideoReDo users, but I'm thankful for the support we're given. I scripted the curl.exe -XGET http://dvr ip:8089/dvr/files/id/commercials.vprj output into a file and then had sed delete the first line and then insert a new header line and the filename reference for the second line. The cutlist remains the same.

I didn't want to make this that complicated.
I just double click the VPrj file and VRD asks me to pick the recording file.

It would be great if Channels DVR could create the project file in the same directory as the recording.
Would have to replace the current header line with these lines to cover UTF-8 formatted filenames.
And then could use relative path (./ = this directory) for <Filename>.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<VideoReDoProject Version="3">
<Filename>./NOVA S44E15 2017-10-18 Secrets of the Forbidden City 2021-12-29-2100.mpg</Filename><CutList>

That way you just double click the project file and it opens the recording.

1 Like

I just do not understand why they chose to name and put the VPrj where they did .... I have been using comskip and created VPrj projects which is an option ... and edl file for years and the VPrj has always been alongside the file.

The way it is now you have to look up the file ID and then look for the VPrj file which is just adding unnecessary confusion.

1 Like

That's because those files are generated by comskip. All files it outputs go in Logs/comskip/FileID# folder.
They created the Experimental option to copy the .edl file next to the recording. We just need the same for the .VPrj files!

2 Likes

I don't use videoredo. I had no idea what a vprj file was until @chdvruser described it above.

If the vprj file is named the same as the video file, does it still need to contain <Filename> inside?

Yes, otherwise VRD opens and asks what file you want to load.

So the ones that comskip generates have a <Filename>? What does that look like?

<VideoReDoProject Version="3">
<Filename>/volume1/ChDVRsp/TV/NOVA/NOVA S44E15 2017-10-18 Secrets of the Forbidden City 2021-12-29-2100.mpg</Filename><CutList>
<InputPIDList><VideoStreamPID>6255</VideoStreamPID>
<AudioStreamPID>6256</AudioStreamPID><SubtitlePID1>0</SubtitlePID1></InputPIDList>
<Cut><CutTimeStart>0</CutTimeStart> <CutTimeEnd>154988140</CutTimeEnd> </Cut>
<Cut><CutTimeStart>33206423193</CutTimeStart> <CutTimeEnd>35989870526</CutTimeEnd> </Cut>
</CutList>
<SceneList>
<SceneMarker Sequence="0" Timecode="0:00:10.57">105772304</SceneMarker>
<SceneMarker Sequence="1" Timecode="0:00:15.49">154988140</SceneMarker>
<SceneMarker Sequence="2" Timecode="0:52:55.03">31750301860</SceneMarker>
<SceneMarker Sequence="3" Timecode="0:55:20.62">33206256363</SceneMarker>
<SceneMarker Sequence="4" Timecode="0:55:56.52">33565281696</SceneMarker>
<SceneMarker Sequence="5" Timecode="0:56:26.59">33865915363</SceneMarker>
<SceneMarker Sequence="6" Timecode="0:56:56.58">34165881696</SceneMarker>
<SceneMarker Sequence="7" Timecode="0:56:59.70">34197079526</SceneMarker>
<SceneMarker Sequence="8" Timecode="0:58:11.64">34916464860</SceneMarker>
<SceneMarker Sequence="9" Timecode="0:59:10.63">35506387526</SceneMarker>
<SceneMarker Sequence="10" Timecode="0:59:40.61">35806187029</SceneMarker>
<SceneMarker Sequence="11" Timecode="0:59:58.98">35989870526</SceneMarker>
</SceneList>
</VideoReDoProject>
1 Like

Chdvruser beat me to it ...