News:

--

Main Menu

x264 incompatible with LG BluRay player

Started by Bart Z Lederman, June 28, 2020, 09:51:49 PM

Previous topic - Next topic

Bart Z Lederman

I'm seeing a really odd problem here.

I'm capturing video with VirtualDub using the x264vfw-H.264/MPEG-4 AVC codec (which also says libx264 core 152 r2851bm ba24889 in the configuration window, if that helps).  I usually play the videos back on an LG BluRay player from an external hard drive using the USB port.  The output plays fine, but usually I want to exit the file first with Avidemux (2.7 VC++ 64bits).  If I output Mpeg4 ASP (xvid4) to an AVI file, the video plays fine on the LG and most everywhere else.  But recently I've been looking at serving the video from a Windows system to Roku (both for myself, and for a friend).  This requires an x.264 video in an MP4 container, unless I add software that will transcode on the fly, and that makes fast forward and rewind impossible (the Roku Media Player is rather limited).

If I use ffmpeg to convert a video, which says it's doing Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)), the output plays fine everywhere.  If I use Avidemux and select the Mpeg4 AVC (x264) video codec, the output will play everywhere EXCEPT the LG BluRay; which rejects it as unplayable.

I've used MediaInfo to look at the files that play and the files that don't, looking at every line, and I can't find a difference.  I've used ffmpeg to look at the beginning of the file, and it seems to be the same for the videos that play and the ones that don't.  I have tried settings of Constant Bitrate (Single Pass), Constant Quantiser (Single Pass), Constant Rate Factor (Single Pass), Video size (Two Pass), and Average Bitrate (Two Pass), and all of them play everywhere I've tested except on the LG player.  I went through the options and tried turning on "BluRay compatibility" on the Output 1 tab, and it made no difference.  I tried setting the Profile to Baseline just in case it was going past what the LG can play, and it made no difference.  I tried changing the audio setting from AAC (lav) to AAC (FDK), and then to MP3, and it made no difference.  I've tried turning "fastdecode" on and off, and turning "faststart" on and off, and it made no difference.

I am getting very frustrated, and I'm running out of ideas on what to check.

Are there any known problems with the container file produced by Avidemux, or any known issues between
the x264 DLL used by Avidemux and the x264 DLLs used by VirtualDub and ffmpeg?

This is a typical ffmpeg command line which produces a video that plays.

ffmpeg -hide_banner -i "input.avi" -ss 00:02:53.4 -to 00:10:10.2 -preset veryslow -crf 22 ^
-tune +animation -movflags faststart -profile:v high -level 4.1 -c:a aac -b:a 192k -ar 48000 "output.mp4"

Going past level 4.1 does produce problems with the LG, but anything below High 4.1 that I've tried will work.

This is what ffmpeg says about a video that won't play

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sample for avidemux.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.20.100
  Duration: 00:00:13.48, start: 0.065998, bitrate: 1673 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1473 kb/s, 60 fps, 60 tb
r, 60002 tbn, 120 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 193 kb/s (default)
    Metadata:
      handler_name    : SoundHandler

This one will play, it came from the ffmpeg command given above:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'willplay.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.12.100
  Duration: 00:07:16.82, start: 0.000000, bitrate: 1744 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1539 kb/s, 60 fps, 60 tbr, 15360 tbn, 12
0 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s (default)
    Metadata:
      handler_name    : SoundHandler

the difference here is that I set the baseline low on purpose, but having it set to High L4.1 like ffmpeg
does not many any difference in any of my tests.  I've tested at main L4.1 and main L3.1 and it makes
no difference.

Could someone please tell me what I'm missing here?  At this point, even speculation will be welcome.


If you want to wade through it, this is MediaInfo for the video that doesn't play on the LG.

General
Complete name                            : Q:\Temporary\wontplay.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 2.69 MiB
Duration                                 : 13 s 483 ms
Overall bit rate                         : 1 673 kb/s
Writing application                      : Lavf58.20.100

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Baseline@L4
Format settings                          : 1 Ref Frames
Format settings, CABAC                   : No
Format settings, Reference frames        : 1 frame
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 13 s 450 ms
Bit rate                                 : 1 500 kb/s
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Frame rate                               : 60.000 FPS
Minimum frame rate                       : 59.942 FPS
Maximum frame rate                       : 60.062 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.027
Stream size                              : 2.36 MiB (88%)
Writing library                          : x264 core 146 r2538 121396c
Encoding settings                        : cabac=0 / ref=1 / deblock=1:1:1 / analyse=0x1:0x1 / me=dia / subme=1 / psy=1 / psy_rd=0.40:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / 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=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc=2pass / mbtree=0 / bitrate=1500 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:0.60
Codec configuration box                  : avcC

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 13 s 483 ms
Bit rate mode                            : Constant
Bit rate                                 : 192 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 318 KiB (12%)
Default                                  : Yes
Alternate group                          : 1

And this is one that does play:

General
Complete name                            : Q:\Temporary\Goggle Fishing Bear 1947.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 90.8 MiB
Duration                                 : 7 min 16 s
Overall bit rate                         : 1 744 kb/s
Writing application                      : Lavf58.12.100

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.1
Format settings                          : CABAC / 9 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 9 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 7 min 16 s
Bit rate                                 : 1 539 kb/s
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 60.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.028
Stream size                              : 80.2 MiB (88%)
Writing library                          : x264 core 155 r2901 7d0ff22
Encoding settings                        : cabac=1 / ref=9 / deblock=1:1:1 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=0.40:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=10 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=22.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:0.60
Codec configuration box                  : avcC

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 7 min 16 s
Bit rate mode                            : Constant
Bit rate                                 : 192 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 10.0 MiB (11%)
Default                                  : Yes
Alternate group                          : 1


eumagga0x2a

#1
Does the problem persist when you use the latest available nightly of Avidemux?

edit: I wonder whether LG doesn't like

Frame rate mode                          : Variable
Frame rate                               : 60.000 FPS
Minimum frame rate                       : 59.942 FPS
Maximum frame rate                       : 60.062 FPS


Recent nightlies might help then.

Bart Z Lederman

Thanks for the reply.

The frame rate is involved, but not in any way that makes sense to me.

The original file is avc x264 video, ac-3 audio, AVI container, 60 fps fixed.  LG will play that.

If I run it through ffmpeg and copy the video, or re-encode the video, it comes out at 60fps and LG will play that.

If I run it through Avidemux and change the frame rate to 30 fps, LG DOES play it.

Your suggestion that Avidemux is producing variable frame rate output is confirmed. 
This is the input file:

(deleted)

This is what I get if I run it through Avidemux and change the frame rate:

(Variable with small variations around 30fps).

If I run the same input file through Avidemux with no filters at all, just
re-encode with x264 I get this:

(variable frame rate with small variations around 60fps).

I get the same results re-encoding with Mpeg4, with a small variation in frame rate.

However, if I use the Mpeg4 codec and the output container is AVI, I get a fixed
frame rate at 60, which LG will play.

I've been using mostly AVI until now (the LG 'likes' it better), which might be why I haven't
seen this problem before.

I got curious, so I also encoded as x264, but with an MKV container and got a fixed
60 fps frame rate.

It appears that only MP4 containers are being turned into variable rate by Avidemux,
and only by Avidemux.  ffmpeg does not change the frame rate, the output is fixed 60 fps. 
HandBrake can also produce a fixed rate output.

So why is a constant frame rate input being changed to a variable frame rate output for
MP4 but not AVI or MKV, and why is only Avidemux doing it?

Granted, there may be a flaw in the LG firmware, but I think Avidemux is doing something
"wrong" here.

P.S.:

I had much more detail about the files in my reply, very similar to what I posted originally.
But the board won't let me post it, it keeps saying that my reply appears to be 'spam' but
won't say why.  I've cut down the message twice, but it keeps getting rejected and
I don't know where to go to find out how to fix it.  I'm going to include the original
message as an attachment.

P.P.S.:  I've had to trim my reply down to practically nothing.





Bart Z Lederman

O.K., another test and things are even fuzzier.

I opened the input file with Avidemux.  AVC, AC3, 60 fps fixed, AVI container.

I set Video to 'copy', Audio to 'copy', Format to 'MP4'. 

The output file is now 60 fps variable.

Frame rate mode                          : Variable
Frame rate                               : 60.000 FPS
Minimum frame rate                       : 59.940 FPS
Maximum frame rate                       : 60.060 FPS

So: are AVI and MKV ignoring small variations in the frame rate and marking
the file as "fixed" where MP4 is more sensitive (or accurate)? 

Or is Avidemux doing something to the video or audio stream even if the
operation is marked as "copy"?

I'm inclined to think that it's the second option, since ffmpeg will copy the
file and say the output is fixed rate, but I'm open to all suggestions.

Thanks again.

eumagga0x2a

The issue with perfectly regular constant frame rate videos turning into (pseudo-) variable frame rate videos after being muxed with the MP4 muxer in Avidemux was solved many months ago, however only after the 2.7.5 release. Please use the latest nightly which is currently from June 26:

https://avidemux.org/nightly/vsWin64/

Bart Z Lederman

I've done a quick test, and you are, of course, correct.

Thanks for letting me know this problem was already fixed.  I don't
normally use the nightly builds, but I'm willing to do more testing
in the future.

Bart Z Lederman

I may have posted too soon.

A short test on the same input file as before (AVC, AC-3, AVI, output of VirtualDub capturing a TV signal
at 60 FPS) resulted in a file with fixed 60 FPS.

A longer test of the same file, with filters to crop the image and cut out commercials resulted in this:

Frame rate mode Variable, Frame rate 60.000 FPS, Minimum frame rate 30.001 FPS,
Maximum frame rate 60.002 FPS

I don't see how this could have happened.

I have processed some other files this morning with constant frame rates (but lower than 60),
with various filters, and they came  out with a constant frame rates the same as the input.

Any ideas?

This is with the most recent nightly build

P.S.: I'm getting rejected for "SPAM" again.  Can anyone see something in the attached file
that is in any way offensive?

eumagga0x2a

Please reproduce the editing steps starting with loading the source file, applying filters and saving the output, close Avidemux, then compress and attach admlog.txt from %localappdata%\avidemux\ to your reply. After that please load the produced mp4 video in Avidemux, close Avidemux and post the new admlog.txt too.

From practical point of view, as you re-encode anyway, add the "Resample" video filter as the last one to the chain (but please not before you have provided admlog.txt to allow to assess the situation).

Quote from: Bart Z Lederman on June 29, 2020, 12:14:12 PM
P.S.: I'm getting rejected for "SPAM" again.  Can anyone see something in the attached file
that is in any way offensive?

No human being would qualify it as spam. It is the external automated AI (artificial idiocy) driven CleanTalk antispam service, which is a black box without any controls. My apologies for inconvenience. Clearing the browser cache or posting from a private browser window as well as changing the IP address may help.

Bart Z Lederman

I am attaching two admlog files as requested.

The first is the processing of the video file, producing an output with variable frame rate.

The second is what happens when I open that produced file in Avidemux.

I hope this helps.  If there is anything else I can do to help please let me know.

eumagga0x2a

Thank you, everything is clear now.

Quote[Avi] video stream attached:
[Avi] ______________________
[Avi] Extra Data  : 0
[Avi]  fccType     :vids (73646976)
[Avi]  fccHandler :H264 (34363248)
[Avi]  dwFlags: :0
[Avi]  wPriority: :0
[Avi]  wLanguage: :0
[Avi]  dwInitialFrames: :0
[Avi]  dwScale: :166666
[Avi]  dwRate: :10000000

Your source AVI file is not 60 fps. It uses an extremely high clock rate (time base denominator) of 10000000 with time base numerator of 166666 which is approx. 60.00024 fps – almost 60 fps but not exactly. Avidemux tries to approximate this time base as good as it can (for compatibility reasons it doesn't even try to crank the time base clock that high and limits it at 90000 – the clock used for MPEG timestamps. Based on time increment it uses the closest possible approximation when saving video:

Quote[HandleAction] 14:15:27-238 ************ SAVE_VIDEO **************
[dxvaRender::draw] 14:15:27-358 D3D : Draw!
[dxvaRender::refresh] 14:15:27-358 Refresh**
[admSaver::admSaver] 14:15:37-528 [Save] Encoder index=8
[admSaver::save] 14:15:37-528 Audio starting time 00:00:00,000
[admSaver::save] 14:15:37-528 [A_Save] Saving..
[VideoFilterBridge] Creating bridge from 0 s to 413 s
[ADM_EditorSegment::convertLinearTimeToSeg] 14:15:37-528 End of last segment
[ADM_Composer::getTimeBase] 14:15:37-528 Ref video 0 is frame-encoded, copy mode: 0
[usSecondsToFrac] 14:15:37-528 16666 us -> 1250 / 75003 (max: 90000)
[ADM_Composer::getTimeBase] 14:15:37-528 Timebase set to 1250 / 75003

This results in the MP4 having a single one frame of twice the duration of the regular frames:

Quote[MP4Header::indexify] 14:40:18-538 Build Track index, track timescale: 75003
[MP4Header::indexify] 14:40:18-539 Histogram map has 2 elements.
Frame duration 1250 count: 24785
Frame duration 2500 count: 1
[MP4Header::indexify] 14:40:18-539 Video index done.
[MP4Header::indexify] 14:40:18-539 Setting video timebase to 1250 / 75003

The bad thing is that LG probably doesn't like time base clock going beyond 60000 (I guess).

As the source file is not 60 fps and you need constant frame rate 60 fps, please either insert the "Resample" video filter if audio stays in perfect sync in the original file or use "Change FPS" to stretch video to really match 60 fps if audio gets slightly (~1 frame duration) behind.

Bart Z Lederman

Thanks for looking into this.

It's odd that the other programs like using ffmpeg directly don't see the problem.
It also seems a bit odd that VirtualDub is creating a file with such an odd clock. There
is nothing in their configuration panel about clock rates, and I'm reluctant to fiddle
with it not that it's working reliably.  It also seems a bit odd that this shows up only
in MP4 containers and not AVI or MKV, but I've never really gone into the technical
details of containers; I just know what works with the various computers and devices
I deal with regularly.   One factor that adds to the problem is that MediaInfo (which
is a program I like and use constantly) doesn't have this level of detail about the
clock, and even ffmpeg says it's 60 FPS.

The LG player is able to play the input file with no problems, and other 60 FPS videos, as
long as the metadata in the file says it's constant rate.  However, it does look as if the
programmers put a lot more work into decoding AVI and MPEG, and left MKV and MP4 as
a bit of an afterthought.  And the input file is AVI and says it's fixed 60 FPS, and that
seems to be enough for the firmware to decode the video properly.

Since other programs play the video properly, and even Roku plays the files with
variable clocks going from 30 to 60 fps (and Roku Media Player only plays a very
few types of videos) you could argue that the fault is entire with LG.

Regardless of all of that, using the Resample filter when I need to process these files
is an entirely reasonable solution.  Unfortunately, that output file plays everywhere
except on the LG player and on Roku.  Both are very finicky about what they will
play, so there might not be anything 'wrong' with it: however, if you feel like looking
at it I'm attaching the Avidemux log file from when I open the re-sampled file.

In the mean time, if I use the Resample filter and change the rate to 30 fps, that
solves the problem with LG (I need to test Roku with that) so I'll just run the
rate down to 30 fps for files that really need to be played 'everywhere'.  That
shouldn't matter for most of the videos I watch.


Thanks for explaining the problem and providing a solution.


eumagga0x2a

Quote from: Bart Z Lederman on June 29, 2020, 04:26:42 PM
It's odd that the other programs like using ffmpeg directly don't see the problem.

I can't extract this from the first log file, but I can't rule out that the codec time base in the source AVI matches 60 fps exactly (actually twice the fps = 120 fps for the reason that it describes imaginary field rate, not frame rate) and ffmpeg makes a good choice to believe the codec, not the container. Avidemux checks this in some demuxers as well as during delete / cut and paste operations in the editor, just not in the AVI demuxer, AFAIR.

QuoteIt also seems a bit odd that VirtualDub is creating a file with such an odd clock.

It looks like it uses 10000000/frameDurationInHundredsOfNanoSeconds as fps instead of a proper, exact fraction.

Quotewith it not that it's working reliably.  It also seems a bit odd that this shows up only in MP4 containers and not AVI or MKV

The source is AVI, so it shows up in AVI :-)

MKV doesn't follow the concept of all timestamps being expressed in a (custom) timescale and uses instead values rounded to the closest millisecond. It is up to the parsing application to replace these timestamps with an exact representation or not.

QuoteOne factor that adds to the problem is that MediaInfo (which is a program I like and use constantly) doesn't have this level of detail about the clock

MediaInfo has a formidable level of detail, you probably didn't try to run it as

mediainfo --Details=1 /path/to/the/file

It will print time base shortly below the fccType "vids" as "Scale" and "Rate".

Quoteand even ffmpeg says it's 60 FPS.

ffmpeg displays only rounded values.

QuoteThe LG player is able to play the input file with no problems, and other 60 FPS videos, as long as the metadata in the file says it's constant rate.

No metadata says it. AVI is always "constant rate" by design (it uses zero sized frames to imitate variable frame rate). I think that it rather doesn't like the frame duration to be shorter than 1/60 of a second (with some margin of error). Will this LG device play a "30 fps" video created by an Android smartphone (by any Android smartphone)? It is always variable fps with 1/90000 time base.

Quotethe input file is AVI and says it's fixed 60 FPS

It doesn't say in this case, at least not the container. Maybe the codec does.

Quote
Since other programs play the video properly, and even Roku plays the files with variable clocks going from 30 to 60 fps (and Roku Media Player only plays a very few types of videos) you could argue that the fault is entire with LG.

Regardless of all of that, using the Resample filter when I need to process these files is an entirely reasonable solution.  Unfortunately, that output file plays everywhereexcept on the LG player and on Roku.

I wonder whether it is related to

Quote[x264Encoder::setup] 14:46:49-160 =============x264, setting up==============
[usSecondsToFrac] 14:46:49-160 16666 us -> 8333 / 500000 (max: 2147483647)
[x264Encoder::setup] 14:46:49-160 Starting pass :1
[x264Encoder::setup] 14:46:49-160 Using average bitrate of 1500 kb/s
[x264Encoder::setup] 14:46:49-160 Appling fast first pass settings
cpu :1049583
i_threads :0
b_sliced_threads :0
b_deterministic :1
i_sync_lookahead :-1
i_width :994
i_height :720
i_width :994
i_level_idc :41
i_frame_total :0
i_sar_height :1
i_sar_width :1
i_overscan :0
i_vidformat :5
b_fullrange :-1
i_colorprim :2
i_transfer :2
i_colmatrix :-1
i_chroma_loc :0
i_fps_num :500000
i_fps_den :8333
i_timebase_num :1000
i_timebase_den :60000

While the time base is correct, the approximated value for frame duration, 16666, translates to a fps = 500000/8333, passed to the encoder, slightly exceeding 60 fps. On one hand that 16666 is obviously wrong (should be rounded up as 16667), but for internal working of Avidemux it may be dangerous to err in the direction of lower fps.

I'll make a short H.264 video in mp4 with 60 fps and frame duration rounded up to stay at or below 60 fps. I wonder how it fares on this LG device.

eumagga0x2a

Would you please test whether LG accepts the attached mp4?

From Avidemux console output:

[setup] 18:05:05-928  =============x264, setting up==============
[usSecondsToFrac] 18:05:05-928  16667 us -> 16667 / 1000000 (max: 2147483647)
cpu :1048639
i_threads :0
b_sliced_threads :0
b_deterministic :1
i_sync_lookahead :-1
i_width :720
i_height :576
i_width :720
i_level_idc :-1
i_frame_total :0
i_sar_height :1
i_sar_width :1
i_overscan :0
i_vidformat :5
b_fullrange :-1
i_colorprim :2
i_transfer :2
i_colmatrix :-1
i_chroma_loc :0
i_fps_num :1000000
i_fps_den :16667
i_timebase_num :1000
i_timebase_den :60000
b_vfr_input :0
i_frame_reference :3
i_keyint_max :250
i_keyint_min :25
i_scenecut_threshold :40
b_intra_refresh :0
i_bframe :0
i_bframe_adaptive :1
i_bframe_bias :0
i_bframe_pyramid :2
b_deblocking_filter :1
i_deblocking_filter_alphac0 :0
i_deblocking_filter_beta :0
b_cabac :1
i_cabac_init_idc :0
b_interlaced :0
b_tff :1
b_fake_interlaced :0
b_bluray_compat :0
b_constrained_intra :0
*************************************
*********     Analyse       *********
*************************************
intra :3
inter :307
b_transform_8x8 :1
i_weighted_pred :2
b_weighted_bipred :1
i_chroma_qp_offset :0
i_me_method :1
i_me_range :16
i_mv_range :-1
i_mv_range_thread :-1
i_subpel_refine :7
b_chroma_me :1
b_mixed_references :1
i_trellis :1
b_fast_pskip :1
b_dct_decimate :1
i_noise_reduction :0
f_psy_rd :1,000000
f_psy_trellis :0,000000
b_psy :1
b_aud :0
b_repeat_headers :0
b_annexb :1
i_luma_deadzone[0] :21
i_luma_deadzone[1] :11
i_sps_id :0
i_slice_max_size :0
i_slice_max_mbs :0
i_slice_count :0
*************************************
*********     RC            *********
*************************************
i_rc_method :1
i_qp_constant :-1
f_rf_constant :30,000000
i_qp_min :10
i_qp_max :51
i_qp_step :4
i_bitrate :0
i_qp_constant :-1
f_rate_tolerance :1,000000
i_vbv_max_bitrate :0
i_vbv_buffer_size :0
f_vbv_buffer_init :0,010000
f_ip_factor :1,400000
f_pb_factor :1,300000
i_aq_mode :1
f_aq_strength :1,000000
b_mb_tree :1
i_lookahead :40
[setup] 18:05:05-928  Creating x264 encoder
[setup] 18:05:05-930  x264, setup ok
[setup] 18:05:05-930  Creating global header
[ADM_videoStreamProcess] 18:05:05-930  [StreamProcess] Stream 720x576, codec : H264
[StreamProcess] Average FPS1000=59998, timebase: 1000 / 60000


Average fps is 59.998, slightly below 60 fps due to formally correct rounding of frame duration.

MediaInfo output:

mediainfo 500_frames_720x576_at_60fps.mp4
General
Complete name                            : 500_frames_720x576_at_60fps.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 218 KiB
Duration                                 : 8 s 363 ms
Overall bit rate                         : 214 kb/s
Writing application                      : Lavf58.29.100

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.1
Format settings                          : CABAC / 3 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 3 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 8 s 334 ms
Bit rate                                 : 139 kb/s
Width                                    : 720 pixels
Height                                   : 576 pixels
Display aspect ratio                     : 16:9
Original display aspect ratio            : 5:4
Frame rate mode                          : Constant
Frame rate                               : 60.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.006
Stream size                              : 142 KiB (65%)
Writing library                          : x264 core 159 r2991 1771b55
Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x133 / me=hex / subme=7 / psy=1 / psy_rd=1,00:0,00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=3 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=2 / keyint=125 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=30,0 / qcomp=0,60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1,40 / aq=1:1,00
Codec configuration box                  : avcC

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 8 s 363 ms
Bit rate mode                            : Constant
Bit rate                                 : 64.5 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 65.9 KiB (30%)
Default                                  : Yes
Alternate group                          : 1

Bart Z Lederman

Yes!  The video you sent me does work on the LG (and also on Roku).

I'm going to try doing a Resample with the slightly below 60 fps rate
just to see what happens.

As for MediaInfo, it's integrated into Windows Explorer, so I normally
just select a file and right-click.  I'll have to try doing it from the command
prompt and look at the other output.

Thanks for taking the time to look into this.


eumagga0x2a

Quote from: Bart Z Lederman on June 29, 2020, 07:23:11 PM
Yes!  The video you sent me does work on the LG (and also on Roku).

I'm going to try doing a Resample with the slightly below 60 fps rate
just to see what happens.

You should try the NTSC default "60" fps of 60000/1001 then because 60 fps is hardly ever used in broadcast. I don't quite understand your setup (in sense where the original material comes from), but I could imagine that that ~60 fps is bogus from the start on.

Alternatively I wonder whether "Change FPS" to 60 fps would match the real situation better.

Avoid using "Custom" setting in any of the above filters except of for integer values like 60.