[vdr] How to convert a JPEG image to an I-frame?
Klaus Schmidinger
Klaus.Schmidinger at cadsoft.de
Sun Nov 11 16:12:10 CET 2007
On 11/11/07 16:05, Reinhard Nissl wrote:
> Hi,
>
> Klaus Schmidinger schrieb:
>
>> Looks like it is the file size.
>> I have now changed the line
>>
>> mpeg2enc -f 7 -T 90 -F 3 -np -a 2 -v 0 -o "$TMP2"
>>
>> to
>>
>> mpeg2enc -f 7 -T 40 -F 3 -np -a 2 -v 0 -o "$TMP2"
>>
>> so that the resulting file is about the same size as yours, and now
>> my images also are smooth. However, this most likely means that the
>> picture resolution is now reduced.
>>
>> Maybe sending a large I-frame continuously causes trouble in the FF DVB cards.
>>
>> Is there a way to generate a sequence of one (large) I-frame, followed
>> by some number of P-frames, which indicate that there is no change in
>> the image data? Like creating an MPEG sequence from a set of still
>> images, where all stills are the same.
>
> Hhm, if you set -n 3 for ppmtoy4m, mpeg2enc should detect, that there
> are no changes.
The command sequence I use now looks like this:
pnmscale $S $TMP1 | \
pnmpad -black -width 704 -height 576 | \
ppmntsc --pal | \
ppmtoy4m -F 25:1 -A 4:3 -I p -r -S 420mpeg2 -v 2 -n 3 | \
mpeg2enc -f 7 -a 2 -q 1 -n p -I 0 -T 120 -R 2 -g 10 -G 12 -o "$TMP2"
mplex -f 7 -o "$MPG" "$TMP2"
and results in a file with three I-frames:
INFO: [mplex] VIDEO_STATISTICS: e1
INFO: [mplex] Video Stream length: 316949 bytes
INFO: [mplex] Sequence headers: 3
INFO: [mplex] Sequence ends : 2
INFO: [mplex] No. Pictures : 3
INFO: [mplex] No. Groups : 3
INFO: [mplex] No. I Frames : 3 avg. size105649 bytes
INFO: [mplex] No. P Frames : 0 avg. size 0 bytes
INFO: [mplex] No. B Frames : 0 avg. size 0 bytes
So it's a step forward, but we need to make this one I- and two (or more)
P-frames.
Klaus
More information about the vdr
mailing list