ffmpegmpegmpeg2-tsdvb-t

How I can convert any mp4 to adv8dvbt23.ts file?


I can download http://www.w6rz.net/adv8dvbt23.ts.
And there are many samples for dvbt sample ts files.

But, I want to convert my video file to TS file for dvbt. First, I checked on google, but I cannot find any answer. I think, this does not make sense, or, the way of thinking may have been wrong.

FFmpeg can used for this? but, there is no any parmameter for Transmit mode, QAM / 64QAB, guard interval.


Solution

  • FFmpeg can used for this? but, there is no any parmameter for Transmit mode, QAM / 64QAB, guard interval.

    As I explained already:

    ffmpeg doesn't know anything about RF things like Constellation type; it is just a tool to transcode between different video formats. .ts is for "transport stream", and it's the video container format that DVB uses. The GNU Radio transmit flowgraphs on the other hand know nothing about video things – all they do is take the bits from a file. So that file needs to be in a format that the receiver would understand, and that's why I instructed you to use FFMPEG with the parameters you need. Since I don't know which bitrate you're planning on transmitting, I can't help you with how to use ffmpeg

    So, you need to generate video data that your DVB-T receiver understands, but more importantly even, you need to put them in a container that ensures constant bitrate.

    As pointed out in a different comment to your ham.stackexchange.com question about the topic, your prime source of examples would be GNU Radio's own gr-dtv module; when you look into gnuradio/gr-dtv/examples/README.dvbt, you'll find a link to https://github.com/drmpeg/dtv-utils , W6RZ's own tooling :)

    There you'll find the tools necessary to calculate the exact stream bitrate you need your MPEG transport stream to have. Remember, a DVB-T transmitter has to transmit at a constant bits per second, so your video container must be constant-bitrate. That's why a transport stream pads the video data to achieve constant rate.

    Then, you'll use ffmpeg to transcode your video and put into the transport stream container:

     ffmpeg -re -i inputvideo.mpeg \
            -vcodec mpeg2video \
            -s 720x576          #resolution; this is a good choice, since most TVs will deal with it \
            -r 25               #frames per second, use 25\
            -flags cgop+ilme -sc_threshold 1000000000 #MPEG codec options\
            -b:v 2M             #Video *codec data* bit rate (defines video quality). Must be lower than stream bit rate, so < muxrate-(audio bitrate)\
            -minrate:v 2M -maxrate:v 2M #enforce constant video bit rate\
            -acodec mp2 -ac 2 -b:a 192k #audio codec, quality and bitrate\
            -muxrate ${RATE FROM TOOL}
            -f mpegts #specify you want a MPEG Transport Stream container as output\
            outputfile.ts