[Mplayer-dvb] -identify issue

Olivier Jacques mplayer at olivierjacques.com
Sun Feb 16 23:37:34 CET 2003


Hello all,
 
I'm using Juri's script 0.0.6a to play various video formats on my DVBc.
It works nice, except that, for some divX videos, the "mplayer
-identify" returns some strange values. I am not saying they are wrong,
as it might very well be that the videos themself are strange. Here is
what I get:
 
----------------------------
[root at vdr scripts]# mplayer -identify /video/divx/Friends803.AVI
Playing /video/divx/Friends803.AVI
AVI file format detected.
VIDEO:  [DIV3]  352x240  24bpp  30.03 fps  510.1 kbps (62.3 kbyte/s)
========================================================================
==
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
MP3lib: init layer2&3 finished, tables done
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 16000->176400 (128.0 kbit)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
========================================================================
==
ID_FILENAME=/video/divx/Friends803.AVI
ID_VIDEO_FORMAT=DIV3
ID_VIDEO_BITRATE=510120
ID_VIDEO_WIDTH=352
ID_VIDEO_HEIGHT=240
ID_VIDEO_FPS=30.029 <====== !
ID_VIDEO_ASPECT=0.00
ID_AUDIO_CODEC=mp3
ID_AUDIO_FORMAT=85
ID_AUDIO_BITRATE=128000
ID_AUDIO_RATE=44100
ID_AUDIO_NCH=2
ID_LENGTH=1302
 

And another one:
----------------------------
AVI file format detected.
VIDEO:  [DIVX]  560x288  24bpp  31.25 fps  1030.1 kbps (125.7 kbyte/s)
========================================================================
==
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
MP3lib: init layer2&3 finished, tables done
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 14000->176400 (112.0 kbit)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
========================================================================
==
ID_FILENAME=/mnt/cdrom/Walt Disney - Le roi lion.avi
ID_VIDEO_FORMAT=DIVX
ID_VIDEO_BITRATE=1030080
ID_VIDEO_WIDTH=560
ID_VIDEO_HEIGHT=288
ID_VIDEO_FPS=31.249 <====== !
ID_VIDEO_ASPECT=0.00
ID_AUDIO_CODEC=mp3
ID_AUDIO_FORMAT=85
ID_AUDIO_BITRATE=112000
ID_AUDIO_RATE=44100
ID_AUDIO_NCH=2
ID_LENGTH=5030
 
how is the FPS detected? Is there a possibility that they are improperly
detected by mplayer?
 
In the meantime, to work-around the problem, I added a tolerance in FPS
detection for Juri's script. Here is the diff if anyone wants to use it
too. Juri? :)
[root at vdr scripts]# diff -u mplayer.sh.juri mplayer.sh.olivier
--- mplayer.sh.juri     Fri Jan 24 00:59:46 2003
+++ mplayer.sh.olivier  Sun Feb 16 23:22:43 2003
@@ -142,10 +142,18 @@
 
   ORIG_FPS=`echo "$TEMP1"|grep ID_VIDEO_FPS|cut -d"=" -f2`
   debugmsg "parsed output for ORIG_FPS:" $ORIG_FPS
-  test $ORIG_FPS == "14.985" && ORIG_FPS=29.970 && debugmsg "set
ORIG_FPS to:" $ORIG_FPS
-  test $ORIG_FPS == "15.000" && ORIG_FPS=29.970 && debugmsg "set
ORIG_FPS to:" $ORIG_FPS
-  test $ORIG_FPS == "30.000" && ORIG_FPS=29.970 && debugmsg "set
ORIG_FPS to:" $ORIG_FPS
 
+  TMP_FPS=$(echo "$ORIG_FPS*100" | bc -l)
+  TMP_FPS=`echo $TMP_FPS | cut -f1 -d.`
+  if test $TMP_FPS -gt 2900 -a $TMP_FPS -lt 3200; then
+    ORIG_FPS=29.970
+  fi
+  if test $TMP_FPS -gt 1400 -a $TMP_FPS -lt 1600; then
+    ORIG_FPS=29.970
+  fi
+  debugmsg "set ORIG_FPS to:" $ORIG_FPS
+
+
   ORIG_ASPECT=`echo "$TEMP1"|grep ID_VIDEO_ASPECT|cut -d"=" -f2`
   debugmsg "parsed output for ORIG_ASPECT:" $ORIG_ASPECT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dvb/attachments/20030216/e32d3a7b/attachment.htm>


More information about the MPlayer-dvb mailing list