VideoHelp Forum



Support our site by donate $5 directly to us Thanks!!!

Try StreamFab Downloader and download streaming video from Netflix, Amazon!



+ Reply to Thread
Results 1 to 7 of 7
  1. I've been using the following method to create blank video clips with audio on my YouTube channel for some time now:

    First create a blank clip and dub it with audio using an AviSynth script:
    Code:
    aud                 = WavSource("...")
    aud_len             = AudioLength(aud)
    aud_rate            = AudioRate(aud)
    aud_is_stereo       = True
    aud_is_16bit        = True
    vid_frames          = aud_len/aud_rate
    vid_width           = 1920
    vid_height          = 1080
    vid_pixel_format    = "RGB32"
    vid_fps             = 10
    vid_fps_denominator = 1
    vid_color           = $000000
    vid                 = BlankClip(vid_frames, vid_width, vid_height, vid_pixel_format, vid_fps, vid_fps_denominator, aud_rate, aud_is_stereo, aud_is_16bit, vid_color)
    return audiodub(vid, aud)
    Then encode it to a video file using ffmpeg:
    Code:
    ffmpeg.exe -i "script.avs" -vcodec libx264 -acodec copy "output_file.avi"


    Only recently have I discovered that in some cases users will have problems with playing videos that I've encoded using this method. They play fine in Firefox (35) and Chromium (40), but several people report that Chrome (which isn't quite the same as Chromium) gets stuck at some point. For example, several people have reported that Chrome gets "stuck" at 0:19 in this video. I haven't tested it on Chrome myself as I only have Chromium here. But someone told me it's only on HD resolutions that they're having this issue.

    So I'm wondering what the problem could be, and also, is there a way I can improve the compatibility with YouTube? Is there an overall better (and faster maybe?) way to do blank videos with audio? All video players I have available on my computer (which supports x264 anyway) can play the original video encode just fine, so I don't know why some browsers are struggling to play back the YouTube encode...
    Quote Quote  
  2. Lone soldier Cauptain's Avatar
    Join Date
    Jan 2006
    Location
    Brazil
    Search Comp PM
    No. Its work perfectly on FF 36 and Chrome 40.111.
    Quote Quote  
  3. Originally Posted by Cauptain View Post
    No. Its work perfectly on FF 36 and Chrome 40.111.
    Are you viewing it in an HD resolution (>=720p)?
    Quote Quote  
  4. Lone soldier Cauptain's Avatar
    Join Date
    Jan 2006
    Location
    Brazil
    Search Comp PM
    Originally Posted by Nisto View Post
    Are you viewing it in an HD resolution (>=720p)?
    1080p
    Quote Quote  
  5. In terms of speed:

    You could use YV12 since x264 encodes faster with it. Subsampling doesn't affect a "black" video quality wise anyways, and YT will re-encode to YV12 anyways. You could change the avs script or ffmpeg -pix_fmt yuv420p. Probably faster do serve it as YV12 in the script

    You're currently using "medium" preset, of course you could use something faster e.g. -preset:v veryfast

    You're using 10 fps, but for a blank video you could use something even lower like 1 or fractional. This means fewer frames encoded for a given audio length thus faster. For low framerates, YT will re-encode to 6 FPS anyways the last time I checked . Unless seeking is a consideration?

    It might be faster to skip avisynth and do everything in ffmpeg (not sure). e.g a single image with -loop 1 and -shortest
    Quote Quote  
  6. Thanks for the advices, poisondeathray, a lot of what you pointed out come as news to me. I use 10 fps because 1 fps videos has been problematic in the past (the YouTube encodes would start playing and skip directly to the end, and some other weird glitchy stuff), so I've been using whatever feels safest. I have tried encoding videos using ffmpeg's -loop switch in the past as well, but that has caused some issues with the final YouTube encodes too, so I don't know.. *shrug*
    Quote Quote  
  7. AFAIK YT will re-enecode any uploaded video so it is very important to investigate correct issue.
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!