This project has moved and is read-only. For the latest updates, please go here.

hdhomerun dvr

Oct 7, 2015 at 12:47 AM
I am having problems with mcebuddy and hdhomerun dvr. My processed recordings do not show up in the hdhomerun kodi app.

I am using the following profile


[mpg Unprocessed]
Description=Very fast but limited functionality. Use this to convert to mpg format while taking out commercials and keeping original video/audio quality. It does not remove black bars, resize the video, deinterlace or select audio language. The original video can be in any format, MPEG1, MPEG2 or MPEG4/H.264, it will be retained unaltered.
order=copy,ffmpeg
copy-ext=.mpg
copy-audiodelay=skip
ffmpeg-general=-threads 0
ffmpeg-video=-vcodec copy -f mpegts -map 0:v -sn
ffmpeg-audio=-acodec copy -map 0:a
ffmpeg-audioac3=-acodec copy -map 0:a
ffmpeg-ext=.mpg
ffmpeg-audiodelay=skip
FixedResolution=true
SkipCropping=true
PreConversionCommercialRemover=true
AutoDeinterlace=false

any help is appreciated. thanks.
Oct 8, 2015 at 7:08 PM
any advice is welcome thanks and yes I am using the latest 2.4.3 beta
Oct 8, 2015 at 10:34 PM
Need some time to look into this. Meanwhile you may want to try some combinations. Match the original file name.
Are you seeing a pattern here of some that work and some that don't?

Has Nick SDHR responded why this could be happening? The metadata has been appended.

Oct 8, 2015 at 11:27 PM
I tried the profile above to do a test cutting commercials but it appears to be stuck writing the show information.

2015-10-08T15:11:58 MCEBuddy.Engine.ConversionJob --> Finished conversion, file size [KB] 1,754,110.00
INFORMATION> 2015-10-08T15:11:58 MCEBuddy.Engine.ConversionJob --> Checking if commercials were found
INFORMATION> 2015-10-08T15:11:58 MCEBuddy.Engine.ConversionJob --> Commercials not found or cutting already completed
INFORMATION> 2015-10-08T15:11:58 MCEBuddy.Engine.ConversionJob --> Writing show information
--> Starting to write payload to TS stream
Oct 8, 2015 at 11:59 PM
Yes that takes time depending upon converted file size. (with MCEBuddy you should always give time since we are taking BIG file usually).

There are two strategies to reinsert the metadata header:
1. Create a new file with just the header and then join the metadata header file + converted file into a new file. This creates an additional file so you need extra space for it
2. We've come up with a creative way, we take the converted file and move the EOF pointer right by X bytes (based on the metadata header size), then we shift ALL the date right by X bytes to make space for the metadata header, finally we write the metadata header at the beginning of the file). This is an optimized approach since we don't need extra space for a new file.

Processing time is the same for both since the files have be copied/moved in both cases

Oct 9, 2015 at 1:52 AM
I have tried it with the original file name. I have not asked nick. If it makes any difference I am running hdhomerun dvr on a synology nas. There is no pattern, they all don't work. thanks
Oct 9, 2015 at 1:52 AM
Edited Oct 9, 2015 at 2:01 AM
Has this even been tested it has been over 1/2 hour on a 1/2 hour show and it still is writing the show information. Do you have a test file then try cutting the commercials and write the metadata hard to believe this works when it is over a 1/2 hour writing show information and nothing has happened.

It finally ended the file created is unplayable with VLC media player etc...

--> <10/08/2015 17:19:39> <00:33:44> <Writing show information>
Oct 9, 2015 at 2:02 AM
nyplayer: It is much faster than .5 hour for me but still slow. No this profile has not been tested it is still a work in progress. The first 15 to 30 seconds are almost un-watchable when played in wmp and the hdhomerun view client does not recognize them. At least on my system
Oct 9, 2015 at 2:22 AM
I am going to try changing this.

order=copy,ffmpeg
to
order=ffmpeg,copy
Oct 9, 2015 at 2:40 AM
I tried that already. according to ffmpeg -i my recordings are in the mpeg2video format not mpegts. I am testing this now please stand by
Oct 9, 2015 at 2:47 AM
still wont play. I know I had it playing before. I am testing with my latest ffmpeg nvenc build
Oct 9, 2015 at 2:57 AM
mpeg2video is MPEG-2 video format. MPEGTS is a container format (like MP4, AVI, MKV etc).

When you setup your ffmpeg profile, if the extension of the output file is .TS it will automatically put the video into the TS format.

Don't confuse container with video format. TS container supports a ton of video format including mpeg-1, mpeg-2, mpeg4 simple, mpeg-avc/h.264, vc-1 etc.

Oct 9, 2015 at 3:00 AM
sorry line got all re arranged trying again
Oct 9, 2015 at 3:00 AM
SDHR has a MPEG-2 video in a MPEG TS continer and calls the extension .mpg
So you should use the TS Unprocessed profile and add a line to *rename* the extension to .mpg (see documentation).
However you can try the copy and ffmpeg encoders and see which one works better.

You can also try the TS MPEG2 profile (recoding) and add a line to rename the extension to .mpg and see if that works.

Oct 9, 2015 at 3:05 AM
Edited Oct 9, 2015 at 3:07 AM
The cut file without commercials plays fine in the working folder prior to writing the show metadata .... once the metadata is written to the file it corrupts the file and becomes unplayable. So the problem is that writing the metadata to the new file corrupts it.

VLC tool bar shows no Video or Audio tracks when I try to play the final file.
Oct 9, 2015 at 3:06 AM
Something is funny, when I ran ffmpeg -i on one of my recordings it showed mpeg2video. Do you show the same thing?
Oct 9, 2015 at 3:14 AM
I am uploading my test recording now
Oct 9, 2015 at 3:37 AM
I uploaded it please let me know if it is incomplete I had to reboot
Oct 9, 2015 at 3:59 AM
you were right i ran it through media info and it said mpeg-ts sorry
Oct 9, 2015 at 4:57 AM
I am now using the profile below and it still does not show up. nyplayer: try turning on remuxing

[mpg Unprocessed]
Description=Very fast but limited functionality. Use this to convert to mpg format while taking out commercials and keeping original video/audio quality. It does not remove black bars, resize the video, deinterlace or select audio language. The original video can be in any format, MPEG1, MPEG2 or MPEG4/H.264, it will be retained unaltered.
order=ffmpeg,copy
copy-ext=.ts
copy-audiodelay=skip
ffmpeg-general=-threads 0
ffmpeg-video=-vcodec copy -f mpegts -map 0:v -sn
ffmpeg-audio=-acodec copy -map 0:a
ffmpeg-audioac3=-acodec copy -map 0:a
ffmpeg-ext=.ts
ffmpeg-audiodelay=skip
FixedResolution=true
SkipCropping=true
PreConversionCommercialRemover=true
AutoDeinterlace=false
RenameExt=.mpg
Oct 9, 2015 at 5:45 AM
I gave up on it I believe it is not writing the metadata correctly. I will just keep doing just the rename with no copying or re-muxing that works because it does not have to write the metadata.
Oct 9, 2015 at 12:10 PM
@Nyplayer what playback software are you using?

Oct 9, 2015 at 1:08 PM
I tried VLC the hd homerun software wmplayer everything I could throw at it.
Oct 9, 2015 at 1:14 PM
Try one more thing, trying to isolate the issue. Convert the file with Write Metadata turned off.

Now use the DD method to extract the metadata from the original file and *cat* it (join) to the converted file.

See if that plays on VLC and HDHR

Oct 9, 2015 at 1:15 PM
This is weird because with the test file we were able play all the converted file with metadata back with WMPlayer. Let me know how the DD thing goes.

Oct 9, 2015 at 3:18 PM
What profile you want me to use???
Oct 9, 2015 at 4:08 PM
Edited Oct 9, 2015 at 4:10 PM
I just tried the dd method with cygwin and It worked. The video played back in vlc and wmp (first few seconds in wmp were very jerkey) (took a while to load in vlc) but more importantly it was recognized and played immediately in the hdhomerun kodi app. nyplayer: I am using the profile below.

[mpg Unprocessed]
Description=Very fast but limited functionality. Use this to convert to mpg format while taking out commercials and keeping original video/audio quality. It does not remove black bars, resize the video, deinterlace or select audio language. The original video can be in any format, MPEG1, MPEG2 or MPEG4/H.264, it will be retained unaltered.
order=copy,ffmpeg
copy-ext=.ts
copy-audiodelay=skip
ffmpeg-general=-threads 0
ffmpeg-video=-vcodec copy -f mpegts -map 0:v -sn
ffmpeg-audio=-acodec copy -map 0:a
ffmpeg-audioac3=-acodec copy -map 0:a
ffmpeg-ext=.ts
ffmpeg-audiodelay=skip
FixedResolution=true
SkipCropping=true
PreConversionCommercialRemover=true
AutoDeinterlace=false
RenameExt=.mpg

leave remuxing enabled and uncheck everything in the metadata area
Oct 9, 2015 at 5:22 PM
Maybe I am late to the party but how does someone use the DD method is it just a matter of unchecking write info to file?
Oct 9, 2015 at 5:48 PM
nyplayer: here are the instructions.
  1. download and install cygwin.
    2 run mcebuddy with remuxing on and every option under metadata on the advanced page unchecked using the above profile.
    3.open cygwin and cd to the folder where your recordings are. cd /cygdrive/C/path/to/recordings (assuming your recordings are on the c: drive)
  2. run the following commands substituting in your recording names.:
dd if=original-recording.mpg of=metadata.mpg bs=12032 count=1
cat metadata.mpg processed-recording.mpg > final.mpg

I hope that helps.
Oct 9, 2015 at 8:24 PM
Edited Oct 9, 2015 at 9:13 PM
That works but.

How will this work when my Cable Company converts over to H264??? Which is going to start on 10/25.

What I really would like to do is transcode to H264 TS files and have it recognized in the HDHRDVR. I really do not cut commercials out but I wanted to make sure it worked.
Oct 9, 2015 at 9:47 PM
It works as a temporary fix for running comskip. I am in the same boat as you. I have a bunch of wtv files that I would like to convert so hdhomerun dvr sees them. rboy1 any thoughts
Oct 10, 2015 at 1:00 AM
Glad to know that DD works so the byte shifting mechanism we are using has a few issues I guess. We will need to update our strategy and use the two file method. It will take some time but we'll get on it.

Oct 10, 2015 at 3:13 AM
How big is your converted file? Is it under 4GB?
If not can you try using a smaller file (say 1GB) and test it. I was to check if you're hitting the classic 32bit boundary issue.

Oct 10, 2015 at 3:30 AM
Can you also check the log if there are any errors while trying to write the metadata for files which don't play back

Oct 10, 2015 at 4:33 AM
The smallest i can go on files is just shy of 2 gb for a originally .5 hour show. I would not know how to read the log as well as you so I uploaded it. The name of the show is fox 5 news at 6. The log is with metadata enabled
Oct 10, 2015 at 5:37 AM
Can you try the latest build and see if fixes the issue?

Oct 10, 2015 at 3:16 PM
Edited Oct 10, 2015 at 3:16 PM
Unfortunately It still does not show up. I have uploaded the log. the show name is eyewitness news this saturday morning. I noticed this time that mcebuddy started to process the recording before it was finished recording. So I had to stop it and restart it manually.
Oct 10, 2015 at 5:35 PM
Edited Oct 10, 2015 at 6:09 PM
delete me
Oct 11, 2015 at 11:41 PM
Edited Oct 11, 2015 at 11:41 PM
Okay try the latest build, we've changed the strategy from inserting of metadata to doing a concatenation of metadata (DD strategy) to the output file. This will require extra disk space since we'll be duplicating the converting file to attach the metadata but if it works, it's worth it I guess until we figure out what's going wrong with the insertion strategy.
Let us know
Oct 12, 2015 at 1:59 AM
It plays nicely in vlc but it does not show up in the hdhomerun kodi app. I had the working directory open when it was processing and I may be wrong but I did not notice a metadata.mpg file
Oct 12, 2015 at 2:24 AM
I just found this error in my log:

WARNING> 2015-10-11T20:41:11 MCEBuddy.MetaData.VideoMetaData --> Unable to extract meta data from file \SYNOLOGY1\HDHomeRun\The Simpsons\The Simpsons S27E03 20151011 [20151012-0000].mpg. Unknown MPEG version.
Oct 13, 2015 at 4:06 PM
I just tried it again the log shows some metadata but it does not create a metadata.mpg file and does not show up in the hdhomerun dvr kodi app
Oct 13, 2015 at 5:54 PM
There is no intermediary file. It just reads the metadata from the original an writes it to destination and then concatenates the converted file.

With the DD command and converted file (without write metadata) does it show up in Kodi?

Oct 13, 2015 at 7:01 PM
I just tried it again this time with metadata off and ran the following commands in cygwin

dd if=original-recording.mpg of=metadata.mpg bs=12032 count=1
cat metadata.mpg processed-recording.mpg > final.mpg

this time it showed up in the hdhomerun dvr kodi app. I did not have to change the file name from final.mpg
Oct 13, 2015 at 9:08 PM
What profile are you using with the latest build?

Oct 13, 2015 at 9:22 PM
I am using the profile below

[mpg Unprocessed]
Description=Very fast but limited functionality. Use this to convert to mpg format while taking out commercials and keeping original video/audio quality. It does not remove black bars, resize the video, deinterlace or select audio language. The original video can be in any format, MPEG1, MPEG2 or MPEG4/H.264, it will be retained unaltered.
order=copy,ffmpeg
copy-ext=.ts
copy-audiodelay=skip
ffmpeg-general=-threads 0
ffmpeg-video=-vcodec copy -f mpegts -map 0:v -sn
ffmpeg-audio=-acodec copy -map 0:a
ffmpeg-audioac3=-acodec copy -map 0:a
ffmpeg-ext=.ts
ffmpeg-audiodelay=skip
FixedResolution=true
SkipCropping=true
PreConversionCommercialRemover=true
AutoDeinterlace=false
RenameExt=.mpg
Oct 13, 2015 at 11:03 PM
So this profile with write metadata does not show up in Kodi but without write metadata and with DD it works with Kodi?

Oct 14, 2015 at 12:44 AM
I'm also trying to understand, you're trying to playback the video with Kodi (and the HDHR plugin) right?
How about HDHR DVR recognizing the file and metadata itself?

Oct 14, 2015 at 12:59 AM
that is correct with add information checked it does not show up however when I uncheck it and run dd/cat it does show up. I am trying to play it in the hdhomerun plugin for kodi. I always assumed that the plugin played the video through the backend. so if the plugin did not see it I assumed that the backend did not also or there was some error. To be honest with you I never checked which one. I will check now. Just so you know I am running the backend on a nas
Oct 14, 2015 at 1:21 AM
I just checked the log and with add information checked the backend does not see the file at all
Oct 14, 2015 at 1:37 AM
Yeah expected that, we just figured what may be wrong. While writing the metadata back into TS format we ended up writing a few extra bytes that shouldn't be there and didn't initialize the padding bytes to 0xFF.

Try the new build we're putting up in a few minutes and let me know.

Oct 14, 2015 at 3:07 PM
Edited Oct 14, 2015 at 3:24 PM
This now works you just have to make sure that you remux.


--> Starting to write payload to TS stream
--> Concatenating the SiliconDust metadata to output file
2015-10-14T06:54:23 MCEBuddy.Engine.ConversionJob --> Finished writing metadata, file size [KB] 2,619,008.00
INFORMATION> 2015-10-14T06:54:23 MCEBuddy.MetaData.VideoMetaData --> Extracting info from source video into NFO file (XML)
--> Dumping complete information about the file C:\Program Files\MCEBuddy2x\working0\Brooklyn Nine-Nine.S03E02.The Funeral.ts
2015-10-14T06:54:23 MCEBuddy.AppWrapper.Base --> Launching process C:\Program Files\MCEBuddy2x\ffmpeg\ffprobe.exe
2015-10-14T06:54:23 MCEBuddy.AppWrapper.Base --> Process arguments -hide_banner -probesize 100M -analyzeduration 300M -i "C:\Program Files\MCEBuddy2x\working0\Brooklyn Nine-Nine.S03E02.The Funeral.ts"
2015-10-14T06:54:23 MCEBuddy.AppWrapper.Base --> UI Session Admin Process : False
2015-10-14T06:54:23 MCEBuddy.AppWrapper.Base --> Setting process priority to Normal
2015-10-14T06:54:45 MCEBuddy.AppWrapper.Base --> Input #0, mpegts, from 'C:\Program Files\MCEBuddy2x\working0\Brooklyn Nine-Nine.S03E02.The Funeral.ts':
2015-10-14T06:54:45 MCEBuddy.AppWrapper.Base --> Duration: 00:23:36.34, start: 1.400000, bitrate: 15148 kb/s
2015-10-14T06:54:45 MCEBuddy.AppWrapper.Base --> Program 1
2015-10-14T06:54:45 MCEBuddy.AppWrapper.Base --> Metadata:
2015-10-14T06:54:45 MCEBuddy.AppWrapper.Base --> service_name : Service01
2015-10-14T06:54:45 MCEBuddy.AppWrapper.Base --> service_provider: FFmpeg
2015-10-14T06:54:45 MCEBuddy.AppWrapper.Base --> Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 1280x720 [SAR 1:1 DAR 16:9], max. 38800 kb/s, 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
2015-10-14T06:54:45 MCEBuddy.AppWrapper.Base --> Stream #0:1[0x101]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), fltp, 448 kb/s
2015-10-14T06:54:45 MCEBuddy.AppWrapper.Base --> Stream #0:2[0x102]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 192 kb/s
--> Process exited with code 0
Oct 14, 2015 at 3:32 PM
I didn't get it. Is the latest build working now? What was that excerpt you posted below?

Oct 14, 2015 at 3:48 PM
so far it works. I will be testing it shortly with download info checked and will let you know how that goes. just some other things I noticed. mcebuddy ignores select monitor locations sometimes adding it twice to 1 job. mcebuddy starts processing before recording is complete. but over all nice work. it shows up and plays in the hdhomerun dvr kodi app. Thank you very much
Oct 14, 2015 at 3:55 PM
If this works with write metadata let me know I will ask you try another build where we insert the data up front instead if using a temporary file to concatenate it. It is faster and uses less space.

Oct 14, 2015 at 4:09 PM
It works with Add Information checked.
INFORMATION> --> Windows OS Version -> Microsoft Windows NT 10.0.10240.0 (WIN_10_2016_SERVER, Professional)
INFORMATION> --> Windows Platform -> 64 Bit
INFORMATION> --> MCEBuddy Build Platform -> 64 Bit
INFORMATION> --> MCEBuddy Build Version : 2.4.3.0
INFORMATION> --> MCEBuddy Build Date : 10/13/2015 20:41:26
INFORMATION> --> MCEBuddy Running as Service : True
Oct 14, 2015 at 4:20 PM
Yes this works with write metadata and download metadata. Please let me know when that new build is posted.
Oct 14, 2015 at 8:47 PM
The new build will be up in a few minutes, with this build the only difference is that it will use the insertion strategy instead of the concatenation strategy. In our tests here both strategies produced identical binary files so we don't see any difference (except for speed and space required for the transaction).

Oct 14, 2015 at 9:40 PM
Edited Oct 14, 2015 at 9:40 PM
One Question how will this work if future recordings are not mpeg but h264 ... Comcast will be converting to H264 beginning the end of this month.... in my area.
Oct 14, 2015 at 11:05 PM
Shouldn't make any difference with the profile you are using. It retains the original video. The container is still TS So the metadata will continue as it.

Oct 15, 2015 at 12:26 AM
congratulations this build works also. I suppose the next step is to be able to take a file that was recorded by a program like wmc and convert it so It plays in the hdhomerun dvr kodi app
Marked as answer by rboy1 on 10/15/2015 at 1:26 AM
Oct 15, 2015 at 3:25 AM
techpro2004 wrote:
congratulations this build works also. I suppose the next step is to be able to take a file that was recorded by a program like wmc and convert it so It plays in the hdhomerun dvr kodi app
Forgive my naïveté but given that SD HDHomeRun plugin does not yet support DRM-ed content what is the advantage of trying to us it for viewing?
I simply point Kodi files setup to both recording folders of HDHomeRun and MCEBuddy renamed wtv files from WMC. And then use the standard UI to view either.
Additionally, I extract srt and create EDL files. Both work like a charm in Kodi.

Even if actually removing commercials to save space, this seems a better option.

Thanks
--vlad.
Oct 15, 2015 at 7:27 AM
That support is already there. Mcebuddy doesn't actually cut / copy the header. It recreates it (JSON format encoded as a TSStream) and then inserts it. So you should be able to take any file and convert it to SD format using your above profile.
I'll have this profile added to the next build.

However I did see a post from nick somewhere that Kodi may not recognize the files because it needs a program ID metadata which is not available for non SD recordings but you can try it out now that we know the metadata creation and insertion is working.

Oct 15, 2015 at 10:22 AM
Can you try out the latest build, added a profile called HDHomeRun Original, very minor change to above profile. See if it works with original HDHR recordings (plus if you have) as well as non HDHR recordings.
Oct 15, 2015 at 1:58 PM
Houston we have a problem. I woke up this morning to find that mcebuddy processed a recording in progress. this means that the original recording was deleted and i am left with one that is 72 mb. if hdhomerun dvr does not offer a file lock maybe an alternative would be to check if the file size is growing before it processes. in any event I restarted hdhomerun dvr which should create a new recording. I will test the HDHomeRun Original profile soon.
Oct 15, 2015 at 2:40 PM
Edited Oct 15, 2015 at 2:44 PM
I just tried to convert a wtv file to hdhomerun dvr format based on the logs. it did not write the metadata in hdhomerun dvr format but i could be wrong. It also did not show up in the hdhomerun dvr kodi app. I have uploaded the log. the show name is good day new york. I will test it with a original hdhomerun recording once the recording is finished
Oct 15, 2015 at 2:45 PM
techpro2004 wrote:
Houston we have a problem. I woke up this morning to find that mcebuddy processed a recording in progress. this means that the original recording was deleted and i am left with one that is 72 mb. if hdhomerun dvr does not offer a file lock maybe an alternative would be to check if the file size is growing before it processes. in any event I restarted hdhomerun dvr which should create a new recording. I will test the HDHomeRun Original profile soon.
Hello, techpro2004.
There is a "toggle" on the main screen of the MCEBuddy that specifies the minimum "age" of a file before MCEBuddy would process it. Did you have that enabled? If so, MCEBuddy should not have processed a recording-in-progress.

As far as the file lock, that probably should be communicated to SD.
Oct 15, 2015 at 3:02 PM
@techpro2004 try the latest 2.4.3 BETA build we put a few minutes ago, another user reported an similar issue with file locks and SageTV. We're put a workaround for it to try to detect if files have been opened for writing.

Let me know if it works for you. It would be nice if SD put a *read* lock on the file until the recording is completed it not I'm hoping they've atleast put a write lock in place. If not then you'll have to contact SD as without a write lock it'll get more complicated.

Oct 15, 2015 at 3:09 PM
Edited Oct 15, 2015 at 3:24 PM
rboy1: so far it is looking good I will let you know how it goes

edit:

I take that back it just started processing and it is still recording
Oct 15, 2015 at 3:24 PM
As for WTV to HDHR, it does write the metadata (just open the converted file in any editor and you'll see the metadata). The issue I suspect is that the program id is missing (since it's generated by HDHR) and without the program id HDHR may ignore such files even if the rest of the metadata is in place. We can't work around this, I think I saw a post from Nick on this. You may want to reach out to him to get his view on it also.
Oct 15, 2015 at 3:29 PM
Will transcoding to H264 TS file work ? Will it be able to insert the Metadata into a transcoded H264 TS file?
Oct 15, 2015 at 3:40 PM
techpro2004 wrote:
vlad: Unfortunately my daily recordings vary in length from 2 hr to 30 min and some days my varied viewing scheduled only permits me to watch a show immediately after it is recorded. maybe I am just being picky but why should the user experience be any different than it was with wmc.
techpro2004: I don't believe you are being picky at all.

It sounds like rboy1 has put a number of checks to rectify the problem but I wonder if it also would be possible to reprogram the minimum age from hours into minutes. Rboy1, would you opine on that, please? I generally run MCEBuddy at night when my computer is not in use, but it would be nice to not wait 60 minutes (I am assuming that SD would not implement the suggested lock on a NAS anytime soon.

--vlad
Oct 15, 2015 at 4:00 PM
@nyplayer, yes it will work. MCEbuddy inserts the metadata into the TS Stream as an Elementary Stream using the PID 0x1FFA into all TS files. Since it's a PID based TS Stream it won't affect playback or processing of any non SDHR devices/softwares but SDHR will be able to extract the stream using the PID.

The beauty of a standard based approach rather than just *dumping* it into a file.

Oct 15, 2015 at 4:01 PM
@techpro2004 - you shouldn't have to use the aging option at all if the new detection methodology works. Did you try the new build that was put up about 30 minutes ago?

Oct 15, 2015 at 4:20 PM
Edited Oct 15, 2015 at 4:21 PM
Will this profile work? I will test it if you say profile is ok.

[TS HDHomerun]
Description=Use this to recode the video into a TS (H.264/AC3) file.
order=handbrake,ffmpeg
ffmpeg-general=-threads 0
ffmpeg-video=-ss 3 -vf yadif=0:-1:1,hqdn3d -vcodec libx264 -crf 22 -f mpegts -map 0:v -sn
ffmpeg-audio=-acodec ac3 -ab 192k -map 0:a
ffmpeg-audioac3=-acodec ac3 -ab 384K -map 0:a
ffmpeg-ext=.ts
ffmpeg-audiodelay=skip
handbrake-general=--decomb --denoise --loose-anamorphic --verbose=2
handbrake-video=--start-at duration:3 -e x264 -q 20
handbrake-audio=-E ffac3 -R auto -B 192 -D 0 -a 1,2,3,4,5
handbrake-audioac3=-E ffac3 -R auto -B 384 -D 0 -a 1,2,3,4,5
handbrake-ext=.ts
handbrake-audiodelay=skip
PreConversionCommercialRemover=true
RenameExt=.mpg
Oct 15, 2015 at 4:36 PM
It does not work. It adds shows to the list that are still recording
Oct 15, 2015 at 4:40 PM
the latest build i see was added at 9:48 am today
Oct 15, 2015 at 4:49 PM
i know it is improper but does the program ID have to be accurate for it to show up or can it be faked. I would be willing to test this.
Oct 15, 2015 at 5:55 PM
Edited Oct 15, 2015 at 5:57 PM
I tried converting to a smaller H264 TS files ... and it failed in the write metadata step.

INFORMATION> 2015-10-15T08:43:28 MCEBuddy.Engine.ConversionJob --> Writing show information
--> Starting to write payload to TS stream
2015-10-15T08:43:28 MCEBuddy.Engine.ConversionJob --> Finished writing metadata, file size [KB] 377,123.00
INFORMATION> 2015-10-15T08:43:28 MCEBuddy.MetaData.VideoMetaData --> Extracting info from source video into NFO file (XML)
--> Dumping complete information about the file C:\Program Files\MCEBuddy2x\working0\Brooklyn Nine-Nine.S03E02.The Funeral.ts
2015-10-15T08:43:28 MCEBuddy.AppWrapper.Base --> Launching process C:\Program Files\MCEBuddy2x\ffmpeg\ffprobe.exe
2015-10-15T08:43:28 MCEBuddy.AppWrapper.Base --> Process arguments -hide_banner -probesize 100M -analyzeduration 300M -i "C:\Program Files\MCEBuddy2x\working0\Brooklyn Nine-Nine.S03E02.The Funeral.ts"
2015-10-15T08:43:28 MCEBuddy.AppWrapper.Base --> UI Session Admin Process : False
2015-10-15T08:43:28 MCEBuddy.AppWrapper.Base --> Setting process priority to Normal
2015-10-15T08:43:31 MCEBuddy.AppWrapper.Base --> [mpegts @ 00000000038b4520] max resync size reached, could not find sync byte
2015-10-15T08:43:31 MCEBuddy.AppWrapper.Base --> Last message repeated 12 times
2015-10-15T08:43:31 MCEBuddy.AppWrapper.Base --> C:\Program Files\MCEBuddy2x\working0\Brooklyn Nine-Nine.S03E02.The Funeral.ts: End of file
--> Process exited with code 1


Profile I used.

[TS HDHomerun]
Description=Use this to recode the video into a TS (H.264/AC3) file.
order=handbrake,ffmpeg
ffmpeg-general=-threads 0
ffmpeg-video=-ss 3 -vf yadif=0:-1:1,hqdn3d -vcodec libx264 -crf 22 -f mpegts -map 0:v -sn
ffmpeg-audio=-acodec ac3 -ab 192k -map 0:a
ffmpeg-audioac3=-acodec ac3 -ab 384K -map 0:a
ffmpeg-ext=.ts
ffmpeg-audiodelay=skip
handbrake-general=--loose-anamorphic --verbose=2
handbrake-video=-e x264 -q 20
handbrake-audio=-E ffac3 -R auto -B 192 -D 0 -a 1,2,3,4,5
handbrake-audioac3=-E ffac3 -R auto -B 384 -D 0 -a 1,2,3,4,5
handbrake-ext=.ts
handbrake-audiodelay=skip
PreConversionCommercialRemover=true
RenameExt=.mpg
Oct 15, 2015 at 6:10 PM
basically what I am saying is if the other more important tags are correct and mcebuddy / hdhomerun dvr can identify the show another way than who cares what value program id has as long as it is in the right format
Oct 16, 2015 at 2:18 PM
Edited Oct 16, 2015 at 2:20 PM
all morning I cant get through to www.mcebuddy2x.com. Is it down?

edit:
please ignore this post it is up now
Oct 16, 2015 at 2:25 PM
I just noticed a new build is up. What problem should I be testing for?
Oct 16, 2015 at 3:09 PM
congratulations this build fixes the processing too soon problem. Any thoughts on my fake program Id idea? thanks
Oct 17, 2015 at 4:06 AM
rboy1: check out this thread demonrik proposes the same solution to the converting files from other programs bug.

https://www.silicondust.com/forum/viewtopic.php?f=96&t=21015&start=15
Oct 28, 2015 at 12:01 AM
Maybe I'm missing it. I see this by Nick:
Episodes are matched by ProgramID which I don't think you will be able to generate
BTW I can't seem to sign up on their forum for some reason.

Oct 28, 2015 at 2:02 PM
Yes I saw that also. I was assuming that he meant using the correct values. What I am proposing is come up with your own values just make sure the format is correct. I really don't care if hdhomerun dvr re-records my shows as they are long off the air.
Oct 28, 2015 at 4:46 PM
techpro2004 wrote:
Yes I saw that also. I was assuming that he meant using the correct values. What I am proposing is come up with your own values just make sure the format is correct. I really don't care if hdhomerun dvr re-records my shows as they are long off the air.
Could the title override functionality be used to force a program ID if we can procure one?
There is a setting that allows to force the title or provide TVDB or IMDB ID. Maybe an HDHomeRun program ID could be added?

Techpro2004: what is the rationale for wanting to see shows recorded outside HD DVR showing up in the client? Can you just use Kodi library to combine the shows? I do that and it works great.

--vlad
Oct 28, 2015 at 7:08 PM
Vlad: The kodi client does not support drm. So I plan on exclusively using the windows and android client once those are released. It would be nice to not have to switch back and forth especially for technically challenged family members.
Oct 28, 2015 at 7:56 PM
techpro2004 wrote:
Vlad: The kodi client does not support drm. So I plan on exclusively using the windows and android client once those are released. It would be nice to not have to switch back and forth especially for technically challenged family members.
That's actually quite fair. I thought you were discussing more immediate term and SD client does not yet support DRM either.
I am in a similar boat but luckily FiOS only DRM two channels (HBO and fx)from which I record.
So that mike like a bit easier.

I wonder if this request should be directed at SD. They are promising a WMC "killer" so it would only make sense that they should support the recordings made in WMC or anywhere else. They could just the same lookup metadata in .wtv files and look up guide info just once. Beats the heck out of having to remix wtv into mpg.

We could dream, right?

--Vlad
Oct 28, 2015 at 8:01 PM
Not sure how it will react to adding a random program Id. FRom what I understand HDHR uses the program Id to look up the metadata from its' DB/servers.

you can try this, extract the metadata using the DD command from valid HDHR file. Edit it using a Hex editor and make a small modification to the Title and Desription etc (e.g. change the first name of the title). Make sure you don't add/remove any bytes since it's a 188 byte packet with a 4 byte header. Just replace the characters with some ones.

Now take a standard TS file and tag on the "modified" metadata header to the file and see how HDHR reacts to it. If it shows the modified details then it's a good strategy if not then random Program ID is moot.

Oct 28, 2015 at 8:35 PM
I extracted the metadata using dd edited it using a hex editor stripped the metadata off a file using mcebuddy used cat to combine the 2 files and it worked perfectly the recording showed up in the hdhomerun kodi app with the changes and played just fine I think this will work
Oct 28, 2015 at 9:39 PM
Can you share what information you saw (in terms of the metadata), the original or modified?

Oct 28, 2015 at 10:47 PM
I changed the first word in synopsis and in title using a hex editor i found floating around the internet called XVI32. then In the hd homerun dvr kodi app on the left where the synopsis is supposed to be was my changed version and where the episode name is supposed to be was my changed version. If you want I can upload my changed metadata.mpg file that might help better. the file I based this off was previously processed by mcebuddy so i was editing whatever metadata mcebuddy places in the file. I was not 100% sure what you were asking please let me know if this does not answer your question.
Oct 28, 2015 at 11:03 PM
I got a snack and re read your question. I uploaded my modded metadata.mpg file just open it with XVI32. that will tell you everything.
Oct 29, 2015 at 12:21 AM
Okay so it looks like adding a *random* program ID doens't appear break it AND it preserves the metadata written into the header when reading it back with Kodi

Oct 29, 2015 at 12:48 AM
Okay I've put a BETA build which includes the Program ID 11919009 when writing the HDHR metadata when original metadata is not from HDHR files.

Let me know how it goes, obviously the candidates for this will be non HDHR recorded files.

Oct 29, 2015 at 2:07 AM
I am downloading it now
Oct 29, 2015 at 2:40 AM
Unfortunately It does not show up in the kodi app. I did notice however that when using a hex editor the metadata in the file i manually edited is twice as long as the metadata mcebuddy generated. Maybe there is another value that you need also. I uploaded the new metadata file under the name metadata2.mpg
Oct 29, 2015 at 2:47 AM
In that link I previously posted demonrik says you would also need the seriesID and groupID in addition to the programID.
Oct 29, 2015 at 3:07 AM
The ProgramGroupId is filled out for sports and movies shows (we were able to identify the pattern here). Now it's set to a default of "movie" for all other shows. The series ID is also set equal to the program ID (set to 11919009) if the metadata is not available.

Try out the new build.

Oct 29, 2015 at 3:16 AM
Correction, with the new build, series ID, program ID and DisplayGroupID are all set to 10402869 by default. If a pattern match is found (like movies or sports) then the correct DisplayGroupID is updated otherwise these are the defaults now (which correspond to a News show recording) for non HDHR source files.

Oct 29, 2015 at 3:35 AM
I am testing it now
Oct 29, 2015 at 3:50 AM
Congratulations this works the recording shows up and plays in the kodi app with all the correct metadata except for a picture. I really don't need a picture anyways. Thank you very much. I am using the HDHomeRun original profile. The file I converted was a wtv
Oct 29, 2015 at 5:42 AM
Glad to know. Keep trying different types shows movies news sports etc and let us know the feedback.

Oct 29, 2015 at 7:46 AM
I have a few shows recording 1 movie 1 sifi and 1 sports all in wmc I will convert them to hdhomerun dvr in the morning. the news will start recording at 7
Oct 29, 2015 at 1:50 PM
they all showed up (news is still recording) however the movie showed up under the category movies and the nba game is in the category with the world series. The sifi show is grouped correctly by show name
Oct 31, 2015 at 3:19 AM
I just created the below profile to convert files to hdhomerun dvr h264 using nvenc. this works with my latest ffmpeg nvenc build that I just uploaded. the files show up and play in the hdhomerun kodi app.

[mpg]
Description=Use this to recode the video into a mpg (H.264/AC3) file.
order=ffmpeg,handbrake
ffmpeg-general=-threads 0
ffmpeg-video=-ss 3 -vf yadif=0:-1:1,hqdn3d -vcodec nvenc -crf 22 -f mpegts -map 0:v -sn
ffmpeg-audio=-acodec ac3 -ab 192k -map 0:a
ffmpeg-audioac3=-acodec ac3 -ab 384K -map 0:a
ffmpeg-ext=.ts
ffmpeg-audiodelay=skip
handbrake-general=--decomb --denoise --loose-anamorphic --verbose=2
handbrake-video=--start-at duration:3 -e x264 -q 20
handbrake-audio=-E ffac3 -R auto -B 192 -D 0 -a 1,2,3,4,5
handbrake-audioac3=-E ffac3 -R auto -B 384 -D 0 -a 1,2,3,4,5
handbrake-ext=.mp4
handbrake-remuxto=.ts
handbrake-audiodelay=skip
PreConversionCommercialRemover=true
RenameExt=.mpg
FixedResolution=true
Nov 15, 2015 at 10:21 PM
I started converting my movies to hdhomerun format and I noticed something. The destination directory with sorting enabled must be the root recording directory. it can not be a sub folder or recordings will not show correctly.
Nov 16, 2015 at 1:05 AM
so one or 2 converted files works however when i get close to 60 nothing shows in the hdhomerun kodi client
Nov 16, 2015 at 2:05 AM
Wonder if that is because all the shows are using the same Id or just a bug with the Kodi plugin.

Nov 16, 2015 at 2:20 AM
maybe we could try a counter for example after each show is processed add 1 to the next show's id.
Nov 16, 2015 at 2:25 AM
Do you have 60 recordings from HDHR which are showing up on Kodi?

Nov 16, 2015 at 2:44 AM
I only have about 10 recordings from the hdhomerun dvr depending on time of day. The rest, I tried to convert from other sources. when I delete those recordings the 10 recordings show up again.
Nov 16, 2015 at 5:38 AM
Try creating alarger HDHR library first to see the limits of the genuine stuff

Nov 16, 2015 at 1:05 PM
I set a lot of extra shows to record but this may take a while (1-2) weeks seeing as I only have 1 prime
Nov 16, 2015 at 4:34 PM
my guess is that the id is to blame because if the folder structure is not exactly right it wont make it past 10 converted recordings without problems. Can we try the counter idea?
Nov 16, 2015 at 10:20 PM
Go ahead and try out the new build, it generates a random id between 10100000 and 12100000

Nov 16, 2015 at 10:36 PM
I am downloading it now and will let you know how it goes. thanks
Nov 17, 2015 at 1:22 AM
I have 73 recordings, in Plex compliant form of RecordingRoot/ShowName/Season X/Episode Y.
I did not Transcode, but used MceBuddy to rename and move into season sub-folders.

no issues with HD client "seeing" them.

just an FYI.
Nov 17, 2015 at 1:54 AM
vlad: were those recordings originally created by the hdhr dvr or another program. What profile did you use
Nov 17, 2015 at 2:09 AM
techpro2004 wrote:
vlad: were those recordings originally created by the hdhr dvr or another program. What profile did you use
Yes, they were original HDHR recordings.
Sorry, I should have made that more explicit.

I used MPG Unprocessed profile because I only wanted metadata looked up, cc/EDL extracted and file renamed into a Kodi/Plex compliant format.

--vlad
Nov 17, 2015 at 2:29 AM
Vlad: That explains a lot. We are trying to convert from other sources.

rboy1: This build is a little better. It shows 42 recordings under movies but when I select it nothing is there. do you think randomizing other values would help?
Nov 17, 2015 at 2:52 AM
Probably not.

Are you facing issues with movies or shows? They are very different.

For movies the displaygroupId should be "movie", Displaygrouptitle should be "Movies".
SeriesID and ProgramID should be a random number. Please verify that you have this in your converted file metadata (open your conversion log and look at the end when writing the metadata what hte encoded metadata is).



Nov 17, 2015 at 2:53 AM
BTW are you saying no movie is showing when you select it? or only when it exceeds 42 it doesn't show up?

Nov 17, 2015 at 3:04 AM
This is what I have for metadata:

--> Encoded SiliconDust metadata ->
{"ChannelAffiliate":null,
"ChannelImageURL":null,
"ChannelName":"Paramount Pictures",
"ChannelNumber":null,
"DisplayGroupID":"movie",
"DisplayGroupTitle":"Movies",
"EndTime":0,
"FirstAiring":0,
"ImageURL":null,
"OriginalAirdate":820454400,
"ProgramID":"10320018",
"RecordEndTime":0,
"RecordStartTime":0,
"SeriesID":"10320018",
"StartTime":0,
"Synopsis":"Captain Picard and his crew pursue the Borg back in time to stop them from preventing Earth's first contact with an alien species. They also make sure that Zefram Cochrane makes his famous maiden flight at warp speed.",
"Title":"Star Trek: First Contact",
"EpisodeNumber":null,
"EpisodeTitle":null}

When I convert too many movies the whole system locks up and shows nothing. the number of movies it takes to do this varies greatly with folder structure
Nov 17, 2015 at 3:08 AM
I am testing it now with shows
Nov 17, 2015 at 3:14 AM
This looks fine to me and technically the only difference between the last and current build is the random SeriesID and ProgramID (which match but are random) vs they were fixed earlier.
It's possible that one of the ID's is causing the Kodi plugin to bug out and stop processing thereafter.

Ideally I would suggest please contact Nick and ask him for a strategy that works which won't cause Kodi to bug out maybe a range of number to use or something) and we can implement it.

Nov 17, 2015 at 3:41 AM
just trying 1 more thing before bothering nick. those movies I was converting had minimal metadata to start with. I am checking with recordings that have better metadata
Nov 17, 2015 at 2:03 PM
apparently that was the problem my dvd rips did not have the correct starting metadata also, I reverted to the previous build as it organizes videos better in the hdhomerun dvr. sorry thanks
Nov 17, 2015 at 2:07 PM
So the previous build worked better?

Nov 17, 2015 at 2:14 PM
yes. when we randomized the id each recording was placed in a different menu for all shows and some movies in the hdhomerun dvr instead of grouping them by series
Nov 17, 2015 at 3:38 PM
Does anyone have this working correctly with their hdhomerun dvr? I can't seem to get a consistent result once MCEbuddy has processed a file.

some episodes it processes and replaces the file with the original name, others it creates a sub folder or two and puts the file in there, and other files it just seems to create duplicates over and over again in their own folder.

I am recording MSG Beginnings fyi
Nov 17, 2015 at 4:52 PM
Check your logs to see what's going on, renaming and folders are purely based on metadata. See what's being extracted and it'll tell you what's going on

Nov 17, 2015 at 5:00 PM
think I figured out the weird one - mcebuddy was pulling the file from the @Recycle folder.

anything specific I should be looking for in the logs?
Nov 17, 2015 at 5:24 PM
Nothing just see what metadata was extracted/downloaded in the beginning and that will tell you how the output will turn out.

Nov 19, 2015 at 8:21 PM
I see my problem - under settings there is an option to "delete original file" when this is selected mcebuddy deletes the original file and then re-scans the file from the @recyclebin folder. can you add the option to permanently delete or ignore the @recyclebin folder please?
Nov 19, 2015 at 8:28 PM
Are you using a NAS?

Nov 19, 2015 at 8:32 PM
yes, a QNAP
Nov 21, 2015 at 1:22 AM
Done!

Nov 21, 2015 at 3:18 PM
Edited Nov 21, 2015 at 3:19 PM
rboy1 wrote:
Done!
Thank you very much. Which build should I expect to be able to test this on?

Also I gave you the wrong folder name "@Recycle" is the correct folder name, apologies.
Nov 21, 2015 at 4:16 PM
Yesterdays

Nov 21, 2015 at 6:55 PM
rboy1 wrote:
Done!
Rboy1, can you, please, clarify what "done" means exactly in this case? I.e. What change is in the software?
I thought that "Network Recycle Bin" is strictly a QNAP feature, and even if you permanently delete in Windows, QNAP will still out it j it's recycle bin, unless you turn it off or exclude the extension.

Please clarify.
Thanks
--vlad
Nov 21, 2015 at 7:24 PM
Sure, the details are put in the release notes but anyways.

MCEBuddy will ignore any directory while monitoring file with the name @recycle in it's path. This appears to be a reasonable assumption and can serve as a backdoor for folks who want monitor tasks to ignore some file, just create a directory with the name @recyle in it and it'll ignore it.

Nov 21, 2015 at 7:38 PM
rboy1 wrote:
Sure, the details are put in the release notes but anyways. MCEBuddy will ignore any directory while monitoring file with the name @recycle in it's path. This appears to be a reasonable assumption and can serve as a backdoor for folks who want monitor tasks to ignore some file, just create a directory with the name @recyle in it and it'll ignore it.
That's great news!
Previously, when I asked for folder(s) to be filtered out (http://mcebuddy2x.codeplex.com/workitem/2824), you indicated there was no clean way to do so.
I am glad you have found a way.

This covers QNAP users, of which I am one. What about others whose folder names are differently named?
Maybe a parameter with a string specified?

Thanks
--Vlad.
Nov 21, 2015 at 9:05 PM
Maybe I misunderstood.

The issue with explicitly giving an exclude option is that of confusing the user. First there in an include filter and now an exclude filter. I can guarantee there will be folks who set both and ofcourse the exlucde takes precedence and its'll lead to a ton of posts on why MCEBuddy cannot find a file or process it.

Complexity for the average user is too much.

Plus with the exception of QNAP I don't see any other need for such a configuration. Maybe I'm missing it.