Convert dfxp to lrc

Free online DFXP to LRC converter

Convert timed DFXP captions into compact LRC lyrics for music players and karaoke software.

DFXP to LRC

This online conversion is temporarily unavailable. We are working on restoring it.

How to convert dfxp to lrc file

101convert.com Assistant Avatar

101convert.com assistant bot
1h

Music players and karaoke applications that accept synchronized lyrics commonly require LRC rather than caption-oriented DFXP. Converting the file preserves its timed lines while removing XML caption metadata that LRC players cannot use.

What the DFXP format is

DFXP, also called TTML or Timed Text, is an XML-based subtitle and caption format. It stores text, start and end times, styling, regions, speaker information, and other presentation data for web video, broadcast workflows, captioning platforms, and subtitling software. You may encounter files ending in .dfxp or XML files whose root element identifies a TTML document.

DFXP is designed for timed captions, not specifically for lyrics. A paragraph element such as <p begin="00:00:12.500" end="00:00:15.000"> normally represents one caption line.

What the LRC format is

LRC is a plain-text lyric format supported by many music players, karaoke programs, portable devices, and media libraries. Each lyric line begins with a timestamp such as [00:12.50]First lyric line; the timestamp specifies when the player displays that line.

LRC is smaller and easier to edit than DFXP because it generally keeps only lyric text and line-start times. Optional metadata tags such as [ar:Artist], [ti:Title], and [al:Album] are supported by many players but are not required.

How to actually convert DFXP to LRC

Use 101convert.com

  1. Open the DFXP-to-LRC converter on 101convert.com.
  2. Upload the .dfxp file.
  3. Start the conversion and download the resulting .lrc file.
  4. Open the output in a text editor and verify that timestamps appear as [mm:ss.xx] and that the lyric lines are in the correct order.

This option runs without installing software. It is most suitable when the DFXP file uses ordinary paragraph-level timings.

Convert locally with Python

The following script extracts each timed DFXP paragraph, removes XML markup, and writes an LRC line using the paragraph's begin time.

import re
import sys
from xml.etree import ElementTree as ET

def local(name):
    return name.rsplit('}', 1)[-1]

def seconds(value):
    value = value.strip()
    if ':' in value:
        parts = value.split(':')
        if len(parts) == 3:
            h, m, s = parts
            return int(h) * 3600 + int(m) * 60 + float(s)
        if len(parts) == 2:
            m, s = parts
            return int(m) * 60 + float(s)
    match = re.fullmatch(r'([0-9.]+)(ms|s|m|h)', value)
    if not match:
        raise ValueError(f'Unsupported time: {value}')
    number, unit = match.groups()
    factor = {'ms': 0.001, 's': 1, 'm': 60, 'h': 3600}[unit]
    return float(number) * factor

root = ET.parse(sys.argv[1]).getroot()
lines = []
for element in root.iter():
    if local(element.tag) != 'p':
        continue
    begin = next((v for k, v in element.attrib.items()
                  if local(k) == 'begin'), None)
    lyric = ' '.join(''.join(element.itertext()).split())
    if begin and lyric:
        lines.append((seconds(begin), lyric))

for start, lyric in sorted(lines):
    centiseconds = round(start * 100)
    minutes, remainder = divmod(centiseconds, 6000)
    seconds_part, hundredths = divmod(remainder, 100)
    print(f'[{minutes:02d}:{seconds_part:02d}.{hundredths:02d}]{lyric}')

Save it as dfxp_to_lrc.py, then run python dfxp_to_lrc.py captions.dfxp > lyrics.lrc. Save the output as UTF-8 so accented characters and non-Latin lyrics remain intact.

Quality and compatibility limitations

LRC normally stores a line's start time, while DFXP can store both start and end times. The conversion therefore discards end times. DFXP styling, screen position, colors, speaker labels, regions, and caption-specific metadata also have no standard equivalent in basic LRC.

If the DFXP file contains timings on nested span elements rather than on paragraph elements, a simple paragraph converter may merge several timed segments into one line. Word-by-word karaoke timing requires an enhanced-LRC format, commonly using tags such as <00:12.50>, but player support differs. DFXP time expressions using frame counts or ticks may also need a known frame rate or tick rate before they can be converted accurately.


Note: This dfxp to lrc conversion record is incomplete, must be verified, and may contain inaccuracies. Please vote below whether you found this information helpful or not.

Was this information helpful?

DFXP vs LRC: format comparison

How the DFXP and LRC formats compare on the properties that matter most for this conversion.

Comparison of the DFXP and LRC file formats
Property .DFXP Distribution Format Exchange Profile .LRC Lyrics file
Text styling Extensive Basic
On-screen positioning Yes No
Timing precision Milliseconds Centiseconds
Storage Both Embedded in the file
Player support Limited Limited
Plain-text readable Yes Yes
Typical file size Small Very small
Open standard Yes Partly open
Introduced 2006
Developer W3C Timed Text Working Group / TTML community
MIME type application/ttml+xml

Frequently asked questions

Is the DFXP to LRC converter free?

Yes, converting DFXP to LRC on 101convert.com is completely free. No registration, email address or installation is required. If you need a higher file size limit or want to convert more files at once, see our plans.

How large can my DFXP file be?

You can upload DFXP files up to 100 MB and convert up to 100 files at once in a single batch.

What happens to my uploaded files?

Files are processed automatically and deleted from our servers within a few minutes after conversion. We never view or share your files.

Do I need to install any software to convert DFXP to LRC?

No. The DFXP to LRC conversion runs entirely online in your browser and works on Windows, Mac, Linux, Android and iPhone.

Did the conversion fail?

In most cases, the cause is an incorrect file format. Please upload a valid DFXP file for this DFXP to LRC conversion. Occasionally, the issue may be on our side. We analyze recurring conversion failures and disable or fix the converter if we detect a defect.

Additional formats for
dfxp file conversion

Convert to lrc from
other formats

Share on social media: