Changes between Version 15 and Version 16 of Encode/YouTube

Dec 1, 2014, 3:35:12 AM (3 years ago)

To reproduce, download YouTube posted video with a streaming media capture utility.


  • Encode/YouTube

    v15 v16  
     70== Alternative Encoding Options == 
     72!YouTube provides a guide to [ Advanced encoding settings] which, if certain recommendations are followed, will produce a video that will not be recoded after it is uploaded. (To verify that this works on !YouTube, download your posted video with a streaming media capture utility such as Orbit Downloader or the DownloadHelper add-on for Firefox, and then compare it to your original video. Using the download link in !YouTube's control panel produces a recoded video that is not what you uploaded.) More than likely, some of the recommendations have to do with Adobe's Flash player, so these may also work for other video sharing sites. 
     74The crucial options appear to be the container format (MP4) and options, the video and audio codecs, and the right profile for each codec (but with additional restrictions on the video stream). Video frame rates, resolutions, and aspect ratios, audio sample rates, and bit rates for video and audio are not crucial, so long as the video and audio codecs will encode them. !YouTube, at least, supports VBR video and audio and, with the latest Flash Player versions, Variable Frame Rate video. 
     76Note: all the following options to FFMPEG control the output file that will be uploaded. They must all ''follow'' the list of input sources on the command line. 
     78* MP4 container format 
     79  * MOOV atom at the front of the file (Fast Start) 
     80    * FFMPEG option: ''-movflags faststart'' 
     82* Audio: AAC 
     83  * Profile: Low Complexity (LC) 
     84    * [[AAC|FFmpeg and AAC Encoding Guide]] 
     86* Video: H.264 AVC (FFMPEG option: ''-c:v libx264'') 
     87  * Progressive scan (not interlaced) 
     88    * Detect interlaced video (including field order) 
     89      * [ MediaInfo] 
     90      - FFMPEG's [ idet] filter (adjust ''-ss'' and ''-frames:v'' to taste): 
     92ffmpeg -y -ss 00:03:00 -i INPUT -an -frames:v 200 -vf idet -f rawvideo /dev/null  #or NUL for Windows 
     94      ''idet'' will output stats to your console just before FFMPEG exits. 
     95    * FFMPEG de-interlacing options: 
     96      * [ fieldmatch] filter to [ inverse telecine] 
     97      * [ yadif] filter to de-interlace 
     98    * [[FilteringGuide|FFMPEG Filtering Guide]] 
     99  * Profile: High 
     100    - FFMPEG option: ''-preset veryfast''[[BR]]''libx264'' will automatically set the profile to ''High.'' Selecting a preset faster than ''veryfast'' is not recommended. 
     101  * Consecutive B-frames: 2 
     102    * Consecutive B-frames must be limited to 2, regardless of other ''libx264'' options. 
     103      * FFMPEG option: ''-bf 2'' 
     104  * Closed GOP, approximately half the video frame rate 
     105    * The default, 12, works for 24-25 fps. For NTSC and 30 fps, select 15. 
     106      * FFMPEG option: ''-g'' 
     107  * Chroma subsampling: 4:2:0 
     108    * Translation: yuv420p 
     109      * Check input file pixel format: 
     111ffprobe -select_streams v -show_streams InputFile 
     113      * FFMPEG option: ''-pix_fmt yuv420p'' 
     115Some examples: 
     117Inverse telecine a NTSC DVD rip (output video framerate will be "ntsc-film", 24000/1001): 
     119ffmpeg -i input.mpg -strict experimental -c:a aac -b:a 128k -vf "fieldmatch=combmatch=full:mode=pc_n_ub, yadif=deint=interlaced, decimate" -pix_fmt yuv420p -c:v libx264 -crf 18 -preset slow -tune film -bf 2 -movflags faststart -shortest output.mp4 
     122Same thing, but just de-interlace it (output video framerate will be "ntsc", 30000/1001): 
     124ffmpeg -i input.mpg -strict experimental -c:a aac -b:a 128k -vf yadif -pix_fmt yuv420p -c:v libx264 -crf 18 -preset slow -tune film -g 15 -bf 2 -movflags faststart -shortest output.mp4 
    70127== FAQ ==