Opened 10 years ago
Closed 10 years ago
Last modified 10 years ago
#12430 closed Bug Report - General (fixed)
HLS transcoding broken on 0.27.4
Reported by: | Owned by: | JYA | |
---|---|---|---|
Priority: | minor | Milestone: | 0.27.6 |
Component: | MythTV - HTTP Streaming | Version: | 0.27-fixes |
Severity: | medium | Keywords: | HLS, transcoding, audio |
Cc: | Ticket locked: | no |
Description
On 0.27.4, when doing an HLS transcode of a HD (MCH audio) recording, the end result is all of the video is in the final segment file, and there is no audio track.
I hear that master doesn't have this problem.
---
This is a compound problem. The last good commit is 3.152.926bb8d. The next commit 3.153.db74cee creates normal segment files, but has garbled audio. That is the first problem.
After that, 3.154.07d4b2c puts all the video in the final av segment file and no audio tracks are written anywhere. I watched the files being written, only html/m3u8 get data until it gets to the final av and seems to write it all out of a buffer.
I noticed the 3.152.mi has "Mode extension: MS Stereo" and 3.153.mi does not.
-rw-r--r-- 1 mythtv mythtv 193M Apr 14 12:43 1421_20150414000000.mpg.480x272_800kV_64kA.av.000180.ts -rw-r--r-- 1 mythtv mythtv 13K Apr 14 12:43 1421_20150414000000.mpg.480x272_800kV_64kA.ao_32kA.m3u8 -rw-r--r-- 1 mythtv mythtv 13K Apr 14 12:43 1421_20150414000000.mpg.480x272_800kV_64kA.av.m3u8 -rw-r--r-- 1 mythtv mythtv 297 Apr 14 12:35 1421_20150414000000.mpg.480x272_800kV_64kA.html -rw-r--r-- 1 mythtv mythtv 210 Apr 14 12:35 1421_20150414000000.mpg.480x272_800kV_64kA.m3u8 -rw-r--r-- 1 mythtv mythtv 0 Apr 14 12:35 1421_20150414000000.mpg.480x272_800kV_64kA.ao_32kA.000001.ts -rw-r--r-- 1 mythtv mythtv 0 Apr 14 12:36 1421_20150414000000.mpg.480x272_800kV_64kA.ao_32kA.000002.ts -rw-r--r-- 1 mythtv mythtv 0 Apr 14 12:36 1421_20150414000000.mpg.480x272_800kV_64kA.ao_32kA.000003.ts -rw-r--r-- 1 mythtv mythtv 0 Apr 14 12:36 1421_20150414000000.mpg.480x272_800kV_64kA.ao_32kA.000004.ts -rw-r--r-- 1 mythtv mythtv 0 Apr 14 12:36 1421_20150414000000.mpg.480x272_800kV_64kA.ao_32kA.000005.ts -rw-r--r-- 1 mythtv mythtv 0 Apr 14 12:36 1421_20150414000000.mpg.480x272_800kV_64kA.ao_32kA.000006.ts -rw-r--r-- 1 mythtv mythtv 0 Apr 14 12:36 1421_20150414000000.mpg.480x272_800kV_64kA.ao_32kA.000007.ts ... -rw-r--r-- 1 mythtv mythtv 0 Apr 14 12:35 1421_20150414000000.mpg.480x272_800kV_64kA.av.000001.ts -rw-r--r-- 1 mythtv mythtv 0 Apr 14 12:36 1421_20150414000000.mpg.480x272_800kV_64kA.av.000002.ts -rw-r--r-- 1 mythtv mythtv 0 Apr 14 12:36 1421_20150414000000.mpg.480x272_800kV_64kA.av.000003.ts -rw-r--r-- 1 mythtv mythtv 0 Apr 14 12:36 1421_20150414000000.mpg.480x272_800kV_64kA.av.000004.ts -rw-r--r-- 1 mythtv mythtv 0 Apr 14 12:36 1421_20150414000000.mpg.480x272_800kV_64kA.av.000005.ts -rw-r--r-- 1 mythtv mythtv 0 Apr 14 12:36 1421_20150414000000.mpg.480x272_800kV_64kA.av.000006.ts -rw-r--r-- 1 mythtv mythtv 0 Apr 14 12:36 1421_20150414000000.mpg.480x272_800kV_64kA.av.000007.ts -rw-r--r-- 1 mythtv mythtv 0 Apr 14 12:36 1421_20150414000000.mpg.480x272_800kV_64kA.av.000008.ts ...
mythbackend --version Please attach all output as a file in bug reports. MythTV Version : v0.27.4-42-g628183a-dirty MythTV Branch : makepkg Network Protocol : 77 Library API : 0.27.20141016-1 QT Version : 4.8.6 Options compiled in:
linux debug use_hidesyms using_alsa using_oss using_pulse using_pulseoutput using_backend using_bindings_perl using_bindings_python using_bindings_php using_dvb using_frontend using_joystick_menu using_libcrypto using_libdns_sd using_libfftw3 using_libxml2 using_libudf using_lirc using_mheg using_opengl using_opengl_video using_qtwebkit using_qtscript using_qtdbus using_taglib using_x11 using_xrandr using_xv using_debugtype using_bindings_perl using_bindings_python using_bindings_php using_mythtranscode using_opengl using_vaapi using_vdpau using_ffmpeg_threads using_mheg using_libass using_libxml2 using_libudf
libx264 144.20150223
lame 3.99.5
Attachments (9)
Change History (23)
comment:1 Changed 10 years ago by
I think I'm getting bit by this bug as well. Does your mythtranscode files get flooded with:
2015-04-17 21:06:22.355462 I [2979/2997] VideoDecodeBuffer avformatdecoder.cpp:4747 (ProcessAudioPacket) - AFD: Audio stream changed 2015-04-17 21:06:22.396864 I [2979/2997] VideoDecodeBuffer avformatdecoder.cpp:4747 (ProcessAudioPacket) - AFD: Audio stream changed 2015-04-17 21:06:22.411912 I [2979/2997] VideoDecodeBuffer avformatdecoder.cpp:4747 (ProcessAudioPacket) - AFD: Audio stream changed 2015-04-17 21:06:22.426489 I [2979/2997] VideoDecodeBuffer avformatdecoder.cpp:4747 (ProcessAudioPacket) - AFD: Audio stream changed 2015-04-17 21:06:22.454997 I [2979/2997] VideoDecodeBuffer avformatdecoder.cpp:4747 (ProcessAudioPacket) - AFD: Audio stream changed 2015-04-17 21:06:22.483471 I [2979/2997] VideoDecodeBuffer avformatdecoder.cpp:4747 (ProcessAudioPacket) - AFD: Audio stream changed 2015-04-17 21:06:22.518768 I [2979/2997] VideoDecodeBuffer avformatdecoder.cpp:4747 (ProcessAudioPacket) - AFD: Audio stream changed 2015-04-17 21:06:22.520174 I [2979/2997] VideoDecodeBuffer avformatdecoder.cpp:4747 (ProcessAudioPacket) - AFD: Audio stream changed 2015-04-17 21:06:22.539793 I [2979/2997] VideoDecodeBuffer avformatdecoder.cpp:4747 (ProcessAudioPacket) - AFD: Audio stream changed 2015-04-17 21:06:22.558419 I [2979/2997] VideoDecodeBuffer avformatdecoder.cpp:4747 (ProcessAudioPacket) - AFD: Audio stream changed 2015-04-17 21:06:22.587126 I [2979/2997] VideoDecodeBuffer avformatdecoder.cpp:4747 (ProcessAudioPacket) - AFD: Audio stream changed
comment:2 Changed 10 years ago by
FYI, I think I've tracked down the problem to any video that has AC3 audio. I'm able to succesfully do HLS transodes on non-AC3 videos, but all of my videos that contain AC3 audio fail.
comment:3 Changed 10 years ago by
I've been trying different combinations for skd5aner and the only one that fails for me is also ones with ac3 audio. Attaching the mythtranscode log and ffmpeg -i on a segment file.
comment:4 Changed 10 years ago by
It's not the AC3, it's the MCH->2CH that bugs it. I tested 6ch AC3/DTS/AAC (all failed) and 2ch AC3/AAC (all passed).
Changed 10 years ago by
Attachment: | 3.152.1.log added |
---|
Changed 10 years ago by
Attachment: | 3.154.1.log added |
---|
comment:6 Changed 10 years ago by
Keywords: | audio added |
---|
Looking at where the problem commit is included
$ git tag --contains 926bb8d v0.27.4 v0.27.5
as well as in master
$ git branch --contains 0641cd9ac3eb142f239b70085bac459f3694eadd * master
The change itself is pretty trivial https://code.mythtv.org/cgit/mythtv/commit/?id=0641cd9ac3eb142f239b70085bac459f3694eadd
So the questions are, what is the readInternalMode designed to do, and why isn't the read ahead thread running?
Regards Stuart
comment:7 Changed 10 years ago by
Thanks, but that was the last good commit. The problem is the two commits that followed it, both in avformatdecoder.cpp.
Something in db74cee causes garbled audio.
In the third hunk of 07d4b2c, ctx->channels is replaced with requested_channels which aren't equivalent. When going from MCH->2ch, ctx->channels is likely 6 and requested_channels is 2. I think this causes the loop at SetupAudioStream? (info==audioIn) and no audio is written.
I have looked at avformatdecoder.cpp changes in master and didn't see anything of interest.
comment:8 Changed 10 years ago by
Owner: | changed from cpinkham to JYA |
---|---|
Status: | new → assigned |
jya, the changesets that are indicated to be causing problems are ones you've committed. Are you able to comment on what is happening here?
comment:9 Changed 10 years ago by
There is a lot of feedback, logs, and even work that track down the specific changesets that caused this failure. I know it's generally frowned up to bump a ticket, but are there any devs that can take this on? HLS is completely broken on all of my recordings within 0.27-fixes due to this bug and it makes it impossible to use any of the apps out there that I'd love to be able to let my family leverage while away from the house.
comment:10 follow-up: 11 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:11 follow-up: 12 Changed 10 years ago by
Replying to Jean-Yves Avenard <jyavenard@…>:
07d4b2cf93b6750f15ded5252ea5f1da0f3151a4 has also been reverted. Confirmed it is fixed.
Thanks, Jean-Yves.
comment:12 Changed 10 years ago by
Replying to Frank Phillips <fphillips81@…>:
Replying to Jean-Yves Avenard <jyavenard@…>:
07d4b2cf93b6750f15ded5252ea5f1da0f3151a4 has also been reverted. Confirmed it is fixed.
Thanks, Jean-Yves.
I meant db74cee06907c91cc9747d24381b8b7231352e59 has also been reverted
comment:13 Changed 10 years ago by
The surprising thing is that it works in master; which at the time was using exactly the same ffmpeg and has almost identical playback code
comment:14 Changed 10 years ago by
Milestone: | unknown → 0.27.6 |
---|
mediainfo for last good commit