NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Windows v
« Previous 1 … 43 44 45 46 47 … 101 Next »
Recording succeeds but transcoded file is deleted

 
  • 0 Vote(s) - 0 Average
Recording succeeds but transcoded file is deleted
Nimoder
Offline

Junior Member

Canada
Posts: 19
Threads: 2
Joined: May 2022
#1
2022-05-02, 08:15 PM
Recording and transcoding with Video Encoder set to CPU always succeeds.  However, changing the Video encoder to NVIDIA causes the transcoded file to be deleted.  After a recording finished successfully, I see that a new temp.MP4 file is created and the graphics processor (NVIDIA) begins its work.  After it finishes, the MP4 file disappears from the directory.  Sometimes the process would succeed and the .TS file is replaced by the .MP4 file.

When I reviewed the various log files, I found entries that indicated the resultant file appeared to be too small, and the MP4 file is deleted.  The following is an example of one such entry:

2022-05-02 13:02:36.484 [DEBUG][197] Dropping out (leaseGoodUntil 1:02:36 PM)
2022-05-02 13:08:13.616 [DEBUG][213] streamable conversion completed: "E:\data\Recordings\CTV News Toronto\CTV News Toronto_20220502_12001300.temp.mp4"
2022-05-02 13:08:13.616 [DEBUG][213] Looks too small (1052706960) ...deleting
2022-05-02 14:38:18.681 [DEBUG][9] PurgeOldDeletes()


The ffmpeg encoding options used were:
-y  -i "E:\data\Recordings\CTV News Toronto\CTV News Toronto_20220502_12001300.ts" -ignore_unknown -sn -fflags +genpts -movflags faststart -codec:v h264_nvenc -vf yadif=0:-1:0 -codec:a aac -strict experimental -ac 2 -ab 128k "E:\data\Recordings\CTV News Toronto\CTV News Toronto_20220502_12001300.t.mp4"

When I used the above options in a command line, I was able to produce a good MP4 file.  The file is just under 1 GB in size (970 MB).  The original TS file was 8 GB for a 1 hr program.

I searched the web for a solution but didn't find anything relevant.  Any suggestions?
BrettB
Online

Posting Freak

Saint Paul, MN, USA
Posts: 2,666
Threads: 170
Joined: Jun 2007
#2
2022-05-02, 11:07 PM
My (total) guess is that sub put in a sanity check on the size of the transcoded file vs the original file in case something happened where a file got created, but it didn't get completed. And in your case of the news program, there probably isn't that much "action" so the compression successfully reduces the file size too much for sub's sanity check.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#3
2022-05-03, 01:35 AM
(2022-05-02, 11:07 PM)BrettB Wrote: My (total) guess is that sub put in a sanity check on the size of the transcoded file vs the original file in case something happened where a file got created, but it didn't get completed
Yep, that is what is happening here. If the transcoded version was less than 1/8 the size of the original file, it's assuming something must have gone wrong with the transcode, and decides to keep the original file instead of the transcoded file.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,772
Threads: 954
Joined: May 2006
#4
2022-05-03, 01:37 AM
(2022-05-03, 01:35 AM)sub Wrote: Yep, that is what is happening here. If the transcoded version was less than 1/8 the size of the original file, it's assuming something must have gone wrong with the transcode, and decides to keep the original file instead of the transcoded file.

Maybe use ffprobe or mediainfo and compare before and after duration?

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#5
2022-05-03, 01:43 AM
I've tweaked the numbers slightly for the next release.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#6
2022-05-03, 01:44 AM
(2022-05-03, 01:37 AM)mvallevand Wrote: Maybe use ffprobe or mediainfo and compare before and after duration?
Yeah, I'll look into doing something like this.

It was only really meant as a quick sanity check.
Nimoder
Offline

Junior Member

Canada
Posts: 19
Threads: 2
Joined: May 2022
#7
2022-05-03, 02:22 AM
(2022-05-03, 01:43 AM)sub Wrote: I've tweaked the numbers slightly for the next release.

Is it possible to get a patch for this, or will the next release be available soon?  I'm using the latest NextPVR, version 5.2.7.220410

Thanks for looking into this so quickly Smile 
 5.2.7.220410
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#8
2022-05-03, 02:41 AM
This updated dll should do the job. It tries to check the actual durations of the file. If it has any problems doing that, it'll fall back to the previous logic, but with the slightly updated 1/10 instead of 1/8 numbers.


Attached Files
.zip   NShared.zip (Size: 361.13 KB / Downloads: 1)
Nimoder
Offline

Junior Member

Canada
Posts: 19
Threads: 2
Joined: May 2022
#9
2022-05-03, 06:03 AM (This post was last modified: 2022-05-03, 06:04 AM by Nimoder.)
(2022-05-03, 02:41 AM)sub Wrote: This updated dll should do the job. It tries to check the actual durations of the file. If it has any problems doing that, it'll fall back to the previous logic, but with the slightly updated 1/10 instead of 1/8 numbers.

Thanks for posting the file.  I replaced the files in both locations, one under Program Files\NextPVR, and the other under Program Files\NextPVR\client.

So far two scheduled recordings succeeded in the conversion to MP4 format.  I originally tried a couple of short manual recordings but they ended up with .TS files.  It may be because the Recording Auto Transcode option was set to "720p" instead of "720p (.mp4)"

One thing I noticed with the successful conversions is that the MP4 files are in 1080 resolution (same resolution as the broadcast).  Is the 'Recording Auto Transcode' option supposed to convert them to 720.. if '720' is specified?

I will try a few more test recordings tomorrow.

Thank again for your help!
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#10
2022-05-03, 04:41 PM
(2022-05-03, 06:03 AM)Nimoder Wrote: One thing I noticed with the successful conversions is that the MP4 files are in 1080 resolution (same resolution as the broadcast).  Is the 'Recording Auto Transcode' option supposed to convert them to 720.. if '720' is specified?
Generally that is true, but not always. For the most part this feature was about converting recordings into a format that was more compatible with streaming in the web app, to improve playback there. If it detects it's already a good format for streaming, it can sometimes decide not to transcode.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (3): 1 2 3 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  DVR recording issues MarkMCraig 0 17 8 hours ago
Last Post: MarkMCraig
  Failed: Recording interrupted jzk 3 280 2025-04-18, 09:06 PM
Last Post: mvallevand
  Unable to delete recording. File may be in use. seattlefog 24 657 2025-04-13, 01:08 AM
Last Post: sub
  Directory not deleted after recording deleted Bobins 13 694 2025-03-08, 05:30 PM
Last Post: sub
  Recording IPTV lemmy999 8 489 2025-03-02, 06:13 PM
Last Post: lemmy999
  Temporarily Suspend Recording andrewj 1 167 2025-02-25, 12:44 PM
Last Post: mvallevand
  Series recording doesn't have cancel series markn62 9 2,202 2025-02-22, 09:24 PM
Last Post: jcole998
  Recording ken_dearden 8 585 2025-02-20, 12:22 PM
Last Post: ken_dearden
  Not recording new episo qttor 7 386 2025-02-17, 10:54 PM
Last Post: mvallevand
  Channel lock issue during recording erik123 1 169 2025-02-08, 03:35 AM
Last Post: BrettB

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode