Answers.Body: <p>Try</p>
  
  <pre><code>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
  </code></pre>
  
  <p>FFmpeg can't replicate <code>Scan type, store method     : Separated fields</code> but it may not matter.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-04T08:34:21.397Z
Answers.Text: 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.
Answers.UserDisplayName: KiDy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-04T08:39:30.900Z
Answers.Text: `
      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
  `
Answers.UserDisplayName: KiDy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-04T09:31:01.920Z
Answers.Text: Output is meant to be progressive but flagged as interlaced, hence the `fake`
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-04T20:41:25.610Z
Answers.Text: 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?
Answers.UserDisplayName: KiDy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-05T04:49:33.507Z
Answers.Text: Add `-r 50 -vsync vfr`
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-05T17:10:34.580Z
Answers.Text: Thx, but with that tbr remained unchanged, while **fps** increased to 50 and **tbc** to 100.
Answers.UserDisplayName: KiDy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-05T17:24:45.490Z
Answers.Text: Share a small sample of your input.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-06T07:44:36.620Z
Answers.Text: Sure - is there a way to do that?
Answers.UserDisplayName: KiDy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-04T05:05:49.060Z
Answers.LastActivityDate: 2018-11-04T05:05:49.060Z
Answers.UserDisplayName: Gyan
Answers.Body: <p>Eureka!</p>
  
  <p>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:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>I think one of the critical elements was setting the right level. The TV can handle -refs 1 and 2.</p>
  
  <p>I cannot say that I understand the full depth of all settings and options, and any improvement suggestions are more than welcome! </p>
  
  <p>The m2ts generated by ffmpeg has a tbr of 25:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>...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</p>
  
  <p>The input is a 1080i dnxhd from Davinci Resolve (unfortunately DR has very few options for delivering interlaced output). </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-10T10:05:21.340Z
Answers.LastActivityDate: 2018-11-10T10:05:21.340Z
Answers.UserDisplayName: KiDy
Body: <pre><code>-f mp4 -c:v libx264 -preset veryslow -tune grain -profile:v high422 -flags +ildct+ilme 
  </code></pre>
  
  <p>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 20 Mbps, 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. </p>
  
  <ol>
  <li><p>I haven't found a way to create m2t files with FFmpeg.</p></li>
  <li><p>The TV is supposedly capable of handling MP4, but regardless of the settings tried — and I have tried dozens that all plays well on VLC (including BD compatible, PSP profiles and other) the TV just says 'not playable' </p></li>
  </ol>
  
  <p>Anyone has ideas for any of the two routes?</p>
  
  <p>Searching the internet I have learned that the Sony Bravia is known 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)</p>
  
  <p>FFprobe of working m2t file:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>Properties of working m2t by MediaTab:</p>
  
  <pre><code>===================== 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%)
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-03T10:21:25.477Z
Comments.Text: Share the log of `ffmpeg -i file.m2t` from one of the working VideoStudio files.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-03T10:45:01.227Z
Comments.Text: 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
Comments.UserDisplayName: KiDy
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-03T11:04:04.883Z
Comments.Text: Additional info re working m2t file added to original post following suggestion from Gyan. Thanks.
Comments.UserDisplayName: KiDy
Tags: <ffmpeg><encoding><conversion>
Title: FFmpeg for m2t and Sony Bravia - not working
UserDisplayName: KiDy
ThreadText: # FFmpeg for m2t and Sony Bravia - not working
  
  (Asked by: username_0 on 2018-11-03)
  
  ```
  -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 20 Mbps, 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 plays well on VLC (including BD compatible, PSP profiles and other) the TV just says 'not playable'
  
  Anyone has ideas for any of the two routes?
  
  Searching the internet I have learned that the Sony Bravia is known 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%)
  
  ```
  
  **Tags:** ffmpeg, encoding, conversion
  
  > **Comments:**
  > **username_1**: Share the log of `ffmpeg -i file.m2t` from one of the working VideoStudio files.  
  > **username_0**: 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  
  > **username_0**: Additional info re working m2t file added to original post following suggestion from username_1. Thanks.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-11-04. Score: 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.
  
  > **Comments:**
  > **username_0**: 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.  
  > **username_0**: `     order:     Working m2t     username_1'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 `  
  > **username_1**: Output is meant to be progressive but flagged as interlaced, hence the `fake`  
  > **username_0**: 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?  
  > **username_1**: Add `-r 50 -vsync vfr`  
  > **username_0**: Thx, but with that tbr remained unchanged, while **fps** increased to 50 and **tbc** to 100.  
  > **username_1**: Share a small sample of your input.  
  > **username_0**: Sure - is there a way to do that?  
  
  ---
  
  ### Answer by username_0 on 2018-11-10. Score: 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).
  
  
  ---
  
  