0

-f mp4 -c:v libx264 -preset veryslow -tune grain -profile:v high422 -flags +ildct+ilme

I am preparing video to be streamed (DLNA) from my NAS to an older Sony Bravia. I have successfully created playable m2t files (1080i) with VideoStudio (AVC, high@L4, Cabac, h264, vbr max 20Mbps, 25 fps, interlaced). Interlaced is important because it seems the TV cannot handle 1080p from NAS or USB. I have some old family video in prores/mov that VideoStudio does not accept as input, so I am trying to convert that to something acceptable to the TV using ffmpeg.

1) I haven't found a way to create m2t files with ffmpeg.

2) The TV is supposedly capable of handling MP4, but regardless of the settings tried - and I have tried dozens that all play well on vlc (including BD compatible, PSP profiles and other) the TV just says 'not playable'

Anyone having ideas for any of the two routes?

Searching the internet I have learned that the Sony Bravia is know for being very picky, but I am sure someone has found the key...? (other than those at pavtube, who claims to have a commercial tool, that does the trick)

ffprobe of working m2t file:

Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn, 50 tbc 
Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 384 kb/s

Properties of working m2t by MediaTab:

===================== General =====================
Id                          : 0 (0x0)
Complete name               : D:\ThisWorks.m2t
Format                      : BDAV
Format info                 : Blu-ray Video
File size                   : 2.21 GB
Duration (ms)               : 21mn 10s
Overall bit rate mode       : Variable
Overall bit rate            : 14.9 Mbps
Maximum Overall bit rate    : 25.5 Mbps

===================== Video =====================
Id                          : 4113 (0x1011)
Menu ID                     : 1 (0x1)
Format                      : AVC
Format info                 : Advanced Video Codec
Formatprofile               : High@L4
Formatsettings, CABAC       : Yes
Formatsettings, ReFrames    : 2 frames
Formatsettings, GOP         : N=1
Codec Id                    : 27
Duration (ms)               : 21mn 10s
Bit rate mode               : Variable
Bit rate                    : 13.9 Mbps
Maximum bit rate            : 20.0 Mbps
Width                       : 1 920 pixels
Height                      : 1 080 pixels
Display aspect ratio        : 16:9
Frame rate                  : 25.000 fps
Color space                 : YUV
Chroma subsampling          : 4:2:0
Bit depth                   : 8 bits
Scan type                   : Interlaced
Scan type, store method     : Separated fields
Scan order                  : Top Field First
Bits/(Pixel*Frame)          : 0.269
Stream size                 : 2.06 GB (93%)

===================== Audio =====================
Id                          : 4352 (0x1100)
Menu ID                     : 1 (0x1)
Format                      : AC-3
Format info                 : Audio Coding 3
Mode extension              : CM (complete main)
Formatsettings, Endianness  : Big
Codec Id                    : 129
Duration (ms)               : 21mn 10s
Bit rate mode               : Constant
Bit rate                    : 384 Kbps
Channel(s)                  : 2 channels
Channel positions           : Front: L R
Sampling rate               : 48.0 KHz
Frame rate                  : 31.250 fps (1536 spf)
Compression mode            : Lossy
Stream size                 : 58.2 MB (3%)
  • Share the log of ffmpeg -i file.m2t from one of the working VideoStudio files. – Gyan Nov 3 '18 at 10:21
  • Thanks! Would this be what you are looking for?Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn, 50 tbc Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 384 kb/s – KiDy Nov 3 '18 at 10:45
  • Additional info re working m2t file added to original post following suggestion from Gyan. Thanks. – KiDy Nov 3 '18 at 11:04
0

Try

ffmpeg -i in -vf format=yuv420p,setsar=1 -g 25 -c:v libx264 -tune grain -profile:v high -refs 2 -x264opts bluray-compat=1:fake-interlaced=1:nalhrd=vbr:aud=1 -maxrate 20M -bufsize 20M -c:a ac3 -ac 2 out.ts

FFmpeg can't replicate Scan type, store method : Separated fields but it may not matter.

  • Initially had to add a hyphen to x264opts nalhrd to test the setting :). Unfortunately it did not work. Generated file still "not playable". Noticed the output was progressive, so removed "fake". Unfortunately still not playable. The generated output has a tbr of 25 where the working has 50 - don't know if that's the problem. – KiDy Nov 4 '18 at 8:34
  • ` order: Working m2t Gyan's proposal ...and without 'fake-' Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn, 50 tbc Stream #0:0[0x100 ]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc ` – KiDy Nov 4 '18 at 8:39
  • Output is meant to be progressive but flagged as interlaced, hence the fake – Gyan Nov 4 '18 at 9:31
  • Thx, but regardless of the output being fake-interleced or interlaced the Bravia refuses to play it :( Any chance of making the output show a tbr of 50? – KiDy Nov 4 '18 at 20:41
  • Add -r 50 -vsync vfr – Gyan Nov 5 '18 at 4:49
0

Eureka!

After many late nights and a lot of searching I managed to create a ffmpeg setup that creates an interlaced 1080i which my old (2009) Sony Bravia can stream from my NAS. This is the command line:

ffmpeg -y -i in.mov -c:v libx264 -pix_fmt yuv420p -level 4.0 -refs 1 ^
-x264opts b-pyramid=0:bluray-compat=1:interlaced=1:nal-hrd=vbr:aud=1 -maxrate 20M -bufsize 30M ^
-c:a ac3 -b:a 384k -f mpegts out.m2ts

I think one of the critical elements was setting the right level. The TV can handle -refs 1 and 2.

I cannot say that I understand the full depth of all settings and options, and any improvement suggestions are more than welcome!

The m2ts generated by ffmpeg has a tbr of 25:

Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x101](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 384 kb/s

...while the original "working m2t file" had a tbr of 50. Don't know what it means, and at least it doesn't seem to be making a difference

The input is a 1080i dnxhd from Davinci Resolve (unfortunately DR has very few options for delivering interlaced output).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.