Re: [vdr] How to convert a JPEG image to an HD video frame?

2011-07-24 Thread Udo Richter
Am 23.07.2011 16:57, schrieb Klaus Schmidinger:
   jpegtopnm $Pict |
   pnmscale --xscale=$ScaleW --yscale=$ScaleH |
   pnmpad --black --width $SW --height $SH |
   ppmtoy4m -F $framerate -I p -S 420mpeg2 |
   mpeg2enc -f 3 -b 12500 -a $aspect -q 1 -n $system2 -o $Mpeg
 
 While this works fine for SD video, I can't seen to figure
 out how to make this work for an HD video output device.

I've played around with this a bit, but it seems as if at least my
mpeg2enc (1:1.9.0-0.7, debian-multimedia.org) doesn't like HD
resolutions. It has some support for ATSC HD (-f 13), but then doesn't
like european frame rates.

Best chances are probably to find some other encoder that accepts an
420mpeg2 pipe as input and can encode HD mpeg2 or h264 out of it.

Cheers,

Udo

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] How to convert a JPEG image to an HD video frame?

2011-07-24 Thread André Weidemann

Hi Klaus,

On 23.07.2011 16:57, Klaus Schmidinger wrote:

The VDR plugin 'pictures' (part of the original VDR archive)
uses a Perl script named 'pic2mpg', which converts a JPEG
image into an MPEG frame that can be displayed directly
by VDR's primary output device. This is done in essence
by the command sequence

jpegtopnm $Pict |
pnmscale --xscale=$ScaleW --yscale=$ScaleH |
pnmpad --black --width $SW --height $SH |
ppmtoy4m -F $framerate -I p -S 420mpeg2 |
mpeg2enc -f 3 -b 12500 -a $aspect -q 1 -n $system2 -o $Mpeg

(see the actual script for the complete working environment).

While this works fine for SD video, I can't seen to figure
out how to make this work for an HD video output device.
The video frame should be a 1080i frame in my case (my tv
can't handle 1080p), but could optionally also be 720p or
1080p, depending on the actual tv's capabilities.

Can anybody give me a pointer how this script could generate
HD video frames?


I have not used mpeg2enc at all. I usually use convert from ImageMagick 
and ffmpeg to convert things. You might want to give those two a try.


Here are two simple lines to convert a jpg image to mpeg2:

convert $Pict -background '#00' -resize 1920x1080 -gravity center 
-extent 1920x1080 /tmp/test.jpg
ffmpeg -i /tmp/temp.jpg -an -vcodec mpeg2video -b 2500 -s 1920x1080 
-qscale 2 -f mpeg2video $Mpeg


Note: Depending on your distro, ffmpeg may not support mpeg2 video encoding.


For mpeg4 the ffmpeg line looks like this:
ffmpeg -i /tmp/temp.jpg -an -vcodec mpeg4 -b 2500 -s 1920x1080 -qscale 2 
-threads 4 -f mp4 $Mpeg


For libx264 it looks like this:
ffmpeg -i /tmp/temp.jpg -an -vcodec libx264 -vpre lossless_ultrafast -s 
1920x1080 -qscale 2 -threads 4 -f mp4 $Mpeg


The -vpre parameter requires a preset. They can usually be found under 
/usr/share/ffmpeg/libx264-*.ffpreset.


If you want a 10 second video at 25 fps, you can do it like this:

ffmpeg -loop_input -t 10 -r 25 -i /tmp/temp.jpg -an -vcodec mpeg4 -b 
2500 -s 1920x1080 -qscale 2 -threads 4 -f mp4 $Mpeg


You may want to adjust the number of threads according to the number of 
cores in your machine.



André

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] VDR Issues with DVB-T Services in Israel

2011-07-24 Thread Barak Nahari
Hi.
I'm trying to get vdr working with DVB-T Services in Israel.
I think that something maybe off with the transmission because I can watch
the dvb-t stream with VLC, MuMuDVB but not with VDR and TVHEADEND. (In
windows platform there isn't any issue, working with MediaPortal, MC7)
I may add that I've really basic skills with linux and very limited
experience with vdr.
My goal is to set VDR as a TV server and XBMC machines as clients.
I've followed this guide http://forum.xbmc.org/showthread.php?t=62696  and
installed on ubuntu 11.04.

My scan template
# Initial scan config for Israel
# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
T 53800 8MHz 2/3 NONE QAM16 8k 1/32 AUTO
T 51400 8MHz 2/3 NONE QAM16 8k 1/32 AUTO

Successfully found and config the channels, installed vnsiserver.
When trying to watch the channels with xbmc, xbmc connecting and
disconnecting to vdr constantly (while i can see the channels listing on
xbmc).
I had no idea where to find the vdr log file, and didn't knew how to watch
vdr stream without xbmc, so i've installed vdr-fbfe plugin run it and got
allot of errors, you can see them in the attached file vdr-fbfe.txt.

I had no idea where the problem origin, so i've followed this guide
http://forum.xbmc.org/showthread.php?t=45314 to manual compile everything i
could, that didn't help.

I'm using a usb dvb-t dongle based on afatech af9015 chip running a
virtualbox ubuntu machine.
I've also tried a usb dvb-t dongle based on ite9135 chip (had to manual
compile drivers).


More info

Using vlc to save the ts stream
C:\Program Files\VideoLAN\VLC\vlc.exe   dvbt://frequency=53800
--demux=dump :demuxdump-file=D:\test.ts
you can get it from here http://www.2shared.com/file/9QZtoJrZ/test.html

Scan information in scanlog.txt file.
Stream info in streaminfo.txt file.

Information on this issue in TVHEADEND
https://www.lonelycoder.com/redmine/issues/251.


I would be happy to get vdr working.

Thanks in advance,
Barak.
ubuntu@ubuntu-desktop:~$ sudo vdr-fbfe 
vdr-fbfe 1.0.90-cvs  (build with xine-lib 1.1.90, using xine-lib 1.1.90)


VDR server not given, searching ...
[2255] [discovery] Replacing broadcast source address 10.0.2.15 with 
server-given address 127.0.0.1
Found VDR server: host 127.0.0.1, port 37890
[2255] [vdr-fbfe]  fbfe_display_open: failed to set /dev/tty to graphics mode
[2255] [vdr-fbfe] (ERROR (xine_fbfe_frontend.c,180): Invalid argument)
[2255] [input_vdr] Connecting (control) to tcp://127.0.0.1:37890 ...
[2255] [input_vdr] Server greeting: VDR-1.7.17 xineliboutput-1.0.90-cvs READY
[2255] [input_vdr] Connected (control) to tcp://127.0.0.1:37890
[2255] [input_vdr] Connecting (data) to 
pipe:///var/lib/vdr/plugins/xineliboutput/pipes.2240/pipe.0
[2255] [input_vdr] Data stream connected (PIPE)
[2255] [input_vdr] WARNING: xine-engine setting 
engine.buffers.audio_num_buffers:230 istoo low for HD-playback! Please use 
values between 500-1000!
[2255] [input_vdr] WARNING: Video output driver reports it does not support 
unscaled overlays !
[2255] [demux_vdr] Using decoder libmpeg2 for mpeg2 video
[2255] [demux_vdr] Using decoder FFmpeg for H.264 video


Press Esc to exit

[2268] [demux_vdr] PMT changed, resetting demuxer
[h264 @ 0x92a28c0]non-existing PPS 0 referenced
[h264 @ 0x92a28c0]decode_slice_header error
[h264 @ 0x92a28c0]no frame!
[h264 @ 0x92a28c0]non-existing PPS 0 referenced
[h264 @ 0x92a28c0]decode_slice_header error
[h264 @ 0x92a28c0]no frame!
[h264 @ 0x92a28c0]number of reference frames exceeds max (probably corrupt 
input), discarding one
Last message repeated 261 times
[h264 @ 0x92a28c0]cabac decode of qscale diff failed at 13 8
[h264 @ 0x92a28c0]error while decoding MB 13 8, bytestream (43288)
[h264 @ 0x92a28c0]concealing 1296 DC, 1296 AC, 1296 MV errors
[h264 @ 0x92a28c0]concealing 871 DC, 871 AC, 871 MV errors
[h264 @ 0x92a28c0]Reference 2 = 2
[h264 @ 0x92a28c0]error while decoding MB 30 6, bytestream (2177)
[h264 @ 0x92a28c0]concealing 1369 DC, 1369 AC, 1369 MV errors
[h264 @ 0x92a28c0]cabac decode of qscale diff failed at 44 6
[h264 @ 0x92a28c0]error while decoding MB 44 6, bytestream (13768)
[h264 @ 0x92a28c0]concealing 1355 DC, 1355 AC, 1355 MV errors
[h264 @ 0x92a28c0]concealing 1389 DC, 1389 AC, 1389 MV errors
[h264 @ 0x92a28c0]concealing 1495 DC, 1495 AC, 1495 MV errors
[h264 @ 0x92a28c0]top block unavailable for requested intra4x4 mode -1 at 40 0
[h264 @ 0x92a28c0]error while decoding MB 40 0, bytestream (69898)
[h264 @ 0x92a28c0]concealing 1620 DC, 1620 AC, 1620 MV errors
[h264 @ 0x92a28c0]concealing 1393 DC, 1393 AC, 1393 MV errors
[h264 @ 0x92a28c0]concealing 1216 DC, 1216 AC, 1216 MV errors
[h264 @ 0x92a28c0]number of reference frames exceeds max (probably corrupt 
input), discarding one
[h264 @ 0x92a28c0]concealing 1461 DC, 1461 AC, 1461 MV errors
[h264 @ 0x92a28c0]concealing 1301 DC, 1301 AC, 1301 MV errors
[h264 @ 0x92a28c0]error while decoding MB 40 35, bytestream (-8)
[h264 @ 0x92a28c0]concealing 54 DC, 54 AC,