[mythtv-users] Is anyone transcoding BBC HD using Mencoder?
belcampo
belcampo at zonnet.nl
Fri Mar 26 15:49:17 UTC 2010
Mike Perkins wrote:
> belcampo wrote:
>>
>> Play source to determine start and endposition.
>> Rename source.mpg source.ts, as tsmuxer will not recognize the file as
>> being a ts.
>> tsMuxerGUI `pwd`/source.ts
>> Disable the NAR-audio, if not needed of course, select "Split & cut",
>> enable "Cutting" add Start End values, select Demux, select "Start
>> demuxing".
>> You now will have source.track_5500.264 and source.track_5501.ac3
>> which are perfectly synced sources, which means if merging with
>> mkvmerge or tsmuxer or ffmpeg there will be NO delay for audio or video.
>> You now only have to encode the cutted parts, not with the overlapping
>> parts, with whatever tool you like.
>> On an AMD Athlon(tm) 64 X2 Dual Core Processor 4000+ it encodes the
>> file to 1280x720 at 10fps, so it takes 2.5hours for a 1hour program,
>> with following encoding parameters:
>> ffmpeg -i source.track_5500.264 -an -vcodec libx264 -threads 0 -b
>> 2872k -deinterlace -flags +loop -coder 1 -refs 2 -deblockalpha 0
>> -deblockbeta 0 -partitions +parti4x4+partp8x8+parti8x8+partb8x8
>> -me_method umh -subq 4 -me_range 16 -flags2 +dct8x8+mixed_refs -cmp
>> +chroma -bf 0 -b_strategy 1 -g 250 -keyint_min 25 -sc_threshold 40
>> -maxrate 2500k -qmin 22 -qmax 27 -s 1280x720 -f rawvideo source720p.264
>>
>> I want 'quality', hence qmax 27, with 'low bitrates' 2872k. If it's a
>> low movement source q will be at 22, not wasting bits on, not
>> perceived by me, 'better' quality. While giving adequate quality,
>> -qmax 27, at lowest possible bitrate in fast moving scenes.
>>
>> Merge the encoded results with mkvmerge or MP4Box or tsMuxerGUI to
>> what you want. If you want subtitles, you can extract them with
>> projectx. Doing this for BBCHD, the command is:
>> projectx -ini ~/888.ini -id 0x157F -demux -out . $1
>> where 888.ini is a renamed X.ini from projectx where teletext page 888
>> is defined as the wanted page#.
>> You'll get the uncutted length of the subtitles. With mmg, the gui for
>> mkvmerge, you can define a negative delay for the subtitles, so you're
>> able to get them in sync.
>> mediainfo tells me about "a BBCHD-sourcefile' that
>> Video delay : -1176
>> By using tsMuxerGUI for cutting and demuxing, you don't have to fiddle
>> with these values sources are 'padded' to get them in sync.
>>
> I hope you add this to the wiki. Very interesting.
>
I've no idea how to do that. If someone is able/willing to do that,
copy/paste above and make it a little bit more 'readable', I would be
happy to give some help and other encoding examples.
More information about the mythtv-users
mailing list