Mailing List Archive

Mythtranscode: Deadlock detected.
Hello,

I have done a simple edit of a tv program: deleted from beginning to
first cut point and from second cut point to end. When playing it in
the frontend, it works great. However I would like to save the part
between the cut points to a separate file, so I used:

$ mythtranscode -m --honorcutlist --showprogress -i /video/mythtv/1021_20221124043500.ts -o /var/tmp/highway-signs.mpg
2022-12-16 16:02:25.112155 C mythtranscode version: [v31.0] www.mythtv.org
2022-12-16 16:02:25.112176 C Qt version: compile: 5.15.2, runtime: 5.15.2
2022-12-16 16:02:28.613395 E Deadlock detected. One buffer is full when the other is empty! Aborting
2022-12-16 16:02:28.615211 E Transcoding /video/mythtv/1021_20221124043500.ts failed

I'm using Debian stable and mythtv from deb-multimedia. Is this error a
known problem? or is it the result of some incorrect option? Is there
anything I can do short of installing v32?

Thanks.

Augustine
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Mythtranscode: Deadlock detected. [ In reply to ]
On 16/12/2022 21:13, A. F. Cano wrote:
> Hello,
>
> I have done a simple edit of a tv program: deleted from beginning to
> first cut point and from second cut point to end. When playing it in
> the frontend, it works great. However I would like to save the part
> between the cut points to a separate file, so I used:
>
> $ mythtranscode -m --honorcutlist --showprogress -i /video/mythtv/1021_20221124043500.ts -o /var/tmp/highway-signs.mpg
> 2022-12-16 16:02:25.112155 C mythtranscode version: [v31.0] www.mythtv.org
> 2022-12-16 16:02:25.112176 C Qt version: compile: 5.15.2, runtime: 5.15.2
> 2022-12-16 16:02:28.613395 E Deadlock detected. One buffer is full when the other is empty! Aborting
> 2022-12-16 16:02:28.615211 E Transcoding /video/mythtv/1021_20221124043500.ts failed
>
> I'm using Debian stable and mythtv from deb-multimedia. Is this error a
> known problem? or is it the result of some incorrect option? Is there
> anything I can do short of installing v32?
>
> Thanks.
>
> Augustine

Here's a reference from 2003 :-) There are later ones too...

https://lists.archive.carbon60.com/mythtv/dev/16350?search_string=One%20buffer%20is%20full%20when%20the%20other%20is%20empty;#16350


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Mythtranscode: Deadlock detected. [ In reply to ]
On 16/12/2022 22:29, John Pilkington wrote:
> On 16/12/2022 21:13, A. F. Cano wrote:
>> Hello,
>>
>> I have done a simple edit of a tv program: deleted from beginning to
>> first cut point and from second cut point to end.  When playing it in
>> the frontend, it works great.  However I would like to save the part
>> between the cut points to a separate file, so I used:
>>
>> $ mythtranscode  -m --honorcutlist --showprogress -i
>> /video/mythtv/1021_20221124043500.ts -o /var/tmp/highway-signs.mpg
>> 2022-12-16 16:02:25.112155 C  mythtranscode version:  [v31.0]
>> www.mythtv.org
>> 2022-12-16 16:02:25.112176 C  Qt version: compile: 5.15.2, runtime:
>> 5.15.2
>> 2022-12-16 16:02:28.613395 E  Deadlock detected.  One buffer is full
>> when the other is empty!  Aborting
>> 2022-12-16 16:02:28.615211 E  Transcoding
>> /video/mythtv/1021_20221124043500.ts failed
>>
>> I'm using Debian stable and mythtv from deb-multimedia.  Is this error a
>> known problem? or is it the result of some incorrect option?  Is there
>> anything I can do short of installing v32?
>>
>> Thanks.
>>
>> Augustine
>
> Here's a reference from 2003 :-)  There are later ones too...
>
> https://lists.archive.carbon60.com/mythtv/dev/16350?search_string=One%20buffer%20is%20full%20when%20the%20other%20is%20empty;#16350
>
>
More constructively: see https://github.com/MythTV/mythtv/issues/588
which referred to master and was closed at the end of July.

I think mythtranscode still fails for h264 content.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Mythtranscode: Deadlock detected. [ In reply to ]
> On 17 Dec 2022, at 6:39 am, John Pilkington <johnpilk222@gmail.com> wrote:
>
> On 16/12/2022 22:29, John Pilkington wrote:
>> On 16/12/2022 21:13, A. F. Cano wrote:
>>> Hello,
>>>
>>> I have done a simple edit of a tv program: deleted from beginning to
>>> first cut point and from second cut point to end. When playing it in
>>> the frontend, it works great. However I would like to save the part
>>> between the cut points to a separate file, so I used:
>>>
>>> $ mythtranscode -m --honorcutlist --showprogress -i /video/mythtv/1021_20221124043500.ts -o /var/tmp/highway-signs.mpg
>>> 2022-12-16 16:02:25.112155 C mythtranscode version: [v31.0] www.mythtv.org
>>> 2022-12-16 16:02:25.112176 C Qt version: compile: 5.15.2, runtime: 5.15.2
>>> 2022-12-16 16:02:28.613395 E Deadlock detected. One buffer is full when the other is empty! Aborting
>>> 2022-12-16 16:02:28.615211 E Transcoding /video/mythtv/1021_20221124043500.ts failed
>>>
>>> I'm using Debian stable and mythtv from deb-multimedia. Is this error a
>>> known problem? or is it the result of some incorrect option? Is there
>>> anything I can do short of installing v32?
>>>
>>> Thanks.
>>>
>>> Augustine
>> Here's a reference from 2003 :-) There are later ones too...
>> https://lists.archive.carbon60.com/mythtv/dev/16350?search_string=One%20buffer%20is%20full%20when%20the%20other%20is%20empty;#16350
> More constructively: see https://github.com/MythTV/mythtv/issues/588 <https://github.com/MythTV/mythtv/issues/588> which referred to master and was closed at the end of July.
>
> I think mythtranscode still fails for h264 content.

I've got an h264cut.sh that I use almost daily on Australian commercial and ABC channels that anyone may ask for.
A while back someone used the script and it did not work for them!
It uses mythffmpeg to do lossless cuts and mythffmpeg to paste the segments together again
James
Re: Mythtranscode: Deadlock detected. [ In reply to ]
On Wed, Dec 21, 2022 at 06:59:36AM +0800, James wrote:
> ...
> I've got an h264cut.sh that I use almost daily on Australian commercial
> and ABC channels that anyone may ask for.

I wouldn't mind giving it a try...

> A while back someone used the script and it did not work for them!
> It uses mythffmpeg to do lossless cuts and mythffmpeg to paste the
> segments together again

Does it use the cutpoints created with the front-end, and thus the
mythtv db?

I have managed to do the extraction of the one chunk I needed with
kdenlive, which seems to be a powerful video editor, from a copy of
the file, but I only use the one feature: import a clip (whtch is
the whole show), find the spot for the first cut point, select that
with the -| button, which deletes (or marks for deletion) from
beginning to there, find the other cut point, use the |- button to
delete from there to the end and export the remaining chunk to a file.

Thanks to everyone that responded.

Augustine
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Mythtranscode: Deadlock detected. [ In reply to ]
> On 9 Jan 2023, at 10:24 am, A. F. Cano <afc54@comcast.net> wrote:
>
> On Wed, Dec 21, 2022 at 06:59:36AM +0800, James wrote:
>> ...
>> I've got an h264cut.sh that I use almost daily on Australian commercial
>> and ABC channels that anyone may ask for.
>
> I wouldn't mind giving it a try…

http://tigger.ws/downloads/h264cut.sh

>> A while back someone used the script and it did not work for them!
>> It uses mythffmpeg to do lossless cuts and mythffmpeg to paste the
>> segments together again
>
> Does it use the cutpoints created with the front-end, and thus the
> mythtv db?

Yup

> I have managed to do the extraction of the one chunk I needed with
> kdenlive, which seems to be a powerful video editor, from a copy of
> the file, but I only use the one feature: import a clip (whtch is
> the whole show), find the spot for the first cut point, select that
> with the -| button, which deletes (or marks for deletion) from
> beginning to there, find the other cut point, use the |- button to
> delete from there to the end and export the remaining chunk to a file.

I use ffmpeg. I want it automated and quick

/store # where my recordingd are
/store/Movies/Myth[A-Z] # where the videos go
/store/TScut_work # working dir

change to suit yourself

Example (looking at FE)

h264cut.sh
0108
choose /store/10020_20230108110000.ts
The Unwashed
u # cause I want it stored in Myth_U not Myth_T

It would be trivial to do, but I’ve not done it: If you run 2x without removing the target ffmpeg baulks at ‘overwrite'

James
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Mythtranscode: Deadlock detected. [ In reply to ]
On 09/01/2023 03:20, James Linder wrote:

>
>> On 9 Jan 2023, at 10:24 am, A. F. Cano <afc54@comcast.net> wrote:
>>
>> On Wed, Dec 21, 2022 at 06:59:36AM +0800, James wrote:
>>> ...
>>> I've got an h264cut.sh that I use almost daily on Australian commercial
>>> and ABC channels that anyone may ask for.
>> I wouldn't mind giving it a try…
> http://tigger.ws/downloads/h264cut.sh
>
>>> A while back someone used the script and it did not work for them!
>>> It uses mythffmpeg to do lossless cuts and mythffmpeg to paste the
>>> segments together again
>> Does it use the cutpoints created with the front-end, and thus the
>> mythtv db?
> Yup
>
>> I have managed to do the extraction of the one chunk I needed with
>> kdenlive, which seems to be a powerful video editor, from a copy of
>> the file, but I only use the one feature: import a clip (whtch is
>> the whole show), find the spot for the first cut point, select that
>> with the -| button, which deletes (or marks for deletion) from
>> beginning to there, find the other cut point, use the |- button to
>> delete from there to the end and export the remaining chunk to a file.
> I use ffmpeg. I want it automated and quick
>
> /store # where my recordingd are
> /store/Movies/Myth[A-Z] # where the videos go
> /store/TScut_work # working dir
>
> change to suit yourself
>
> Example (looking at FE)
>
> h264cut.sh
> 0108
> choose /store/10020_20230108110000.ts
> The Unwashed
> u # cause I want it stored in Myth_U not Myth_T
>
> It would be trivial to do, but I’ve not done it: If you run 2x without removing the target ffmpeg baulks at ‘overwrite'
>
> James


How well does it manage to keep the audio in sync?


Having worked on MythArchive for many years one of the big problems was
always cutting the commercials and keeping the audio in sync. The
problem is the length in time of the video frames and audio frames are
not always the same so the more cuts you have the bigger the problem
becomes. If you just top and tail then it will probably be OK since
there is really only the first cut affecting the sync. If you have maybe
a 2 hour movie with 8 or more adverts to cut out then the sync can be
way off at the end. In MythArchive we did things like insert blank audio
packets to try to keep the audio in sync which worked well most of the
time but was not 100% and depended a lot on where the source came from.


It's a long time since I played with this stuff so maybe the source
video and/or the tools available have improved since then? I'm curious
to know.


Paul H.

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Mythtranscode: Deadlock detected. [ In reply to ]
> On 9 Jan 2023, at 7:13 pm, Paul Harrison <mythtv@mythqml.net> wrote:
>
> On 09/01/2023 03:20, James Linder wrote:
>
>>
>>> On 9 Jan 2023, at 10:24 am, A. F. Cano <afc54@comcast.net> wrote:
>>>
>>> On Wed, Dec 21, 2022 at 06:59:36AM +0800, James wrote:
>>>> ...
>>>> I've got an h264cut.sh that I use almost daily on Australian commercial
>>>> and ABC channels that anyone may ask for.
>>> I wouldn't mind giving it a try…
>> http://tigger.ws/downloads/h264cut.sh
>>
>>>> A while back someone used the script and it did not work for them!
>>>> It uses mythffmpeg to do lossless cuts and mythffmpeg to paste the
>>>> segments together again
>>> Does it use the cutpoints created with the front-end, and thus the
>>> mythtv db?
>> Yup
>>
>>> I have managed to do the extraction of the one chunk I needed with
>>> kdenlive, which seems to be a powerful video editor, from a copy of
>>> the file, but I only use the one feature: import a clip (whtch is
>>> the whole show), find the spot for the first cut point, select that
>>> with the -| button, which deletes (or marks for deletion) from
>>> beginning to there, find the other cut point, use the |- button to
>>> delete from there to the end and export the remaining chunk to a file.
>> I use ffmpeg. I want it automated and quick
>>
>> /store # where my recordingd are
>> /store/Movies/Myth[A-Z] # where the videos go
>> /store/TScut_work # working dir
>>
>> change to suit yourself
>>
>> Example (looking at FE)
>>
>> h264cut.sh
>> 0108
>> choose /store/10020_20230108110000.ts
>> The Unwashed
>> u # cause I want it stored in Myth_U not Myth_T
>>
>> It would be trivial to do, but I’ve not done it: If you run 2x without removing the target ffmpeg baulks at ‘overwrite'
>>
>> James
>
>
> How well does it manage to keep the audio in sync?
>
>
> Having worked on MythArchive for many years one of the big problems was always cutting the commercials and keeping the audio in sync. The problem is the length in time of the video frames and audio frames are not always the same so the more cuts you have the bigger the problem becomes. If you just top and tail then it will probably be OK since there is really only the first cut affecting the sync. If you have maybe a 2 hour movie with 8 or more adverts to cut out then the sync can be way off at the end. In MythArchive we did things like insert blank audio packets to try to keep the audio in sync which worked well most of the time but was not 100% and depended a lot on where the source came from.
>
>
> It's a long time since I played with this stuff so maybe the source video and/or the tools available have improved since then? I'm curious to know.

Paul I can honestly proclaim:
I have cut commercials from all the Australian commercial channels and pruned head and tail from ABC which is commercial free (sic)* and for over 1000 recordings I have no sync issues.
I’ve never investigated but ffmpeg is used in copy mode so no transcoding takes place so sync is not an issue.

* “On Sunday we explore … and lots of preamble drivel”
James
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Mythtranscode: Deadlock detected. [ In reply to ]
On 09/01/2023 11:47, James Linder wrote:
>
>
>> On 9 Jan 2023, at 7:13 pm, Paul Harrison <mythtv@mythqml.net> wrote:
>>
>> On 09/01/2023 03:20, James Linder wrote:
>>
>>>
>>>> On 9 Jan 2023, at 10:24 am, A. F. Cano <afc54@comcast.net> wrote:
>>>>
>>>> On Wed, Dec 21, 2022 at 06:59:36AM +0800, James wrote:
>>>>> ...
>>>>> I've got an h264cut.sh that I use almost daily on Australian commercial
>>>>> and ABC channels that anyone may ask for.
>>>> I wouldn't mind giving it a try…
>>> http://tigger.ws/downloads/h264cut.sh
>>>
>>>>> A while back someone used the script and it did not work for them!
>>>>> It uses mythffmpeg to do lossless cuts and mythffmpeg to paste the
>>>>> segments together again
>>>> Does it use the cutpoints created with the front-end, and thus the
>>>> mythtv db?
>>> Yup
>>>
>>>> I have managed to do the extraction of the one chunk I needed with
>>>> kdenlive, which seems to be a powerful video editor, from a copy of
>>>> the file, but I only use the one feature: import a clip (whtch is
>>>> the whole show), find the spot for the first cut point, select that
>>>> with the -| button, which deletes (or marks for deletion) from
>>>> beginning to there, find the other cut point, use the |- button to
>>>> delete from there to the end and export the remaining chunk to a file.
>>> I use ffmpeg. I want it automated and quick
>>>
>>> /store # where my recordingd are
>>> /store/Movies/Myth[A-Z] # where the videos go
>>> /store/TScut_work # working dir
>>>
>>> change to suit yourself
>>>
>>> Example (looking at FE)
>>>
>>> h264cut.sh
>>> 0108
>>> choose /store/10020_20230108110000.ts
>>> The Unwashed
>>> u # cause I want it stored in Myth_U not Myth_T
>>>
>>> It would be trivial to do, but I’ve not done it: If you run 2x without removing the target ffmpeg baulks at ‘overwrite'
>>>
>>> James
>>
>>
>> How well does it manage to keep the audio in sync?
>>
>>
>> Having worked on MythArchive for many years one of the big problems was always cutting the commercials and keeping the audio in sync. The problem is the length in time of the video frames and audio frames are not always the same so the more cuts you have the bigger the problem becomes. If you just top and tail then it will probably be OK since there is really only the first cut affecting the sync. If you have maybe a 2 hour movie with 8 or more adverts to cut out then the sync can be way off at the end. In MythArchive we did things like insert blank audio packets to try to keep the audio in sync which worked well most of the time but was not 100% and depended a lot on where the source came from.
>>
>>
>> It's a long time since I played with this stuff so maybe the source video and/or the tools available have improved since then? I'm curious to know.
>
> Paul I can honestly proclaim:
> I have cut commercials from all the Australian commercial channels and pruned head and tail from ABC which is commercial free (sic)* and for over 1000 recordings I have no sync issues.
> I’ve never investigated but ffmpeg is used in copy mode so no transcoding takes place so sync is not an issue.
>
> * “On Sunday we explore … and lots of preamble drivel”
> James

Hi Paul: I have several cutting scripts, used for different formats.
They have evolved over the years from those still at

https://www.mythtv.org/wiki/MythDVBcut

which don't look elegant but probably still do the job. They all cut at
keyframes. For input selection I now use recordedid to get the full
path to the file.

For most mpeg2 video the Project-X embedded there does its own sync
correction. On good recordings it rarely does much.

For h264 concatenation I now mainly use the ffmpeg concat demuxer,
rather than the ffmpeg concat protocol. Initially AV sync drift was
sometimes a problem but I don't see it now.

I do, however, still find that some h264 recordings need a preliminary
no-cut run before creating and applying the cutlist. More details at

https://github.com/MythTV/mythtv/issues/600

John P

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org