mkvdts2ac3 icon indicating copy to clipboard operation
mkvdts2ac3 copied to clipboard

integer expression expected

Open hemmo opened this issue 12 years ago • 5 comments

Problem at the line 665 of the script

lassi@etna:~/Videot/jw$ ./mkvdts2ac3.sh -w /mnt/disk0 ~/vmware\ shared/mchd-lehavre720p.mkv mkvdts2ac3-1.6.0 - by Jake Wharton [email protected] and Chris Hoekstra [email protected]

Extracting Timecodes: Progress: 100% Timecode extraction took: 00:01:22 (82 seconds)

Extracting DTS Track: Progress: 100% DTS track extracting took: 00:01:41 (101 seconds)

Converting DTS to AC3:
Progress: 100%
DTS track conversion took: 00:02:42 (162 seconds)

Muxing AC3 Track in:
Progress: 100%
Muxing AC3 track in took: 00:03:32 (212 seconds)

./mkvdts2ac3.sh: line 665: [: 7.52194e+10: integer expression expected
Moving new file over old file. DO NOT KILL THIS PROCESS OR YOU WILL EXPERIENCE DATA LOSS!
sending incremental file list
mchd-lehavre720p.new.mkv
4994713814 100% 16.28MB/s 0:04:52 (xfer#1, to-check=0/1)

sent 4995323627 bytes received 31 bytes 14012128.07 bytes/sec
total size is 4994713814 speedup is 1.00
File copy took: 00:05:58 (358 seconds)

Total processing time: 00:15:15 (915 seconds)

Filesize summary: Original Filesize: 4,584,788 KB
Extracted DTS Filesize: 992,508 KB Converted AC3 Filesize: 294,660 KB Final Filesize: 4,877,656 KB lassi@etna:~/Videot/jw$

The audio of the film works now in my popcorn hour a-100, so maybe this is not that big issue, but at least got me worried

hemmo avatar Mar 31 '12 10:03 hemmo

If you can replicate this then it would be helpful to add a 'bash -x' in front of your cmdline and attach the results in a text file. I don't have this on my system so there must be something unique on your system that is just throwing up an error but still continuing.

choekstr avatar May 04 '12 14:05 choekstr

It's not unique.. happens all the time for me. I'll get you the output.. I believe it's parsing the disk space incorrectly on some systems.

The error is only cosmetic.. it doesn't affect the conversion process at all.

n-i-x avatar May 28 '12 00:05 n-i-x

Here you go:

++ /usr/bin/du -k /tmp/some.new.mkv ++ cut -f1

  • MKVFILEDIFF=-927608 ++ df -k . ++ tail -1 ++ awk '{print $4*1024}'
  • DESTFREESPACE=3.25045e+12
  • '[' -927608 -gt 3.25045e+12 ']' /home/jrebeiro/bin/mkvdts2ac3.sh: line 665: [: 3.25045e+12: integer expression expected

Here is the output of the offending command run in the script:

$ df -k . | tail -1 | awk '{print $4*1024}' 3.25139e+12

My system details:

$ awk -W version mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan

compiled limits: max NF 32767 sprintf buffer 2040

$ uname -a Linux ubuntu 2.6.32-41-generic #89-Ubuntu SMP Fri Apr 27 22:18:56 UTC 2012 x86_64 GNU/Linux

$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=10.04 DISTRIB_CODENAME=lucid DISTRIB_DESCRIPTION="Ubuntu 10.04.4 LTS"

I believe the following awk expression will fix the issue on line 664:

DESTFREESPACE=$(\df -k "$DEST" | tail -1 | awk '{printf ("%0.0f", $4*1024)}')

$ df -k . | tail -1 | awk '{printf ("%0.0f", $4*1024)}' 3251394998272

This needs to be tested on systems with GNU awk (I'm too lazy to do it myself) though I'm fairly certain it will just work.

n-i-x avatar May 28 '12 00:05 n-i-x

I have the same error and can confirm that the proposed command fixes the problem. Will this be changed in new version?

haimat avatar Feb 23 '14 13:02 haimat

I have similar Issue Mine is this after i fixed a Proot error 11

test-execute: command not found $ ./start-kali.sh bash: [: : integer expression expected $ .... Im running on oreo

Kilo-411 avatar Jul 08 '19 04:07 Kilo-411