Opened 7 years ago
Closed 5 years ago
Last modified 5 years ago
#12479 closed Bug Report - General (fixed)
Mythtranscode HLS heavy distortion on Australian FTA recordings
Reported by: | Owned by: | JYA | |
---|---|---|---|
Priority: | minor | Milestone: | 0.28.1 |
Component: | MythTV - General | Version: | Master Head |
Severity: | medium | Keywords: | HLS, AVF, mythtranscode |
Cc: | Ticket locked: | no |
Description
HLS transcoding via mythtranscode --hls is producing heavily distorted output (see attached screenshot) for recordings from 13/15 Australian Free-To-Air channels (ABC News 24 and SBS 2 are unaffected).
This issue has been present since commit db5c40cfc14dcca456446fe059b01fe90211dd60. Reverting this commit fixes the issue (patch attached). I haven't noticed any foul consequences after applying the patch myself, but welcome all knowledge on any effects this may have.
Attachments (3)
Change History (36)
Changed 7 years ago by
Attachment: | distortion.png added |
---|
Changed 7 years ago by
Attachment: | hls_fix.patch added |
---|
Changed 7 years ago by
Attachment: | myth-version.txt added |
---|
comment:1 Changed 7 years ago by
I have exactly the same HLS distortions on H264 SD channels. HD channels are OK. Reverting commit You mention fixes issue for me. This is definitely regression.
comment:2 Changed 7 years ago by
This is impacting mythtranscode in FIFO mode as well. Reverting the commit identified above has resolved for me although I am not sure if it has other unintended side effects.
On master.
My notes here: http://www.gossamer-threads.com/lists/mythtv/users/591542
comment:3 Changed 7 years ago by
Owner: | set to JYA |
---|---|
Status: | new → accepted |
comment:4 Changed 6 years ago by
Exact same issue here with SD recordings from Dutch TV. HD channels are OK, SD channel recordings transcoded to H264 exhibit heavy distortion. Would be great to see this bug solved sometime soon.
System info:
# mythbackend --version Please attach all output as a file in bug reports. MythTV Version : v0.28-pre-3221-g7292e21 MythTV Branch : master Network Protocol : 87 Library API : 0.28.20151024-1 QT Version : 5.4.2
comment:5 Changed 6 years ago by
Same bug here with french TV which switched one month ago do HD. I was using MythTV 0.27 (from ubuntu 15.10) and everything was working fine. After upgrading to Ubuntu 16.04 with MythTV 0.28 I encounter this bug with some channels that are 1440x1080 sized. Full HD channels (1920x1080) are ok.
Here is an example of TS file mediainfo output:
Format : AVC Format/Info : Advanced Video Codec Format profile : High@L4 Format settings, CABAC : Yes Format settings, ReFrames : 4 frames Codec ID : 27 Duration : 56s 440ms Bit rate : 4 086 Kbps Width : 1 440 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate : 25.000 fps Standard : Component Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : MBAFF Scan type, store method : Separated fields Scan order : Top Field First Bits/(Pixel*Frame) : 0.105 Stream size : 27.5 MiB (89%) Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709
I can confirm that using hls_fix.patch resolves the problem.
I uploaded all material to http://ombos.raceme.org/tof/nobackup/mythtranscode-0.28/ if someone is interrested to investigate, you will find:
transcode.txt detail of commands used and results TF1-1920w-mythtranscode.out screen output (1920 width) TF1-1920w-mythtranscode.raw raw file output (plays correctly on mplayer) FR5-1440w-mythtranscode.out screen output (1440 width) FR5-1440w-mythtranscode.raw raw file output (corrupted) FR5-1440w-mplayer-correct.jpg what should be displayed (original ts file) FR5-1440w-mplayer-corrupted.jpg what is played with mplayer FR5-1440w-mplayer-1472w-1.jpg 1st image with mplayer with 1472 forced width FR5-1440w-mplayer-1472w-2.jpg 2nd image with mplayer with 1472 forced width
comment:6 follow-up: 10 Changed 6 years ago by
Could you post a sample video somewhere? First 50MB will do. Thank you.
comment:7 follow-up: 14 Changed 6 years ago by
Here is a recording (5.8 MB) which mythtranscode --hls distorts http://will.wilhelm.com.au/fails.ts. (File is pre-transcoding)
comment:8 Changed 6 years ago by
Here is another one (first 50 Mb, french DVB-T 1440x1080) which mythtranscode -fifo distorts (same problem i suppose): http://ombos.raceme.org/tof/nobackup/mythtranscode-0.28/2005_20160509043500.ts
comment:9 Changed 6 years ago by
Still a problem in v0.28-46-ge5ce273, let me know if you need more samples
comment:10 Changed 6 years ago by
Replying to jyavenard:
Could you post a sample video somewhere? First 50MB will do. Thank you.
Hi JYA,
any reason why this cannot be reverted?
comment:11 Changed 6 years ago by
Same issue here in FIFO-Mode on german SD-Channels (720x576 and aspect ratio 4:3 or 16:9) after upgrading MythTV from 0.27 to 0.28. Video is distrorted, Audio seems to be ok.
Output of SD transcode (aspect ratio 4:3)
... 2016-08-16 19:42:54.681995 N Transcoding from /var/lib/mythtv/recordings/30487_20160809172000.ts to FIFO 2016-08-16 19:42:54.805519 I AFD: codec MP2 has 2 channels 2016-08-16 19:42:54.805693 I AFD: Opened codec 0x128fa20, id(MP2) type(Audio) 2016-08-16 19:42:54.806031 I AFD: codec MP2 has 2 channels 2016-08-16 19:42:54.806132 I AFD: Opened codec 0x11ca320, id(MP2) type(Audio) 2016-08-16 19:42:54.806231 I AFD: Opened codec 0x11cb9a0, id(DVB_SUBTITLE) type(Subtitle) 2016-08-16 19:42:54.806248 I AFD: codec AC3 has 2 channels 2016-08-16 19:42:54.806698 I AFD: Opened codec 0x11cc5c0, id(AC3) type(Audio) 2016-08-16 19:42:54.810886 I AFD: Opened codec 0x128eee0, id(MPEG2VIDEO) type(Video) 2016-08-16 19:42:54.811379 N AudioPlayer: Enabling Audio 2016-08-16 19:42:54.834871 I Honoring the cutlist while transcoding 2016-08-16 19:42:54.835823 I Cutlist : 0-15744,37064-52482 2016-08-16 19:42:54.835832 I Original Length: 52482 frames 2016-08-16 19:42:54.835840 I New Length : 21320 frames 2016-08-16 19:42:54.870092 I FifoVideoWidth 720 2016-08-16 19:42:54.870114 I FifoVideoHeight 576 2016-08-16 19:42:54.870138 I FifoVideoAspectRatio 1.77778 2016-08-16 19:42:54.870158 I FifoVideoFrameRate 25 2016-08-16 19:42:54.870170 I FifoAudioFormat ac3 2016-08-16 19:42:54.870177 I FifoAudioChannels 2 2016-08-16 19:42:54.870189 I FifoAudioSampleRate 48000 2016-08-16 19:42:54.870352 I Created video fifo: /tmp/mythar14789/vidout 2016-08-16 19:42:54.871591 I Created audio fifo: /tmp/mythar14789/audout 2016-08-16 19:42:54.872006 I Video 720x576@25fps Audio rate: 48000 2016-08-16 19:42:54.872016 I Created fifos. Waiting for connection. 2016-08-16 19:42:54.872061 I Dumping Video and Audio data to fifos 2016-08-16 19:42:54.882977 I Player(0): Fast-Forwarding from 0 to 15546 2016-08-16 19:42:54.937520 I Clean cut: discarding frame from 15546 to 15744: vid 198 aud 380160 2016-08-16 19:42:54.939073 I Audio is 40ms behind video at # 1: auddelta=86143215, viddelta=86143175 2016-08-16 19:42:54.939088 I Dropping video frame 2016-08-16 19:42:55.285101 I Clean cut: end of video cut; audio frames left to cut 1920 2016-08-16 19:42:55.289897 I Clean cut: end of audio cut; vidio frames left to cut 0 ...
Output of mythtranscode --version
MythTV Version : v0.28-47-g29d7067 MythTV Branch : fixes/0.28 Network Protocol : 88 Library API : 0.28.20160309-1 QT Version : 5.2.1 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_crystalhd using_dvb using_firewire using_frontend using_hdhomerun using_vbox using_ceton using_hdpvr using_ivtv using_joystick_menu using_libcec using_libcrypto using_libdns_sd using_libfftw3 using_libxml2 using_lirc using_mheg using_opengl using_opengl_video using_opengl_themepainter using_qtwebkit using_qtscript using_qtdbus using_sdl using_taglib using_v4l2 using_x11 using_xrandr using_xv using_profiletype using_bindings_perl using_bindings_python using_bindings_php using_freetype2 using_mythtranscode using_opengl using_vaapi using_vdpau using_ffmpeg_threads using_mheg using_libass using_libxml2
comment:12 Changed 6 years ago by
@jyavenard Any chance of movement on this? Recent discussion on mailing list has more people hitting this problem.
comment:14 Changed 5 years ago by
Replying to William Wilhelm <will@…>:
Here is a recording (5.8 MB) which mythtranscode --hls distorts http://will.wilhelm.com.au/fails.ts. (File is pre-transcoding)
Could you provide me with the full command line (one that doesn't require to have a full backend setup with recordings) to reproduce the problem?
Thank you. JY
comment:16 Changed 5 years ago by
FIFO mode is a different story... The script used to process the fifo output should be adjusted to account for the new stride size...
comment:17 follow-up: 23 Changed 5 years ago by
Thanks JYA, if you would like someone to test once you have a fix, happy to test but I dont yet have a build environment, if you could provide deb's of publish to your repo I'll happily test.
comment:18 Changed 5 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
comment:23 Changed 5 years ago by
Replying to seven@…:
Thanks JYA, if you would like someone to test once you have a fix, happy to test but I dont yet have a build environment, if you could provide deb's of publish to your repo I'll happily test.
The changes have been pushed to master. They should be in mythbuntu daily build in the next day or so...
Let me know how it goes, if no major problems are found, I'll uplift to fixes/0.28.
I've tested the following setup (they all had issues one way or another)
- --avf (with both 1440 and 1920 wide recordings)
- --hls
- --mpeg2
- --fifodir
- Transcoding to nuv/mpeg4
- Transcoding to nuv/RTjpeg
Some modes had been broken for quite a while I'm afraid.
comment:25 Changed 5 years ago by
The schema is, but the difference with the protocol version will make a backend not work simply due to 28 vs 29.
Could always uplift to 0.28 now, and wait for the consequences... it should be fairly safe
comment:32 Changed 5 years ago by
Milestone: | unknown → 0.28.1 |
---|
comment:33 Changed 5 years ago by
For info: I have just opened ticket #12954 as the changes to NuppelVideoRecorder?.cpp have broken my recording from a USBTV encoder.
Screenshot of distortion