seemees
21st October 2009, 07:30
I have some interesting question, is it possible to repack h264 stream (say 8000 kbps) to h264 with other bitrate (1500 kbps)?
Problem steps is:
1. We have an file1.mkv with 1 video stream h264 (8000 kbps or same) and some audio streams.
2. We must get file2.mkv with 1 video stream h264 and same audio streams, video from step 1 but with video bitrate 1500 kbps (transcoding).
3. Video in step 2 must be with maximum possible quality and without full repack into 4:2:0 image and back into h264 - we must using all motion vectors and
some other useful info from original h264.
This, thought, saves a big repacking time and gives a small quality penalty.
Tell me, how to complete this task - some algorightm or ready-steady soft?
And of couse, can we do it in the next release of x264.
Example (rough):
1.options in x264 --takestats file1.mkv
works with file1.mkv - and takes info about motion vectors and qp and lambda and mb-tree (and so on). All info recorded into original.stats file.
2.options in x264 --usestats original.stats --bitrate 1200 -o file2.mkv file1.mkv
and this produce file2.mkv with minimum loss quality and fastest speed (no need statistic and lookahead, all intra and scenecut founded, all b-frame is placed into place :-) ).
Sorry if it is not a good idea to ask something like that, but only you can help me.
With best regards, seemees
Problem steps is:
1. We have an file1.mkv with 1 video stream h264 (8000 kbps or same) and some audio streams.
2. We must get file2.mkv with 1 video stream h264 and same audio streams, video from step 1 but with video bitrate 1500 kbps (transcoding).
3. Video in step 2 must be with maximum possible quality and without full repack into 4:2:0 image and back into h264 - we must using all motion vectors and
some other useful info from original h264.
This, thought, saves a big repacking time and gives a small quality penalty.
Tell me, how to complete this task - some algorightm or ready-steady soft?
And of couse, can we do it in the next release of x264.
Example (rough):
1.options in x264 --takestats file1.mkv
works with file1.mkv - and takes info about motion vectors and qp and lambda and mb-tree (and so on). All info recorded into original.stats file.
2.options in x264 --usestats original.stats --bitrate 1200 -o file2.mkv file1.mkv
and this produce file2.mkv with minimum loss quality and fastest speed (no need statistic and lookahead, all intra and scenecut founded, all b-frame is placed into place :-) ).
Sorry if it is not a good idea to ask something like that, but only you can help me.
With best regards, seemees