[mythtv] [mythtv-commits] Ticket #2468: Mythtranscode removing, audio and subtitles and audio tracks swapping places.
Bill Cizek
cizek at rcn.com
Tue Mar 31 18:38:35 UTC 2009
>>
>> I transcode recordings with multiple audio streams daily, I've not
>> seen swapping of the audio streams in a very long time.
>
> I'm seeing removal of the audio track when transcoding DVB-T
> recordings. This happens only for some recordings. Issue has been
> discussed in IRC and I should have 10M example file somewhere..
>
> I think I'll create a fresh ticket for this particular problem at some
> point.
FWIW: Last night I transcoded "24" to cut commercials, and it swapped
the audio tracks:
-Before-
Input #0, mpegts, from '/hdtv/TV/1321_20090330194800.mpg':
Duration: 01:18:52.6, start: 29629.122578, bitrate: 12578 kb/s
Stream #0.0[0x31]: Video: mpeg2video, yuv420p, 1280x720 [PAR 1:1
DAR 16:9], 19000 kb/s, 59.94 tb(r)
Stream #0.1[0x34](eng): Audio: ac3, 48000 Hz, 5:1, 448 kb/s
Stream #0.2[0x35](spa): Audio: ac3, 48000 Hz, mono, 192 kb/s
-After-
Input #0, mpeg, from '/hdtv/TV/1321_20090330194800.mpg.tmp':
Duration: 00:42:44.3, start: 0.335400, bitrate: 10862 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 1280x720 [PAR 1:1
DAR 16:9], 19000 kb/s, 59.94 tb(r)
Stream #0.1[0x81]: Audio: ac3, 48000 Hz, mono, 192 kb/s
Stream #0.2[0x80]: Audio: ac3, 48000 Hz, 5:1, 448 kb/s
------------
But... I run 0.21-fixes, so it could be something that's fixed in trunk
and not backported.
As for removing audio tracks, a long time ago I ran into this (see
ticket #1841). In my case, the transcoder gave up looking for the audio
track before it was found. I've used the following patch for the last
few years to avoid this problem. It increases the max # frames to read
from 45 to 1000, and logs the actual number of frames read before it
found the audio tracks.
Index: mythtv/libs/libavformat/utils.c
===================================================================
--- mythtv/libs/libavformat/utils.c (revision 11597)
+++ mythtv/libs/libavformat/utils.c (working copy)
@@ -1989,7 +1989,7 @@
#define MAX_READ_SIZE 5000000
/** Number of frames to read, max. */
-#define MAX_FRAMES 45
+#define MAX_FRAMES 1000
/** Maximum duration until we stop analysing the stream. */
#define MAX_STREAM_DURATION ((int)(AV_TIME_BASE * 3.0))
@@ -1958,12 +1958,16 @@
(read_size >= MAX_READ_SIZE || read_packets >=
MAX_FRAMES) ||
(hasvideo && hasaudio)) {
/* if we found the info for all the codecs, we can stop */
+ av_log(ic, AV_LOG_INFO, "Stopping1 after %d bytes, %d
frames, hasvideo = %d, hasaudio = %d\n",
+ read_size, read_packets, hasvideo, hasaudio);
ret = count;
break;
}
}
/* we did not get all the codec info, but we read too much data */
if (read_size >= MAX_READ_SIZE) {
+ av_log(ic, AV_LOG_INFO, "Stopping2 after %d bytes, %d
frames, hasvideo = %d, hasaudio = %d\n",
+ read_size, read_packets, hasvideo, hasaudio);
ret = count;
break;
}
More information about the mythtv-dev
mailing list