Log in

View Full Version : FFMpeg ttxt subtitles 'Invalid data found when processing input'


Selur
27th December 2022, 11:04
I got a ttxt file with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<!--GPAC 3GPP Text Stream-->
<TextStream version="1.1">
<TextStreamHeader layer="0" translation_x="0" width="1024" height="144" translation_y="576">
<TextSampleDescription verticalText="no" verticalJustification="bottom" backColor="00 00 00 00" horizontalJustification="center" fillTextRegion="no" continuousKaraoke="no" scroll="None">
<FontTable>
<FontTableEntry fontID="1" fontName="Serif"/>
</FontTable>
<TextBox left="0" bottom="0" right="0" top="0"/>
<Style color="ff ff ff ff" fontSize="18" styles="Normal"/>
</TextSampleDescription>
</TextStreamHeader>
<TextSample xml:space="preserve" sampleTime="00:00:00.000"/>
<TextSample xml:space="preserve" sampleTime="00:00:44.712">As quickly as you can,
snatch the pebble from my hand.</TextSample>
</TextStream>


Mp4Box has no problem with it and can mux it without an issue.
FFmpeg on the other hand reports 'Invalid data found when processing input'.

even adding '-loglevel trace' only gives

Opening an input file: G:\Output\test_5m_0_en.ttxt.
[NULL @ 000001c091321c00] Opening 'G:\Output\test_5m_0_en.ttxt' for reading
[file @ 000001c0911ba8c0] Setting default whitelist 'file,crypto,data'
[AVIOContext @ 000001c08f92e700] Statistics: 802 bytes read, 0 seeks
G:\Output\test_5m_0_en.ttxt: Invalid data found when processing input
[AVIOContext @ 000001c0911bac00] Statistics: 65881 bytes read, 2 seeks


=> Does anyone have an idea what the problem is?

Cu Selur