Opened 8 years ago

Closed 6 years ago

#12385 closed Patch - Bug Fix (Duplicate)

Patch: Suggest that mythtranscode shouldn't always remove the original file

Reported by: Bill Meek <keemllib@…> Owned by:
Priority: minor Milestone: 0.28.1
Component: MythTV - Mythtranscode Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no


changeset:3d64f8a now calls CompleteJob?() for all types of transcodes.

When using --hlsstreamid, the output goes to the Streaming Storage Group and the original file(s) shouldn't be removed.

Currently, the following happens (there is no .tmp file):

mythtranscode: about to rename '/srv/mythtv-0/recordings/2609_20150217165800.ts' to '/srv/mythtv-0/recordings/2609_20150217165800.ts.old'
mythtranscode: About to unlink/delete file: /srv/mythtv-0/recordings/2609_20150217165800.ts.old

Patch tested on v0.28-pre-2670-g3d05b39-dirty. I'm not sure if the test should be for --hls or --hlsstreamid. Either works for the Content/AddLiveStream? endpoint and I believe cares for the original intent to handle command line xcodes.

diff --git a/mythtv/programs/mythtranscode/main.cpp b/mythtv/programs/mythtranscode/main.cpp
index 8c84813..a01acde 100644
--- a/mythtv/programs/mythtranscode/main.cpp
+++ b/mythtv/programs/mythtranscode/main.cpp
@@ -748,7 +748,8 @@ int main(int argc, char *argv[])
         exitcode = result;
-    CompleteJob(jobID, pginfo, useCutlist, &deleteMap, exitcode, result);
+    if (!cmdline.toBool("hlsstreamid"))
+        CompleteJob(jobID, pginfo, useCutlist, &deleteMap, exitcode, result);

Attachments (1)

mythtranscode-fifo-nodelete-12385.patch (522 bytes) - added by Bradley Baetz <bbaetz@…> 7 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 8 years ago by Stuart Morgan <smorgan@…>

Resolution: fixed
Status: newclosed

In 0f52e5c146625aef83ca880974ce94efcd17c5fb/mythtv:

Don't remove the original file for HLS transcodes. Fixes #12385

comment:2 Changed 8 years ago by stuartm

Milestone: unknown0.28

Thanks Bill, apologies for missing that case, I hope the damage wasn't too bad.

comment:3 Changed 8 years ago by steve_g@…

Should also not delete is FIFO was used. THe files may not have been transcode to the same place they came from.


if (!cmdline.toBool("hls")

CompleteJob?(jobID, pginfo, useCutlist, &deleteMap, exitcode, result);

or do O have to file another bug report?

comment:4 Changed 8 years ago by stuartm

Resolution: fixed
Status: closednew

comment:5 Changed 8 years ago by stuartm

Owner: changed from JYA to stuartm
Status: newaccepted

comment:6 Changed 7 years ago by Stuart Auchterlonie


Moving unresolved tickets to next point release

Changed 7 years ago by Bradley Baetz <bbaetz@…>


comment:7 Changed 7 years ago by Bradley Baetz <bbaetz@…>

I've attached a patch that also avoids deleting the source file when a fifodir is being used (e.g. by nuvexport)

comment:8 Changed 7 years ago by Christophe Boyanique <tof-mythtvtrac@…>

I can confirm that patch provided by Bradley Baetz corrects the unwanted deletion of original file in fifo mode. Please consider including it in 0.28.1 release.

comment:9 Changed 6 years ago by perkins1724@…

Can the use case of the -o output file override please be considered / checked as well? It seems the original recording file is getting deleted even though there is no xxxxx.ts.tmp file to move back into its place - this is resulting in orphaned records. refers.

comment:10 Changed 6 years ago by stuartm

Owner: stuartm deleted
Status: acceptednew

comment:11 Changed 6 years ago by JYA

Resolution: Duplicate
Status: newclosed

duplicate of #12845

Note: See TracTickets for help on using tickets.