mythtranscode in MythTV v32 is half broken

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
RolleGer
Junior
Posts: 15
Joined: Sun Jun 05, 2022 7:19 pm
Germany

mythtranscode in MythTV v32 is half broken

Post by RolleGer »

I have upgraded my MythTV v31 installation to MythTV v32 with a complete reinstall. Now my customized mythtranscode jobs fail. The predefined mythtranscode profiles work fine (e.g. the transcoding profile: low profile). But my custom transcode job fails.
I use the jobs to export parameters. These parameters go to a bash shell script. This has worked for many MythTV versions up to v31. Now in v32 it fails.

The command line in my shell script is:
mythtranscode --chanid $CHANID --starttime $STARTTIMEUTC --honorcutlist --mpeg2 -o "video.cutted.mpg"
-> in v32 fails (previously it worked)

Now I have halved the problem: The --mpeg2 option is the problematic option (for a lossless copy of the video stream). This option fails. Without this option it worked:
mythtranscode --chanid $CHANID --starttime $STARTTIMEUTC --honorcutlist -o "video.cutted.mpg"
-> works in v32

(Extra note: I made several attempts with the --mpeg2 option and with --honorcutlist and without --honorcutlist. Sometimes a video file with 0 bytes is created. Sometimes a video file is created with audio but without video.)


Used version:
sudo add-apt-repository ppa:mythbuntu/32 (Jun, 01 2022)

mythtranscode --version:
Please attach all output as a file in bug reports.
MythTV Version : v32.0+fixes.202206011303.8347647e42~ubuntu20.04.1
MythTV Branch : fixes/32
Network Protocol : 91
Library API : 32.20200101-1
QT Version : 5.12.8
Options compiled in:
linux profile use_hidesyms using_alsa using_oss using_pulse using_pulseoutput using_backend using_bindings_perl using_bindings_python using_bindings_php using_dvb using_firewire using_frontend using_hdhomerun using_satip using_vbox using_ceton using_joystick_menu using_libcec using_libcrypto using_gnutls using_libdns_sd using_libfftw3 using_libxml2 using_lirc using_mheg using_opengl using_egl using_qtwebkit using_qtscript using_qtdbus using_taglib using_v4l2 using_v4l2prime using_x11 using_system_libbluray using_systemd_notify using_systemd_journal using_drm using_bindings_perl using_bindings_python using_bindings_php using_freetype2 using_mythtranscode using_opengl using_egl using_drm using_vaapi using_nvdec using_vdpau using_ffmpeg_threads using_mheg using_libass using_libxml2 using_libmp3lame
Last edited by RolleGer on Tue Jun 07, 2022 8:13 pm, edited 1 time in total.
RolleGer
Junior
Posts: 15
Joined: Sun Jun 05, 2022 7:19 pm
Germany

Re: mythtranscode in MythTV v32 is half broken

Post by RolleGer »

I have created a ticket (bug report).
Dai_Trying
Junior
Posts: 51
Joined: Tue May 24, 2022 10:18 am
Great Britain

Re: mythtranscode in MythTV v32 is half broken

Post by Dai_Trying »

I had the same (or very similar) problem here viewtopic.php?f=36&t=4866 and although I didn't mention in that thread I did a little testing and transcode worked without the --honorcutlist parameter so this may be where the problem lays.
User avatar
Steve Goodey
Moderator
Posts: 220
Joined: Fri Feb 07, 2014 6:30 pm
Location: Colchester, England
Great Britain

Re: mythtranscode in MythTV v32 is half broken

Post by Steve Goodey »

Dai_Trying wrote:
Mon Jun 06, 2022 9:36 am
I had the same (or very similar) problem here viewtopic.php?f=36&t=4866 and although I didn't mention in that thread I did a little testing and transcode worked without the --honorcutlist parameter so this may be where the problem lays.
Dai_trying any chance you could update that thread with the removal of the --honorcutlist work around?

Thanks.
Don't forget the Wiki.
Dai_Trying
Junior
Posts: 51
Joined: Tue May 24, 2022 10:18 am
Great Britain

Re: mythtranscode in MythTV v32 is half broken

Post by Dai_Trying »

It isn't really a workaround as I was only using mythtranscode to cut out the adverts on my recordings and without --honorcutlist it obviously didn't cut anything, although the recording was slightly smaller which, from what I have read, is due to unused streams being discarded.

I also have abandoned using v32 because of this and no longer have any installations to test with but will try to keep an eye on the bug though and if there is anything to try I will find another machine for testing.
RolleGer
Junior
Posts: 15
Joined: Sun Jun 05, 2022 7:19 pm
Germany

Re: mythtranscode in MythTV v32 is half broken

Post by RolleGer »

For me it is the following situation:
with both options: --honorcutlist --mpeg2 -> the generated video file has an audio channel and a corrupt video channel -> failed!
with only one option: --mpeg2 -> the generated video file is 0 bytes in size -> failed!
with only one option: --honorcutlist -> the generated video file is fine (audio channel + video channel) -> works!
Dai_Trying
Junior
Posts: 51
Joined: Tue May 24, 2022 10:18 am
Great Britain

Re: mythtranscode in MythTV v32 is half broken

Post by Dai_Trying »

I will have to find another machine to test that, I can't be 100% certain but I thought I tried that and it failed for me. I will test and post later with my result.
Dai_Trying
Junior
Posts: 51
Joined: Tue May 24, 2022 10:18 am
Great Britain

Re: mythtranscode in MythTV v32 is half broken

Post by Dai_Trying »

I have run a few tests now on another machine using Debian Bullseye and self compiled binaries (following mythtv documentation) and after setting "Enable auto-transcode after recording" (which I had not done on my previous install) I am able to transcode (like you) without the --mpeg2 (-m) parameter although I have noticed that the resulting file has no media attrbutes set and won't play in mpv or Parole media players but it will play using ffplay. The file can also be converted with ffmpeg to another format to reduce the file size but this is nowhere near as convenient as simply transcoding with the --mpeg2 option for a lossless removal of adverts.
If I use the --mpeg2 (or -m) option I get a segfault see below

Code: Select all

$ mythtranscode --chanid 10005 --starttime 20220607124500 --honorcutlist --mpeg2
2022-06-07 14:33:21.427252 C  mythtranscode version: fixes/32 [v32.0+fixes.20220602.41dfb94-0ubuntu0] www.mythtv.org
2022-06-07 14:33:21.427261 C  Qt version: compile: 5.15.2, runtime: 5.15.2
2022-06-07 14:33:21.427292 I  Debian GNU/Linux 11 (bullseye) (x86_64)
2022-06-07 14:33:21.427293 N  Enabled verbose msgs:  general
2022-06-07 14:33:21.427299 N  Setting Log Level to LOG_INFO
2022-06-07 14:33:21.437783 I  Added logging to the console
2022-06-07 14:33:21.438102 I  Setup Interrupt handler
2022-06-07 14:33:21.438107 I  Setup Terminated handler
2022-06-07 14:33:21.438111 I  Setup Segmentation fault handler
2022-06-07 14:33:21.438113 I  Setup Aborted handler
2022-06-07 14:33:21.438116 I  Setup Bus error handler
2022-06-07 14:33:21.438122 I  Setup Floating point exception handler
2022-06-07 14:33:21.438127 I  Setup Illegal instruction handler
2022-06-07 14:33:21.438138 I  Setup Real-time signal 0 handler
2022-06-07 14:33:21.438145 I  Setup Hangup handler
2022-06-07 14:33:21.438260 N  Using runtime prefix = /usr
2022-06-07 14:33:21.438262 N  Using configuration directory = /home/dave/.mythtv
2022-06-07 14:33:21.438298 I  Assumed character encoding: en_GB.UTF-8
2022-06-07 14:33:21.438592 I  Empty LocalHostName. This is typical.
2022-06-07 14:33:21.438596 I  Using a profile name of: 'Myth32Server' (Usually the same as this host's name.)
2022-06-07 14:33:21.438634 I  Start up testing connections. DB localhost, BE , attempt 0, status dbAwake, Delay: 2000
2022-06-07 14:33:22.452624 N  Setting QT default locale to en_GB
2022-06-07 14:33:22.452633 I  Current locale en_GB
2022-06-07 14:33:22.452673 N  Reading locale defaults from /usr/share/mythtv//locales/en_gb.xml
2022-06-07 14:33:22.480674 I  PowerDBus: Added UPower.Device '/org/freedesktop/UPower/devices/line_power_ACAD'
2022-06-07 14:33:22.481128 I  Power: On AC power
2022-06-07 14:33:22.482871 I  PowerDBus: Added UPower.Device '/org/freedesktop/UPower/devices/battery_BAT1'
2022-06-07 14:33:22.511174 I  Power: Supported actions: Suspend,Hibernate,Restart,Shutdown,HybridSleep
2022-06-07 14:33:22.512599 I  Loading en_gb translation for module mythfrontend
2022-06-07 14:33:22.517683 N  Transcoding from /home/mythtv/Storage/Default/10005_20220607124500.ts to /home/mythtv/Storage/Default/10005_20220607124500.ts.tmp
2022-06-07 14:33:22.517691 I  Honoring the cutlist while transcoding
2022-06-07 14:33:22.518962 I  Opening /home/mythtv/Storage/Default/10005_20220607124500.ts
2022-06-07 14:33:22.527418 I  PES packet size mismatch
2022-06-07 14:33:22.527435 I  Packet corrupt (stream = -1357090048, dts = ).
2022-06-07 14:33:22.527448 I  PES packet size mismatch
2022-06-07 14:33:22.527454 I  Packet corrupt (stream = -1357090048, dts = ).
Handling Segmentation fault
Segmentation fault
but without it, it completes

Code: Select all

$ mythtranscode --chanid 10005 --starttime 20220607124500 --honorcutlist
2022-06-07 14:33:50.234956 C  mythtranscode version: fixes/32 [v32.0+fixes.20220602.41dfb94-0ubuntu0] www.mythtv.org
2022-06-07 14:33:50.234964 C  Qt version: compile: 5.15.2, runtime: 5.15.2
2022-06-07 14:33:50.234987 I  Debian GNU/Linux 11 (bullseye) (x86_64)
2022-06-07 14:33:50.234988 N  Enabled verbose msgs:  general
2022-06-07 14:33:50.234994 N  Setting Log Level to LOG_INFO
2022-06-07 14:33:50.245358 I  Added logging to the console
2022-06-07 14:33:50.245632 I  Setup Interrupt handler
2022-06-07 14:33:50.245637 I  Setup Terminated handler
2022-06-07 14:33:50.245644 I  Setup Segmentation fault handler
2022-06-07 14:33:50.245649 I  Setup Aborted handler
2022-06-07 14:33:50.245654 I  Setup Bus error handler
2022-06-07 14:33:50.245658 I  Setup Floating point exception handler
2022-06-07 14:33:50.245661 I  Setup Illegal instruction handler
2022-06-07 14:33:50.245668 I  Setup Real-time signal 0 handler
2022-06-07 14:33:50.245672 I  Setup Hangup handler
2022-06-07 14:33:50.245763 N  Using runtime prefix = /usr
2022-06-07 14:33:50.245764 N  Using configuration directory = /home/dave/.mythtv
2022-06-07 14:33:50.245788 I  Assumed character encoding: en_GB.UTF-8
2022-06-07 14:33:50.246018 I  Empty LocalHostName. This is typical.
2022-06-07 14:33:50.246021 I  Using a profile name of: 'Myth32Server' (Usually the same as this host's name.)
2022-06-07 14:33:50.246049 I  Start up testing connections. DB localhost, BE , attempt 0, status dbAwake, Delay: 2000
2022-06-07 14:33:51.259953 N  Setting QT default locale to en_GB
2022-06-07 14:33:51.259960 I  Current locale en_GB
2022-06-07 14:33:51.259999 N  Reading locale defaults from /usr/share/mythtv//locales/en_gb.xml
2022-06-07 14:33:51.288838 I  PowerDBus: Added UPower.Device '/org/freedesktop/UPower/devices/line_power_ACAD'
2022-06-07 14:33:51.289466 I  Power: On AC power
2022-06-07 14:33:51.291431 I  PowerDBus: Added UPower.Device '/org/freedesktop/UPower/devices/battery_BAT1'
2022-06-07 14:33:51.322235 I  Power: Supported actions: Suspend,Hibernate,Restart,Shutdown,HybridSleep
2022-06-07 14:33:51.323608 I  Loading en_gb translation for module mythfrontend
2022-06-07 14:33:51.328346 N  Transcoding from /home/mythtv/Storage/Default/10005_20220607124500.ts to /home/mythtv/Storage/Default/10005_20220607124500.ts.tmp
2022-06-07 14:33:51.337241 W  TranscodePlayer: No decoder yet - cannot set transcoding
2022-06-07 14:33:51.337264 I  Player(0): Opening '/home/mythtv/Storage/Default/10005_20220607124500.ts'
2022-06-07 14:33:51.339113 E  VideoProfile: No window!
2022-06-07 14:33:51.339351 E  VideoProfile: No window!
2022-06-07 14:33:51.340099 E  VideoProfile: No window!
2022-06-07 14:33:51.340124 E  VideoProfile: No window!
2022-06-07 14:33:51.356188 I  AFD: codec MP2 has 2 channels
2022-06-07 14:33:51.356351 I  AFD: Opened codec 0x55eaddb38700, id(MP2) type(Audio)
2022-06-07 14:33:51.356415 I  AFD: codec MP2 has 1 channels
2022-06-07 14:33:51.356468 I  AFD: Opened codec 0x55eaddb5a080, id(MP2) type(Audio)
2022-06-07 14:33:51.356643 I  AFD: Opened codec 0x55eaddb12680, id(DVB_SUBTITLE) type(Subtitle)
2022-06-07 14:33:51.356776 I  AFD: Using ffmpeg for video decoding
2022-06-07 14:33:51.357234 I  AFD: Opened codec 0x55eaddb5cb40, id(MPEG2VIDEO) type(Video)
2022-06-07 14:33:51.357341 N  AudioPlayer: Enabling Audio
2022-06-07 14:33:51.370595 I  Honoring the cutlist while transcoding
2022-06-07 14:33:51.372315 I  Cutlist        : 0-2025,13449-19598,41129-44961
2022-06-07 14:33:51.372317 I  Original Length: 44961 frames
2022-06-07 14:33:51.372318 I  New Length     : 32955 frames
2022-06-07 14:33:51.373838 N  Transcode: Looking for autodetect profile: Autodetect from 576i
2022-06-07 14:33:51.382220 N  Transcode: Using autodetect profile: MPEG2
2022-06-07 14:33:51.383783 N  Forcing Recorder option 'videocodec' to ''
2022-06-07 14:33:51.383862 E  RecBase[NULL](): SetOption(): Unknown int option: videocodec: 0
2022-06-07 14:33:51.397185 I  Copying Audio while transcoding Video
2022-06-07 14:33:51.404942 I  TranscodePlayer: Fast-Forwarding from 0 to 2025
strange error flushing buffer ... 
2022-06-07 14:33:51.462285 E  MythSystemEventHandler: SendMythSystemRecEvent() called with empty RecordingInfo
2022-06-07 14:33:51.536683 I  MythCoreContext::ConnectCommandSocket(): Connecting to backend server: 127.0.0.1:6543 (try 1 of 1)
2022-06-07 14:33:51.537582 I  MythCoreContext::CheckProtoVersion(): Using protocol version 91 BuzzOff
2022-06-07 14:34:21.010694 I  TranscodePlayer: Fast-Forwarding from 13449 to 19598
2022-06-07 14:34:51.330409 I  mythtranscode: 49% Completed @ 373.1 fps.
2022-06-07 14:35:11.331719 I  mythtranscode: 65% Completed @ 370.08 fps.
2022-06-07 14:35:20.665763 I  TranscodePlayer: Fast-Forwarding from 41129 to 44961
2022-06-07 14:35:20.767063 N  Transcoding /home/mythtv/Storage/Default/10005_20220607124500.ts done
2022-06-07 14:35:20.767090 I  PowerDBus: Closing interfaces
2022-06-07 14:35:20.767799 I  Waiting for threads to exit.
2022-06-07 14:35:22.167573 I  Exiting
Error: Not all threads were shut down properly: 
Thread TFWWrite is still running
Thread TFWSync is still running
$
So it looks like I'm in the same boat as you...

EDIT:
Just to also note that after transcoding without --mpeg2 the seektable gets removed and so if I need to test again with different options (as I have been doing) I need to re-build it.
white_haired_uncle
Senior
Posts: 276
Joined: Thu Feb 23, 2023 8:55 pm
Location: Safe outside my gilded cage
United States of America

Re: mythtranscode in MythTV v32 is half broken

Post by white_haired_uncle »

Dai_Trying wrote:
Mon Jun 06, 2022 12:05 pm
It isn't really a workaround as I was only using mythtranscode to cut out the adverts on my recordings and without --honorcutlist it obviously didn't cut anything,
I just mark and cut commercials for anything I want to save while watching, then run a lossless transcode through the GUI (the "lossless" option might not be in the GUI anymore, but I still have the profile, and it still works). Someday I'll re-encode some of the large stuff that's in HD that really doesn't need to be, probably using Handbrake (if I have to) or a user job using ffmpeg (once I learn how to translate my HB settings to ffpmeg), but I want to use mythtranscode to deal with the cutlist. Kind of waiting/hoping to see AV1 (possibly in HW) support in mythtranscode.

At least, that's what I did until v32. Transcode in v32 was broken in all kinds of ways.

I just upgraded to v33, and everything is working again the way it did in v30 (don't know about 31, I skipped over it). Don't know why this wasn't in the release notes, I would have put it at the top in big bold letters.
Dai_Trying
Junior
Posts: 51
Joined: Tue May 24, 2022 10:18 am
Great Britain

Re: mythtranscode in MythTV v32 is half broken

Post by Dai_Trying »

I haven't tried V33 yet as I couldn't get V32 working properly so I'm still on V31, I might try compiling V33 and see if I can get that to work, thanks for the info. :)
User avatar
dnalorernst
Developer
Posts: 105
Joined: Mon Feb 17, 2020 8:03 pm
Austria

Re: mythtranscode in MythTV v32 is half broken

Post by dnalorernst »

According https://github.com/MythTV/mythtv/issues/581
mythranscode is known to work since
mythtranscode version: fixes/32 [v32.0+fixes.202206242147.501f85b389~ubuntu22.04.1] www.mythtv.org
and version v32.0+fixes.202207042148.ced41a5f8f~ubuntu22.04.1
At the same time, mythtv/master (which is now v33) was updated too.
In other words, if mythranscode does not work for you with MythTV v32, then update to the latest version of fixes/32.

@RolleGer if it was you who posted in above mentioned issue, then please mark this posting at the first message as "[solved]".
This will help other readers of this topic and avoid confusion.

Roland
Post Reply