Index: programs/mythtranscode/mpeg2fix.cpp =================================================================== --- programs/mythtranscode/mpeg2fix.cpp (revision 23357) +++ programs/mythtranscode/mpeg2fix.cpp (working copy) @@ -746,6 +746,8 @@ return 0; } + mkvfile = !strcmp(inputFC->iformat->name, "mkv") ? 1 : 0; + if (offset) av_seek_frame(inputFC, vid_id, offset, AVSEEK_FLAG_BYTE); @@ -2576,6 +2578,12 @@ if (!InitAV(fname.constData(), NULL, 0)) return TRANSCODE_EXIT_UNKNOWN_ERROR; + if (mkvfile) + { + VERBOSE(MPF_IMPORTANT, "MKV seek table is unsupported"); + return TRANSCODE_EXIT_UNKNOWN_ERROR; + } + av_init_packet(&pkt); while (av_read_frame(inputFC, &pkt) >= 0) Index: programs/mythtranscode/main.cpp =================================================================== --- programs/mythtranscode/main.cpp (revision 23357) +++ programs/mythtranscode/main.cpp (working copy) @@ -568,7 +568,7 @@ return TRANSCODE_EXIT_REMOTE_FILE; } - if (outfile.isNull()) + if (outfile.isNull() && !build_index) outfile = infile + ".tmp"; if (jobID >= 0) @@ -576,15 +576,16 @@ Transcode *transcode = new Transcode(pginfo); - VERBOSE(VB_GENERAL, QString("Transcoding from %1 to %2") - .arg(infile).arg(outfile)); + if (!build_index) + VERBOSE(VB_GENERAL, QString("Transcoding from %1 to %2") + .arg(infile).arg(outfile)); if (showprogress) transcode->ShowProgress(true); if (!recorderOptions.isEmpty()) transcode->SetRecorderOptions(recorderOptions); int result = 0; - if (!mpeg2) + if (!mpeg2 && !build_index) { result = transcode->TranscodeFile(infile, outfile, profilename, useCutlist, @@ -595,7 +596,7 @@ } int exitcode = TRANSCODE_EXIT_OK; - if ((result == REENCODE_MPEG2TRANS) || mpeg2) + if ((result == REENCODE_MPEG2TRANS) || mpeg2 || build_index) { void (*update_func)(float) = NULL; int (*check_func)() = NULL; @@ -647,7 +648,9 @@ { if (jobID >= 0) JobQueue::ChangeJobStatus(jobID, JOB_STOPPING); - VERBOSE(VB_GENERAL, QString("Transcoding %1 done").arg(infile)); + VERBOSE(VB_GENERAL, QString("%1 %2 done") + .arg(build_index ? "Building Index for" : "Transcoding") + .arg(infile)); } else if (result == REENCODE_CUTLIST_CHANGE) { Index: programs/mythtranscode/mpeg2fix.h =================================================================== --- programs/mythtranscode/mpeg2fix.h (revision 23357) +++ programs/mythtranscode/mpeg2fix.h (working copy) @@ -244,6 +244,7 @@ int aud_stream_count; int64_t ptsIncrement; int64_t ptsOffset; //was initPTS + bool mkvfile; int discard; //control options