DVBT/avconv

Aus LaborWiki
Wechseln zu: Navigation, Suche

AVCONV[Bearbeiten | Quelltext bearbeiten]

the old name is ffmpeg, can be found here [1] or here [2]

MPEG-2 encoding[Bearbeiten | Quelltext bearbeiten]

DVB-T requieres MPEG2 video codec, but all formats supported by the receiver are valid, for example H264 could be used as well. The same for the audio codec which is AC3 by default.

To convert any video source with avconv specifiy the codec by:

-codec:a ac3 
-codec:v mpeg2video
-qmin 2
'-b:v %2.4fM ' % (muxrate -0.8)

The video bitrate should be less than muxrate - 0.8 MBit/s . Note: replace the python expression !

MPEG-TS muxing[Bearbeiten | Quelltext bearbeiten]

DVB-T requires a MPEG-TS with constant bitrate. The maximum bitrate depends on modulation, bandwidth, coderate and guardinterval. To force avconv to a fixed muxrate use this commands:

'-muxrate %2.4fM ' % muxrate
-f mpegts

avconv will insert null packets to match the forces muxrate. This is only possible if theres enough free space ! Note: replace the python expression !

watermark[Bearbeiten | Quelltext bearbeiten]

Watermarks are a bit tricky and may differ in ffmpeg and avconv. This is using a filter to convert a tga into a movie and name it watermark. The watermark is used as overlay (makes it use the alpha channel) and placed on the upper right corner.

'-filter:v "movie=%s,scale=100:100[watermark];[in][watermark] overlay=main_w-overlay_w:10,scale=1280:720"' % logofilename

Note: replace the python expression !

MPEG-TS program information[Bearbeiten | Quelltext bearbeiten]

You can insert program information using these commands:

-mpegts_original_network_id 0x1122
-mpegts_transport_stream_id 0x3344
-mpegts_service_id 0x5566
-mpegts_pmt_start_pid 0x1500
-mpegts_start_pid 0x150
-metadata service_provider="Some provider"
-metadata service_name="Some Channel"