Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 31st, 2012  |  syntax: None  |  size: 4.06 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to play html5 video? When the file is file.m4v?
  2. <html>
  3. <head>
  4. </head>
  5.  
  6. <body>
  7.  
  8.   <video preload="auto" autoplay="autoplay" controls>
  9.     <source
  10.         src="/var/www/html/video/file2.m4v"
  11.             type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>    
  12.   </video>
  13.  
  14. </body>
  15. </html>
  16.        
  17. $ mplayer -vo null -ao null -frames 0 -identify file2.m4v
  18. MPlayer SVN-r33251-4.6.0 (C) 2000-2011 MPlayer Team
  19. mplayer: could not connect to socket
  20. mplayer: No such file or directory
  21. Failed to open LIRC support. You will not be able to use your remote control.
  22.  
  23. Playing file2.m4v.
  24. TS file format detected.
  25. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  26. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  27. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  28. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  29. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  30. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  31. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  32. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  33. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  34. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  35. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  36. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  37. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  38. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  39. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  40. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  41. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  42. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  43. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  44. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  45. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  46. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  47. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  48. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  49. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  50. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  51. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  52. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  53. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  54. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  55. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  56. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  57. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  58. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  59. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  60. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  61. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  62. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  63. TS_PARSE: COULDN'T SYNC
  64. VIDEO MPEG4(pid=69) AUDIO AAC(pid=68) NO SUBS (yet)!  PROGRAM N. 1
  65. ID_VIDEO_ID=69
  66. ID_AUDIO_ID=68
  67. FPS not specified in the header or invalid, use the -fps option.
  68. Load subtitles in ./
  69. ID_FILENAME=file2.m4v
  70. ID_DEMUXER=mpegts
  71. ID_VIDEO_FORMAT=0x10000004
  72. ID_VIDEO_BITRATE=0
  73. ID_VIDEO_WIDTH=352
  74. ID_VIDEO_HEIGHT=288
  75. ID_VIDEO_FPS=0.000
  76. ID_VIDEO_ASPECT=0.0000
  77. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  78. ID_AUDIO_FORMAT=MP4A
  79. ID_AUDIO_BITRATE=0
  80. ID_AUDIO_RATE=0
  81. ID_AUDIO_NCH=0
  82. PROGRAM_ID=1 (0x01), PMT_PID: 66(0x42)
  83. ID_START_TIME=28315.35
  84. ID_LENGTH=0.00
  85. ID_SEEKABLE=1
  86. ID_CHAPTERS=0
  87. ==========================================================================
  88. Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
  89. Unsupported PixelFormat 61
  90. Unsupported PixelFormat 53
  91. Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
  92. ==========================================================================
  93. ID_VIDEO_CODEC=ffodivx
  94. ==========================================================================
  95. Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
  96. AUDIO: 8000 Hz, 1 ch, s16le, 0.0 kbit/0.00% (ratio: 0->16000)
  97. ID_AUDIO_BITRATE=0
  98. ID_AUDIO_RATE=8000
  99. ID_AUDIO_NCH=1
  100. Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
  101. ==========================================================================
  102. AO: [null] 8000Hz 1ch s16le (2 bytes per sample)
  103. ID_AUDIO_CODEC=ffaac
  104. Starting playback...
  105.  
  106.  
  107. Exiting... (End of file)
  108. ID_EXIT=EOF
  109.        
  110. <video src="thevideo.ogg">
  111.     <video src="firstFallback.mkv">
  112.         <object type="video/mpeg" src="secondFallback.mpeg">
  113.             <object
  114.                 type="application/x-shockwave-flash"
  115.                 src="player.swf?etc...">
  116.                 <p>Download <a href="videourl">the video etc...</a><br />
  117.                 or use a more modern browser to watch online, etc...</p>
  118.             </object>
  119.         </object>
  120.     </video>
  121. </video>
  122.        
  123. <video id="myVideo" width="300" height="200" preload="auto" src="/var/www/html/video/file2.m4v" type="video/mp4" autoplay controls></video>