[FFmpeg-user] optimal slide encoding for low bandwidth at youtube
Robert Rowntree
rowntreerob at gmail.com
Thu Aug 18 21:34:11 CEST 2011
thanks for how to instructions on libx264. i got good result on mp4
produced by ffmpeg with very low video bandwidth using :
./ffmpeg -y -loop_input -shortest -i Optimized-DSC01448.JPG -i
rec_1448.3gpp -pass 1 -vframes 500 -vcodec libx264 -r 1/100 -vf
'scale=320:180' -b 2k -g 250 -b_strategy 0 -coder 1 -qmin 10 -qmax 55
-sc_threshold 40 -flags -loop -subq 1 -i_qfactor 0.71 -qcomp 0.6 -qdiff
4 -flags2 +dct8x8+wpred
+bpyramid+mixed_refs -trellis 1 -partitions
+parti8x8+parti4x4+partp8x8+partp4x4+partb8x8 -acodec libmp3lame -ac 1 -ar
22050 -ab 22k _my.mp4
i think that the issue is at youtube because i was able to use the
instructions for libx264 to create an mp4 combining a single slide and a
voice track in which , mplayer reports the bandwidth on the video track as
1.8 kbps.
After uploading that mp4 to youtube and after the resultant transcoding and
processing of the youtube distribution platform, the Video track bandwidth
had risen from 1.8kbps to 24 kbps.
details on youtube process ( mp4 stats on mplayer, SDP for the youtube RTSP
feed ... )
see: http://goo.gl/W0Dg8
not alot that i can do about that .. thank you for all the help
On Tue, Aug 16, 2011 at 5:52 AM, James Lu <luj125 at gmail.com> wrote:
> On Mon, Aug 15, 2011 at 6:40 PM, Robert Rowntree <rowntreerob at gmail.com
> >wrote:
>
> > i want to combine 1 slide ( vid ) and a 3gpp ( audio ) in output that is
> > suitable for youtube upload. i have a CLI expression working for ffmpeg ,
> > but its video bandwidth is too high considering that i am muxing just a
> > single jpeg.
> >
> > i have used the following , but think that i can do better on the
> bandwidth
> > of the VIDEO track...
> >
> > *./ffmpeg -y -loop_input -f image2 -shortest -r 1/2 -i 1459.JPG -i
> > 1459.3gpp
> > -s 640x480 -b 100k -bt 240k -vcodec msmpeg4 -acodec libmp3lame -ab 64k
> -ar
> > 22050 out.wmv*
> >
> > Once the output from the above is uploaded to youtube, youtube exposes 2
> > RTSP URI's - a high and low bandwidth version of the video.
> >
> > the low bandwidth youtube version still has 39K of video bandwidth and
> that
> > is what i want to reduce.... its just a single slide in the video
> >
> > v=0
> > o=GoogleStreamer 98636128 107718649 IN IP4 74.125.213.247
> > s=Video
> > c=IN IP4 0.0.0.0
> > b=AS:51
> > t=0 0
> > a=control:*
> > a=range:npt=0-63.800000
> > m=video 0 RTP/AVP 98
> > *b=AS:39 <-- VIDEO bandwidth*
> > a=rtpmap:98 H263-2000/90000
> > a=control:trackID=0
> > a=cliprect:0,0,144,176
> > a=framesize:98 176-144
> > a=fmtp:98 profile=0;level=10
> > m=audio 0 RTP/AVP 99
> > b=AS:12
> > a=rtpmap:99 AMR/8000/1
> > a=control:trackID=1
> > a=fmtp:99 octet-align
> > * Connection #0 to host v8.cache8.c.youtube.com left intact
> >
> > for comparison purpose, the following URI on youtube uses just 8K for its
> > video bandwidth and i want to try to get down near that.
> >
> > http://www.youtube.com/watch?v=FX9ccqQuzO4 is a typical sound track
> > hosted on youtube having the SDP below from the rtsp feed:
> >
> > v=0
> > o=GoogleStreamer 515160982 1824503727 IN IP4 74.125.213.247
> > s=Video
> > c=IN IP4 0.0.0.0
> > b=AS:20
> > t=0 0
> > a=control:*
> > a=range:npt=0-190.200000
> > m=video 0 RTP/AVP 98
> > *b=AS:8 <--- low video bandwidth *
> > a=rtpmap:98 H263-2000/90000
> > a=control:trackID=0
> > a=cliprect:0,0,144,176
> > a=framesize:98 176-144
> > a=fmtp:98 profile=0;level=10
> > m=audio 0 RTP/AVP 99
> > b=AS:12
> > a=rtpmap:99 AMR/8000/1
> > a=control:trackID=1
> > a=fmtp:99 octet-align
> > _______________________________________________
> > ffmpeg-user mailing list
> > ffmpeg-user at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
>
> Hey Robert,
>
> A few suggestions:
> 1) what may be killing you are the intra frames. What size is your jpg?
> Also
> look into making your GOP size as large as possible maybe? this is done by
> using option -g 'gop_size'
> 2) is there a specific reason you are using wmv? In my usage I've found
> libx264 to compress the most efficiently, and i'm fairly certain that
> youtube accepts .mp4 upload. (-vcodec libx264 -acodec aac -strict
> experimental)
> 3) not sure how low frame rate can go, but try dropping it more? maybe
> 1/(song_length_in_seconds) would work?
> 4) your -b option is at 100k.... try dropping to your real target? Same
> with
> -bt
>
> None of these are tested, just ideas. Hope one of them helps.
>
> ~James
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
More information about the ffmpeg-user
mailing list