Discussion:
Fetch Preview-Image failed due to COMMA instead of a DOT used in a command-option
kaffeesurrogat
2014-02-12 19:20:47 UTC
Permalink
Hey Guys,

well, I've been bussy with this for a while.

The following command is issued on machine 1:

###################################################################
machine 1
####################################################################

mkdir -m 0775 /movies/dvdrip-data/test/tmp/dvdrip1859.snap; cd
/movies/dvdrip-data/test/tmp/dvdrip1859.snap; execflow tccat -i
\/movies\/dvdrip\-data\/test\/vob\/006\/ -t vob -S 4689 -d 0 | tcdemux
-s 0x80 -x mpeg2 -S 0 -M 0 -d 0 -P /dev/null | tcextract -t vob -a 0 -x
mpeg2 -d 0 | ffmpeg -r 25.000 -i - -an -r 1 -ss '0,280' -vframes 1
snapshot%03d.png && execflow convert -size 720x576
/movies/dvdrip-data/test/tmp/dvdrip1859.snap/snapshot*.png
/movies/dvdrip-data/test/tmp/test-006-preview-orig.jpg && execflow
convert -size 720x576
/movies/dvdrip-data/test/tmp/dvdrip1859.snap/snapshot*.png
gray:/movies/dvdrip-data/test/tmp/test-006-preview-orig.raw && rm -r
/movies/dvdrip-data/test/tmp/dvdrip1859.snap && echo EXECFLOW_OK


The following command is issued on machine 2:

###################################################################
machine 2
####################################################################

mkdir -m 0775 /home/nico/dvdrip-data/test/tmp/dvdrip32740.snap; cd
/home/nico/dvdrip-data/test/tmp/dvdrip32740.snap; execflow tccat -i
\/home\/nico\/dvdrip\-data\/test\/vob\/006\/ -t vob -S 4689 -d 0 |
tcdemux -s 0x80 -x mpeg2 -S 0 -M 0 -d 0 -P /dev/null | tcextract -t vob
-a 0 -x mpeg2 -d 0 | ffmpeg -r 25.000 -i - -an -r 1 -ss '0.280' -vframes
1 snapshot%03d.png && execflow convert -size 720x576
/home/nico/dvdrip-data/test/tmp/dvdrip32740.snap/snapshot*.png
/home/nico/dvdrip-data/test/tmp/test-006-preview-orig.jpg && execflow
convert -size 720x576
/home/nico/dvdrip-data/test/tmp/dvdrip32740.snap/snapshot*.png
gray:/home/nico/dvdrip-data/test/tmp/test-006-preview-orig.raw && rm -r
/home/nico/dvdrip-data/test/tmp/dvdrip32740.snap && echo EXECFLOW_OK


The command finishes succesfully on machine 2, unfortunately not on
machine 1. I found kind of a small difference ....

machine 1: -ss '0,280'
machine 2: -ss '0.280'

On machine 1 dvdrip uses an COMMA. On machine 2 dvdrip insert a DOT.
If I execute the command on machine 1 manually with a DOT instead of a
COMMA, the command finishes nicely.

Well, .... actually I don't know what to do .... Is this a perl issue ?

Greetings,

Nico
Jörn Reder
2014-02-15 11:28:46 UTC
Permalink
Post by kaffeesurrogat
The command finishes succesfully on machine 2, unfortunately not on
machine 1. I found kind of a small difference ....
machine 1: -ss '0,280'
machine 2: -ss '0.280'
On machine 1 dvdrip uses an COMMA. On machine 2 dvdrip insert a DOT.
If I execute the command on machine 1 manually with a DOT instead of a
COMMA, the command finishes nicely.
Well, .... actually I don't know what to do .... Is this a perl issue ?
More or less ;) The program uses sprintf() here to round the time value
of the -ss option. And depending on your locale settings a comma is used
instead of the dot to mark the decimals.

You can fix that by either use the same locale settings on machine 1 as
on machine 2, or change lib/Video/DVDRip/Title.pm this way:

In line 3138 you find

my $start = sprintf("%.3f", $start_frame / $frame_rate);

add this line after it:

$start =~ s/,/./;

This should work.

Regards,

Jörn
--
LINUX - Linux Is Not gnU linuX
Loading...