Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Can't play this video,even in the JW Wizard page

17 replies [Last post]

Hi' im generating this video using FFMPEG and add some metadata using FLVTOOL2, but why i cant play this video in JWPlayer? even in the jw player wizard page.
To test it, just change the file in File Properties menu with this link.

This is a video link :
http://www.black24tv.com/frenz/child/video/2008/12/8/19/26/
bb5d969a98f731e6a0fe910801386dc6/bb5d969a98f731e6a0fe910801386dc6.flv

is there any way to play this video?

Thanks a lot

Hi' after reading many post in this forum and then i try to view my metadata in that file, i saw my keyframes set to be like this:
keyframes:
times:
- 0
- 0.8
- 1.6
- 2.4
- 3.2
- 4
- 4.8
- 5.6
...................

is that true the recommended keyframes it should 2-3 seconds? why? and how about recommended video rate?

Thanks a lot...

Flash can only scrub to keyframes.

Every keyframe that you add to a video increases the size of the video file.

If you have a keyframe every 20 frames and your framerate is 20 frames-per-second, you will be able to scrub in 1 second intervals.

How often you have keyframes depends on the type of video and how you want your users to be able to watch it. For most video, a keyframe every 3 to 5 seconds is about right. If your users need to be able to scrub in 1 second intervals, then you will need to have a keyframe every 1 second.

The video bitrate has to be balanced between quality (higher bitrate) and file download rate (the Internet connection speed/type that most of your users have).

For dialup and DSL, 320x240, 300-500kbps is probably about right. For higher speed connections and larger, higher quality video, like 720x400, 500-800kbps is probably about right. For the YouTube 1280x720 high quality video, the video rate is 2000kbps at a framerate of 30 frames-per-second. Most DSL users or T1 users, who connect at 1.6mbps, won't be able to watch that 2000kbps video in real time, they will have to let it buffer maybe 50% before they start watching it.

So you have to analyze your videos and your users, then reach a balance of quality, size, and rate.

For better quality at a lower bitrate, use H.264/AAC in a MP4 container.

2-pass encoding with ffmpeg will give you better compression, so you can use higher quality settings while still maintaining a reasonable bitrate. And your width and height should always be exactly divisible by 16 for the best compression.
320x240 4:3
640x480 4:3
640x352 16:9
720x400 16:9

:: PIP_X3 HD
:: 2-pass transcode to MP4[H.264/AAC] with W & H divisible by 16 (YouTube 480x270 to 432x240 512k) [framerate=20]

:: first pass
ffmpeg -y -i %1 -an                               -pass 1 -threads 2 -vcodec libx264 -s 432x240 -b 512k -bf 3 -subq 6 -cmp 256 -refs 5 -qmin 10 -qmax 51 -qdiff 4 -coder 1 -loop 1 -me_method hex -me_range 16 -trellis 1 -flags +mv4 -flags2 +bpyramid+wpred+mixed_refs+8x8dct -partitions parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -g 250 -r 20 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 %1_HD.mp4

:: second pass
ffmpeg -y -i %1 -acodec libfaac -ar 44100 -ab 96k -pass 2 -threads 2 -vcodec libx264 -s 432x240 -b 512k -bf 3 -subq 6 -cmp 256 -refs 5 -qmin 10 -qmax 51 -qdiff 4 -coder 1 -loop 1 -me_method hex -me_range 16 -trellis 1 -flags +mv4 -flags2 +bpyramid+wpred+mixed_refs+8x8dct -partitions parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -g 250 -r 20 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 %1_HD.mp4

:: move MOOV atoms
qt-faststart %1_HD.mp4 %1_HD.out.mp4

Hi kLink,

Really appreciate with your help, can u help me more cos when i try to use your command, i got this output:
[libx264 @ 68C432E0]using cpu capabilities: MMX MMXEXT SSE SSE2 SSE3 SSSE3 Cache64
and it will popup message from windows tell ffmpeg error...

in your above command it will convert the video become MP4 format, do you know how to create it using FLV format? if i want to serve my client with the video, is't the content-type must video/flv?

Thanks a lot..

Hi' just for info, i already solve my problem. The problem it's all in mine, when i check the request and response header it's text/plain, it should be video/flv.
There's no problem with the player, this player is really awesome... ;)

Thanks a lot..

@kLink,

in your above command it will convert the video become MP4 format, do you know how to create it using FLV format?

Really appreciate if u still want to answer this question..

Thanks

The code posted below will output FLV. However, I can give you much better code if you tell me what the original video file format is, and what codecs were used for the video and the audio.

However, I recommend that you use MP4/H.264 because you can have better quality and reduced file size. The MP4/H.264 is playable by the JW FLV Media Player. YouTube (arguably the leader in online video) is now serving their higher quality videos as MP4/H.264.

   ffmpeg -i "%1.avi"     -threads 2 -s 640x464 -r 20.00 -pix_fmt yuv420p -g 40 -qmin 3 -b 512k -async 50 -acodec libmp3lame -ar 22050 -ac 1 -ab 96k -y "%1.flv"     2>"%1.txt"

Hi' thanks kLink,

I can give you much better code if you tell me what the original video file format is, and what codecs were used for the video and the audio.

How do you know all this stuff? it's really awesome ;) can u tell me your references?

Basicly, my original video source are in this type (.3gpp, .3gp, .mov, .avi, .mp4, .mpeg, .wmv), can u give me another code to convert all of those video type become flv?

I think youtube not using MP4 for the video, cos when i check in response header, youtube use FLV content-type and when i look the stream using FFMPEG, it also display the FLV type (not MP4)

Thanks a lot...

Good references for video are:

      http://www.videohelp.com/

and:

      http://www.doom9.org/

YouTube is definitely using MP4 for some HQ files:

fmt=? HQ FLV 480x320
fmt=6 HQ FLV 480x360
fmt=18 HQ MP4 480x270
fmt=22 HQ MP4 1280x720
fmt=35 HQ MP4 640x360

I'll post some ffmpeg code for those video types later.

Hi' kLink,

Thanks a lot, i will keep in track with this post so i can see your code...

Quick question...

Rendered a video to MP4 format, and when viewing it in Quicktime I get the following movie properties (window, show movie inspector)...

Data Size: 2.19 mb
Data Rate: 96.18 kbits/sec

What does Data Size mean? And if 300-500kpbs is about normal for DSL, should I be rendering at a higher quality? The video looks fine, clear, and plays well - why is the data rate so low?

Thanks

The data that you posted above doesn't look right.

If you post a link to the video file, I'l check it for you.

kLink,

Sorry, its been a few days since i checked the forum.

The link is

http://www.localdogrescue.com/videos/xmas08.mp4

Im noticing that when playing the video on the actual webpage (localdogrescue.com) it pauses a lot while downloading. Not sure what thats all about.

@localdog - plays fine when i try your file in the wizard -
http://www.longtailvideo.com/support/jw-player-setup-wizard
so maybe an update of the player will fix the issue for you (some earlier versions buffered more often)
but when i try the player on your site it also plays fine, so maybe the problem is local (pipes or machine etc.)

Looks good to me, the size and bitrate is OK.

General
Complete name                    : C:\wget\xmas08.mp4
Format                           : MPEG-4
Format profile                   : Base Media / Version 2
Codec ID                         : mp42
File size                        : 13.9 MiB
Duration                         : 3mn 11s
Overall bit rate                 : 610 Kbps
Encoded date                     : UTC 2008-12-18 20:00:32
Tagged date                      : UTC 2008-12-18 20:00:32

Video
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : Main@L2.1
Format settings, CABAC           : Yes
Format settings, ReFrames        : 2 frames
Codec ID                         : avc1
Codec ID/Info                    : Advanced Video Coding
Duration                         : 3mn 11s
Bit rate mode                    : Variable
Bit rate                         : 510 Kbps
Width                            : 448 pixels
Height                           : 252 pixels
Display aspect ratio             : 16/9
Frame rate mode                  : Constant
Frame rate                       : 15.000 fps
Standard                         : NTSC
Resolution                       : 24 bits
Colorimetry                      : 4:2:0
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.301
Stream size                      : 11.6 MiB (84%)
Language                         : English
Encoded date                     : UTC 2008-12-18 20:00:32
Tagged date                      : UTC 2008-12-17 20:14:19

Audio
Format                           : AAC
Format/Info                      : Advanced Audio Codec
Format version                   : Version 4
Format profile                   : LC
Format settings, SBR             : No
Codec ID                         : 40
Duration                         : 3mn 11s
Bit rate mode                    : Constant
Bit rate                         : 96.0 Kbps
Channel(s)                       : 2 channels
Channel positions                : L R
Sampling rate                    : 44.1 KHz
Resolution                       : 16 bits
Stream size                      : 2.20 MiB (16%)
Language                         : English
Encoded date                     : UTC 2008-12-18 20:00:32
Tagged date                      : UTC 2008-12-17 20:14:19

Thanks anderson & kLink

Any idea what the data is that Quicktime displays about the video (Data Size: 2.19 mb,
Data Rate: 96.18 kbits/sec)?

Looks like that's the audio.

Mediainfo: 2.20MB
Quicktime: 2.19MB

Mediainfo: 96.0 Kbps
Quicktime: 96.18 kbits/sec

localdog, what program are you using to render your videos to h264/aac? mainconcept? I too am having the same problem.