How to upload Youtube-friendly MP4, keeps erroring out?

Questions about codecs, DVD playback, web plugins...
Forum rules
Before you post please read how to get help
Post Reply
User avatar
geekomatic
Level 4
Level 4
Posts: 229
Joined: Sun Jun 06, 2010 1:11 am
Location: Awesome Western Australia!

How to upload Youtube-friendly MP4, keeps erroring out?

Post by geekomatic » Wed Mar 07, 2018 1:41 am

So, I decided to upload a song to Youtube & found a post online on how to merge the audio with an image which created a video file. I've done this which created a playable, local .avi video with audio & a static image, as expected. Supposedly, YT accepts .avi, but upon uploading it errors saying it cannot process it. So, I decide to just upload the .avi to an online converter, thinking maybe if it went through that output as MP4, the YT gods might like it more. Nope.

I went through some of the YT forums posts and installed MediaInfo to compare what I have to what they want. This is my file info.

Code: Select all

General
Complete name                            : /home/bitfenix/Desktop/Beast_Without_You.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom
File size                                : 6.38 MiB
Duration                                 : 6mn 34s
Overall bit rate                         : 136 Kbps
Encoded date                             : UTC 1904-01-01 00:00:00
Tagged date                              : UTC 1904-01-01 00:00:00
Writing application                      : Lavf58.10.100

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Baseline@L5.2
Format settings, CABAC                   : No
Format settings, ReFrames                : 3 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 40ms
Bit rate                                 : 53.3 Mbps
Width                                    : 2 480 pixels
Height                                   : 4 416 pixels
Display aspect ratio                     : 0.562
Frame rate mode                          : Constant
Frame rate                               : 25.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.195
Stream size                              : 260 KiB (4%)
Writing library                          : x264 core 148
Encoding settings                        : cabac=0 / ref=3 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=30 / keyint_min=3 / scenecut=40 / intra_refresh=0 / rc_lookahead=30 / rc=crf / mbtree=1 / crf=21.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Encoded date                             : UTC 1904-01-01 00:00:00
Tagged date                              : UTC 1904-01-01 00:00:00

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 6mn 34s
Duration_LastFrame                       : -15ms
Bit rate mode                            : Constant
Bit rate                                 : 129 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy
Stream size                              : 6.06 MiB (95%)
Encoded date                             : UTC 1904-01-01 00:00:00
Tagged date                              : UTC 1904-01-01 00:00:00

This is what YT says they want:

Code: Select all

Container: MP4

    No Edit Lists (or the video might not get processed correctly)
    moov atom at the front of the file (Fast Start)
    
    Audio codec: AAC-LC

    Channels: Stereo or Stereo + 5.1
    Sample rate 96khz or 48khz

Video codec: H.264

    Progressive scan (no interlacing)
    High Profile
    2 consecutive B frames
    Closed GOP. GOP of half the frame rate.
    CABAC
    Variable bitrate. No bitrate limit required, though we offer recommended bit rates below for reference
    Chroma subsampling: 4:2:0

Frame rate

Content should be encoded and uploaded in the same frame rate it was recorded.

Common frame rates include: 24, 25, 30, 48, 50, 60 frames per second (other frame rates are also acceptable).

Interlaced content should be deinterlaced before uploading. For example, 1080i60 content should be deinterlaced to 1080p30, going from 60 interlaced fields per second to 30 progressive frames per second.

Bitrate

The bitrates below are recommendations for uploads. Audio playback bitrate is not related to video resolution.
Recommended video bitrates for SDR uploads

To view new 4K uploads in 4K, use a browser or device that supports VP9.
Type 	Video Bitrate, Standard Frame Rate
(24, 25, 30) 	Video Bitrate, High Frame Rate
(48, 50, 60)
2160p (4k) 	35-45 Mbps 	53-68 Mbps
1440p (2k) 	16 Mbps 	24 Mbps
1080p 	8 Mbps 	12 Mbps
720p 	5 Mbps 	7.5 Mbps
480p 	2.5 Mbps 	4 Mbps
360p 	1 Mbps 	1.5 Mbps
 
Recommended video bitrates for HDR uploads
Type 	Video Bitrate, Standard Frame Rate
(24, 25, 30) 	Video Bitrate, High Frame Rate
(48, 50, 60)
2160p (4k) 	44-56 Mbps 	66-85 Mbps
1440p (2k) 	20 Mbps 	30 Mbps
1080p 	10 Mbps 	15 Mbps
720p 	6.5 Mbps 	9.5 Mbps
480p 	

Not supported
	Not supported
360p 	Not supported 	Not supported
 
Recommended audio bitrates for uploads
Type 	Audio Bitrate
Mono 	128 kbps
Stereo 	384 kbps
5.1 	512 kbps

Resolution and aspect ratio

YouTube uses 16:9 aspect ratio players. If you're uploading a non-16:9 file, it will be processed and displayed with either black bars on the left and right (pillar boxes) or black bars at the top and bottom (letter boxes) to make a 16:9 ratio in the player.

Learn how to use resolution and aspect ratios correctly.
So, my query is: how or what can I use to get the file to match what YT wants? I don't mind terminal. I installed FFMulticonverter, but though I tried to enter settings & convert, it says it finished, but it's immediate and nothing is actually happening (no file created).

My system info, using Mate:

Code: Select all

inxi -Fxz
System:    Host: bitfenix Kernel: 3.13.0-37-generic x86_64 (64 bit, gcc: 4.8.2) Desktop: N/A Distro: Linux Mint 17.1 Rebecca
Machine:   Mobo: ASRock model: H97M-ITX/ac Bios: American Megatrends version: P1.40 date: 09/01/2014
CPU:       Quad core Intel Core i5-4690 CPU (-MCP-) cache: 6144 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 27933.9 
           Clock Speeds: 1: 800.00 MHz 2: 800.00 MHz 3: 800.00 MHz 4: 3501.00 MHz
Graphics:  Card: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller bus-ID: 00:02.0 
           X.Org: 1.15.1 drivers: intel (unloaded: fbdev,vesa) Resolution: 1920x1080@60.0hz 
           GLX Renderer: Mesa DRI Intel Haswell Desktop GLX Version: 3.0 Mesa 10.1.3 Direct Rendering: Yes
Audio:     Card-1: Intel 9 Series Chipset Family HD Audio Controller driver: snd_hda_intel bus-ID: 00:1b.0
           Card-2: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller driver: snd_hda_intel bus-ID: 00:03.0
           Card-3: Logitech QuickCam Pro for Notebooks driver: USB Audio usb-ID: 046d:0991
           Sound: Advanced Linux Sound Architecture ver: k3.13.0-37-generic
Network:   Card-1: Qualcomm Atheros QCA8171 Gigabit Ethernet driver: alx port: e000 bus-ID: 02:00.0
           IF: eth0 state: up speed: 100 Mbps duplex: full mac: <filter>
           Card-2: Realtek RTL8821AE 802.11ac PCIe Wireless Network Adapter 
           driver: rtl8821ae ver: backported port: d000 bus-ID: 03:00.0
           IF: wlan0 state: down mac: <filter>
Drives:    HDD Total Size: 872.2GB (63.3% used) 1: id: /dev/sda model: Samsung_SSD_840 size: 256.1GB 
           2: id: /dev/sdb model: WDC_WD6000HLHX size: 600.1GB 3: USB id: /dev/sdc model: Mass size: 16.0GB 
Partition: ID: / size: 30G used: 2.9G (11%) fs: ext4 ID: /boot size: 488M used: 86M (19%) fs: ext4 
           ID: /home size: 195G used: 141G (76%) fs: ext4 ID: /usr size: 9.8G used: 7.4G (81%) fs: ext4 
           ID: /var size: 5.8G used: 1.2G (22%) fs: ext4 ID: swap-1 size: 4.29GB used: 0.00GB (0%) fs: swap 
RAID:      No RAID devices detected - /proc/mdstat and md_mod kernel raid module present
Sensors:   System Temperatures: cpu: 37.0C mobo: N/A 
           Fan Speeds (in rpm): cpu: N/A 
Info:      Processes: 206 Uptime: 3:02 Memory: 3941.2/15747.2MB Runlevel: 2 Gcc sys: 4.8.4 Client: Shell inxi: 1.8.4 
I've posted at YT forums, but nothing forthcoming as yet. I'm hoping someone here does this frequently and has a fairly straightforward method.

Cheers!

Hoser Rob
Level 12
Level 12
Posts: 4325
Joined: Sat Dec 15, 2012 8:57 am

Re: How to upload Youtube-friendly MP4, keeps erroring out?

Post by Hoser Rob » Wed Mar 07, 2018 10:08 am

Well, from the mediainfo report of your ffile, there are some extremely obvious issues. Especially:

Code: Select all

Duration                                 : 40ms
Bit rate                                 : 53.3 Mbps
Width                                    : 2 480 pixels
Height                                   : 4 416 pixels
Methinks you need to do some more reading on encoding and formats.

User avatar
Flemur
Level 16
Level 16
Posts: 6184
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: How to upload Youtube-friendly MP4, keeps erroring out?

Post by Flemur » Wed Mar 07, 2018 12:02 pm

Hoser Rob wrote:
Wed Mar 07, 2018 10:08 am
Well, from the mediainfo report of your ffile, there are some extremely obvious issues. Especially:

Code: Select all

Duration                                 : 40ms
Bit rate                                 : 53.3 Mbps
Width                                    : 2 480 pixels
Height                                   : 4 416 pixels
Methinks you need to do some more reading on encoding and formats.
Well, he's using a "static image", and one frame at 25fps = 40ms; the 53.3 Mbps might be the (total file size)/time-of-one-frame).
The width and height look very bad, though.

OP: can you play your file with vlc or smplayer?

Edit: I tried the

Code: Select all

ffmpeg -i sound.mp3 -i image.jpg out.avi
and it played OK in vlc and in smplayer**; I also had the two different durations; audio (4:40) and the image (80ms).

** It turned out to be kinda funny - "NPR news" apparently read by "Renfield", Dracula's crazy assistant.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

Post Reply

Return to “Sound, Multimedia, & Codecs”