diff --git a/syncplay/constants.py b/syncplay/constants.py
index 891df7a..02913f4 100644
--- a/syncplay/constants.py
+++ b/syncplay/constants.py
@@ -177,7 +177,7 @@ USERLIST_GUI_FILENAME_COLUMN = 3
MPLAYER_SLAVE_ARGS = ['-slave', '--hr-seek=always', '-nomsgcolor', '-msglevel', 'all=1:global=4:cplayer=4', '-af-add', 'scaletempo']
MPV_ARGS = ['--force-window', '--idle', '--hr-seek=always', '--keep-open']
MPV_SLAVE_ARGS = ['--msg-level=all=error,cplayer=info,term-msg=info', '--input-terminal=no', '--input-file=/dev/stdin']
-MPV_SLAVE_ARGS_NEW = ['--term-playing-msg=\nANS_filename=${filename}\nANS_length=${=length:${=duration:0}}\nANS_path=${path}\n', '--terminal=yes']
+MPV_SLAVE_ARGS_NEW = ['--term-playing-msg=\nANS_filename=${filename}\nANS_length=${=duration:${=length:0}}\nANS_path=${path}\n', '--terminal=yes']
MPV_NEW_VERSION = False
VLC_SLAVE_ARGS = ['--extraintf=luaintf', '--lua-intf=syncplay', '--no-quiet', '--no-input-fast-seek',
'--play-and-pause', '--start-time=0']
diff --git a/syncplay/players/mplayer.py b/syncplay/players/mplayer.py
index 56e6b4e..a0a610d 100644
--- a/syncplay/players/mplayer.py
+++ b/syncplay/players/mplayer.py
@@ -183,7 +183,10 @@ class MplayerPlayer(BasePlayer):
self._storePauseState(bool(value == 'yes'))
self._pausedAsk.set()
elif name == "length":
- self._duration = float(value)
+ try:
+ self._duration = float(value)
+ except:
+ self._duration = 0
self._durationAsk.set()
elif name == "path":
self._filepath = value