[FFmpeg-user] How to get DVB-Teletxt into MP4

Reino Wijnsma rwijnsma at xs4all.nl
Sun Feb 9 18:51:22 EET 2020


On 2020-02-09T14:41:23+0100, Robin A. Jensen via ffmpeg-user <ffmpeg-user at ffmpeg.org> wrote:
> I just made a sample as you describe. But i think it is useless as the copy only contains video, sound and no dvb_teletext.

I forgot -map 0 to return ALL input streams, so: ffmpeg -ss 00:04:45 -i 'Beck_ _je for _je (4).ts' -to 00:05:00 *-map 0* -c copy sample.ts

BUT apparently this is not the recommended method. I wish Carl, instead of shouting to avoid this at all cost, would explain WHY.
I found https://ffmpeg.org/pipermail/ffmpeg-user/2019-October/045728.html.
I understand...

dd if=input.ts bs=188 skip=27888 count=55775 of=output.ts

...for instance would skip 188*27888=5242944bytes (around 5M) and extract 188*55775=10485700 (around 10M), but I don't understand where the 188 comes from.

Also, I think it's very hard to find out what amount of bytes equates to 00:04:45, or isn't it?

On 2020-02-09T15:16:30+0100, Robin A. Jensen via ffmpeg-user <ffmpeg-user at ffmpeg.org> wrote:
>> Hey Reino.
>> Just a test as you suggestet, but it will create a new error. I correctet the channels that need to be encoded.
> ffmpeg -ss 00:04:45 -c:v h264_mmal -i 'Beck_ _je for _je (4).ts' -to 00:05:00 -map 0:0 -c:v h264_omx -b:v 4800k -map 0:2 -c:a copy -map 0:1 -txt_format text -txt_page 599 -c:s mov_text -metadata:s:s language=dan 'Beck _je for _je (4).mp4'
> [...]
> Stream mapping:
>   Stream #0:0 -> #0:0 (h264 (h264_mmal) -> h264 (h264_omx))
>   Stream #0:2 -> #0:1 (copy)
>   Stream #0:1 -> #0:2 (dvb_teletext (libzvbi_teletextdec) -> mov_text (native))
> Error while opening encoder for output stream #0:2 - maybe incorrect parameters such as bit_rate, rate, width or height

What I understand from this https://ffmpeg.org/pipermail/ffmpeg-user/2016-February/030792.html huge thread is that the libzvbi-options are actually input-options and that -fix_sub_duration is probably needed, so...

ffmpeg -ss 00:04:45 -fix_sub_duration -txt_format text -txt_page 599 -c:v h264_mmal -i 'Beck_ _je for _je (4).ts' -to 00:05:00 -map 0:0 -c:v h264_omx -b:v 4800k -map 0:2 -c:a copy -map 0:1 -c:s mov_text -metadata:s:s language=dan 'Beck _je for _je (4).mp4'

...could be worth a try.

-- Reino



More information about the ffmpeg-user mailing list