Sometimes $vc reports AVC rather than x264

All about user-defined episode / movie / file name format expressions
Post Reply
dokuro
Posts: 22
Joined: 01 Sep 2023, 18:45

Sometimes $vc reports AVC rather than x264

Post by dokuro »

For context, here is the renaming syntax I'm using for my movies { ~plex.unix * {" {tmdb-$id}"} % {" [$vf $vc]"} }.

Sometimes however the $vc part of this syntax will report AVC and other times x264. Two examples below:

Justice League: Warworld (2023) {tmdb-1003581}/Justice League: Warworld (2023) [1080p AVC]
Castle in the Sky (1986) {tmdb-10515}/Castle in the Sky (1986) [1080p x264]

I suspect after looking into this on this forum and via mediainfo that when AVC is reported its taking the format info from the file, while with x264 its taking the writing library data. The file reporting AVC does not have writing library set.

So, my question. Giving my scenario above what would be the best way to always rename with the codec (x264 in this example). Maybe some find and replace but I'm not sure that is the best approach.
User avatar
rednoah
The Source
Posts: 22999
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Sometimes $vc reports AVC rather than x264

Post by rednoah »

:?: What does MediaInfo say?

:arrow: How do I share MediaInfo properties?
:idea: Please read the FAQ and How to Request Help.
dokuro
Posts: 22
Joined: 01 Sep 2023, 18:45

Re: Sometimes $vc reports AVC rather than x264

Post by dokuro »

Here you go:

Castle in the Sky (1986) {tmdb-10515}/Castle in the Sky (1986) [1080p AVC].mp4

Properties: Select all

# /data/MediaServer/14a-Movies/Animated/Castle in the Sky (1986) {tmdb-10515}/Castle in the Sky (1986) [1080p AVC].mp4

General #0
Count                      : 348
StreamCount                : 1
StreamKind                 : General
StreamKind/String          : General
StreamKindID               : 0
VideoCount                 : 1
AudioCount                 : 1
Video_Format_List          : AVC
Video_Format_WithHint_List : AVC
Video_Codec_List           : AVC
Audio_Format_List          : AAC LC
Audio_Format_WithHint_List : AAC LC
Audio_Codec_List           : AAC LC
Audio_Language_List        : en
Audio_Channels_Total       : 6
Format                     : MPEG-4
Format/String              : MPEG-4
Format/Extensions          : braw mov mp4 m4v m4a m4b m4p m4r 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v
Format_Commercial          : MPEG-4
Format_Profile             : Base Media
InternetMediaType          : video/mp4
CodecID                    : isom
CodecID/String             : isom (isom/iso2/avc1/mp41)
CodecID/Url                : http://www.apple.com/quicktime/download/standalone.html
CodecID_Compatible         : isom/iso2/avc1/mp41
FileSize                   : 2550093540
FileSize/String            : 2.37 GiB
FileSize/String1           : 2 GiB
FileSize/String2           : 2.4 GiB
FileSize/String3           : 2.37 GiB
FileSize/String4           : 2.375 GiB
Duration                   : 7473675
Duration/String            : 2h 4mn
Duration/String1           : 2h 4mn 33s 675ms
Duration/String2           : 2h 4mn
Duration/String3           : 02:04:33.675
Duration/String4           : 02:04:35;08
Duration/String5           : 02:04:33.675 (02:04:35;08)
OverallBitRate             : 2729681
OverallBitRate/String      : 2730 Kbps
FrameRate                  : 23.976
FrameRate/String           : 23.976 fps
FrameCount                 : 179184
StreamSize                 : 5118362
StreamSize/String          : 4.88 MiB (0%)
StreamSize/String1         : 5 MiB
StreamSize/String2         : 4.9 MiB
StreamSize/String3         : 4.88 MiB
StreamSize/String4         : 4.881 MiB
StreamSize/String5         : 4.88 MiB (0%)
StreamSize_Proportion      : 0.00201
HeaderSize                 : 40
DataSize                   : 2544975186
FooterSize                 : 5118314
IsStreamable               : No
Encoded_Date               : 2019-03-18 11:04:10 UTC
Tagged_Date                : 2019-03-18 11:04:10 UTC

Video #0
Count                            : 382
StreamCount                      : 1
StreamKind                       : Video
StreamKind/String                : Video
StreamKindID                     : 0
StreamOrder                      : 0
ID                               : 1
ID/String                        : 1
Format                           : AVC
Format/String                    : AVC
Format/Info                      : Advanced Video Codec
Format/Url                       : http://developers.videolan.org/x264.html
Format_Commercial                : AVC
Format_Profile                   : [email protected]
Format_Settings                  : CABAC / 4 Ref Frames
Format_Settings_CABAC            : Yes
Format_Settings_CABAC/String     : Yes
Format_Settings_RefFrames        : 4
Format_Settings_RefFrames/String : 4 frame
InternetMediaType                : video/H264
CodecID                          : avc1
CodecID/Info                     : Advanced Video Coding
Duration                         : 7473474
Duration/String                  : 2h 4mn
Duration/String1                 : 2h 4mn 33s 474ms
Duration/String2                 : 2h 4mn
Duration/String3                 : 02:04:33.474
Duration/String4                 : 02:04:35;08
Duration/String5                 : 02:04:33.474 (02:04:35;08)
BitRate                          : 2500000
BitRate/String                   : 2500 Kbps
Width                            : 1920
Width/String                     : 1920 pixel
Height                           : 1040
Height/String                    : 1040 pixel
Sampled_Width                    : 1920
Sampled_Height                   : 1040
PixelAspectRatio                 : 1.000
DisplayAspectRatio               : 1.846
DisplayAspectRatio/String        : 1.85:1
Rotation                         : 0.000
FrameRate_Mode                   : CFR
FrameRate_Mode/String            : CFR
FrameRate                        : 23.976
FrameRate/String                 : 23.976 (23976/1000) fps
FrameRate_Num                    : 23976
FrameRate_Den                    : 1000
FrameCount                       : 179184
ColorSpace                       : YUV
ChromaSubsampling                : 4:2:0
ChromaSubsampling/String         : 4:2:0
BitDepth                         : 8
BitDepth/String                  : 8 bit
ScanType                         : Progressive
ScanType/String                  : Progressive
Bits-(Pixel*Frame)               : 0.052
StreamSize                       : 2335711988
StreamSize/String                : 2.18 GiB (92%)
StreamSize/String1               : 2 GiB
StreamSize/String2               : 2.2 GiB
StreamSize/String3               : 2.18 GiB
StreamSize/String4               : 2.175 GiB
StreamSize/String5               : 2.18 GiB (92%)
StreamSize_Proportion            : 0.91593
Encoded_Library                  : x264 - core 152 r2851M ba24899
Encoded_Library/String           : x264 core 152 r2851M ba24899
Encoded_Library_Name             : x264
Encoded_Library_Version          : core 152 r2851M ba24899
Encoded_Library_Settings         : cabac=1 / ref=4 / deblock=1:-1:-1 / analyse=0x3:0x113 / me=umh / subme=9 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-3 / threads=32 / lookahead_threads=4 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / 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=50 / rc=2pass / mbtree=1 / bitrate=2500 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=31250 / vbv_bufsize=31250 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=3:1.00
Encoded_Date                     : 2019-03-18 11:04:10 UTC
Tagged_Date                      : 2019-03-18 11:04:10 UTC
CodecConfigurationBox            : avcC

Audio #0
Count                      : 285
StreamCount                : 1
StreamKind                 : Audio
StreamKind/String          : Audio
StreamKindID               : 0
StreamOrder                : 1
ID                         : 2
ID/String                  : 2
Format                     : AAC
Format/String              : AAC LC
Format/Info                : Advanced Audio Codec Low Complexity
Format_Commercial          : AAC
Format_AdditionalFeatures  : LC
CodecID                    : mp4a-40-2
Duration                   : 7473675
Duration/String            : 2h 4mn
Duration/String1           : 2h 4mn 33s 675ms
Duration/String2           : 2h 4mn
Duration/String3           : 02:04:33.675
Duration/String5           : 02:04:33.675
Duration_LastFrame         : -11
Duration_LastFrame/String  : -11ms
Duration_LastFrame/String1 : -11ms
Duration_LastFrame/String2 : -11ms
Duration_LastFrame/String3 : -00:00:00.011
Duration_LastFrame/String5 : -00:00:00.011
BitRate_Mode               : CBR
BitRate_Mode/String        : CBR
BitRate                    : 224000
BitRate/String             : 224 Kbps
Channel(s)                 : 6
Channel(s)/String          : 6 channel
ChannelPositions           : Front: L C R, Side: L R, LFE
ChannelPositions/String2   : 3/2/0.1
ChannelLayout              : C L R Ls Rs LFE
SamplesPerFrame            : 1024
SamplingRate               : 48000
SamplingRate/String        : 48.0 KHz
SamplingCount              : 358736400
FrameRate                  : 46.875
FrameRate/String           : 46.875 fps (1024 SPF)
FrameCount                 : 350329
Compression_Mode           : Lossy
Compression_Mode/String    : Lossy
StreamSize                 : 209263190
StreamSize/String          : 200 MiB (8%)
StreamSize/String1         : 200 MiB
StreamSize/String2         : 200 MiB
StreamSize/String3         : 200 MiB
StreamSize/String4         : 199.6 MiB
StreamSize/String5         : 200 MiB (8%)
StreamSize_Proportion      : 0.08206
Language                   : en
Language/String            : en
Language/String1           : en
Language/String2           : en
Language/String3           : eng
Language/String4           : en
Default                    : Yes
Default/String             : Yes
AlternateGroup             : 1
AlternateGroup/String      : 1
Encoded_Date               : 2019-03-18 11:04:10 UTC
Tagged_Date                : 2019-03-18 11:04:10 UTC
Done ヾ(@⌒ー⌒@)ノ
Justice League: Warworld (2023) [1080p AVC].mp4:

Properties: Select all

# /data/MediaServer/14a-Movies/Animated/Justice League: Warworld (2023) {tmdb-1003581}/Justice League: Warworld (2023) [1080p AVC].mp4

General #0
Count                      : 348
StreamCount                : 1
StreamKind                 : General
StreamKind/String          : General
StreamKindID               : 0
VideoCount                 : 1
AudioCount                 : 1
Video_Format_List          : AVC
Video_Format_WithHint_List : AVC
Video_Codec_List           : AVC
Audio_Format_List          : AAC LC
Audio_Format_WithHint_List : AAC LC
Audio_Codec_List           : AAC LC
Audio_Language_List        : en
Audio_Channels_Total       : 6
Format                     : MPEG-4
Format/String              : MPEG-4
Format/Extensions          : braw mov mp4 m4v m4a m4b m4p m4r 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v
Format_Commercial          : MPEG-4
Format_Profile             : Base Media
InternetMediaType          : video/mp4
CodecID                    : isom
CodecID/String             : isom (isom/iso2/avc1/mp41)
CodecID/Url                : http://www.apple.com/quicktime/download/standalone.html
CodecID_Compatible         : isom/iso2/avc1/mp41
FileSize                   : 1772967418
FileSize/String            : 1.65 GiB
FileSize/String1           : 2 GiB
FileSize/String2           : 1.7 GiB
FileSize/String3           : 1.65 GiB
FileSize/String4           : 1.651 GiB
Duration                   : 5368704
Duration/String            : 1h 29mn
Duration/String1           : 1h 29mn 28s 704ms
Duration/String2           : 1h 29mn
Duration/String3           : 01:29:28.704
Duration/String4           : 01:29:30;02
Duration/String5           : 01:29:28.704 (01:29:30;02)
OverallBitRate             : 2641930
OverallBitRate/String      : 2642 Kbps
FrameRate                  : 23.976
FrameRate/String           : 23.976 fps
FrameCount                 : 128720
StreamSize                 : 5108053
StreamSize/String          : 4.87 MiB (0%)
StreamSize/String1         : 5 MiB
StreamSize/String2         : 4.9 MiB
StreamSize/String3         : 4.87 MiB
StreamSize/String4         : 4.871 MiB
StreamSize/String5         : 4.87 MiB (0%)
StreamSize_Proportion      : 0.00288
HeaderSize                 : 40
DataSize                   : 1767861421
FooterSize                 : 5105957
IsStreamable               : No
Encoded_Application        : Lavf60.10.100
Encoded_Application/String : Lavf60.10.100

Video #0
Count                            : 382
StreamCount                      : 1
StreamKind                       : Video
StreamKind/String                : Video
StreamKindID                     : 0
StreamOrder                      : 0
ID                               : 1
ID/String                        : 1
Format                           : AVC
Format/String                    : AVC
Format/Info                      : Advanced Video Codec
Format/Url                       : http://developers.videolan.org/x264.html
Format_Commercial                : AVC
Format_Profile                   : [email protected]
Format_Settings                  : CABAC / 4 Ref Frames
Format_Settings_CABAC            : Yes
Format_Settings_CABAC/String     : Yes
Format_Settings_RefFrames        : 4
Format_Settings_RefFrames/String : 4 frame
InternetMediaType                : video/H264
CodecID                          : avc1
CodecID/Info                     : Advanced Video Coding
Duration                         : 5368697
Duration/String                  : 1h 29mn
Duration/String1                 : 1h 29mn 28s 697ms
Duration/String2                 : 1h 29mn
Duration/String3                 : 01:29:28.697
Duration/String4                 : 01:29:30;02
Duration/String5                 : 01:29:28.697 (01:29:30;02)
BitRate                          : 2250322
BitRate/String                   : 2250 Kbps
Width                            : 1920
Width/String                     : 1920 pixel
Height                           : 1080
Height/String                    : 1080 pixel
Stored_Height                    : 1088
Sampled_Width                    : 1920
Sampled_Height                   : 1080
PixelAspectRatio                 : 1.000
DisplayAspectRatio               : 1.778
DisplayAspectRatio/String        : 16:9
Rotation                         : 0.000
FrameRate_Mode                   : CFR
FrameRate_Mode/String            : CFR
FrameRate_Mode_Original          : VFR
FrameRate                        : 23.976
FrameRate/String                 : 23.976 (24000/1001) fps
FrameRate_Num                    : 24000
FrameRate_Den                    : 1001
FrameCount                       : 128720
ColorSpace                       : YUV
ChromaSubsampling                : 4:2:0
ChromaSubsampling/String         : 4:2:0
BitDepth                         : 8
BitDepth/String                  : 8 bit
ScanType                         : Progressive
ScanType/String                  : Progressive
Bits-(Pixel*Frame)               : 0.045
StreamSize                       : 1510161572
StreamSize/String                : 1.41 GiB (85%)
StreamSize/String1               : 1 GiB
StreamSize/String2               : 1.4 GiB
StreamSize/String3               : 1.41 GiB
StreamSize/String4               : 1.406 GiB
StreamSize/String5               : 1.41 GiB (85%)
StreamSize_Proportion            : 0.85177
CodecConfigurationBox            : avcC

Audio #0
Count                        : 287
StreamCount                  : 1
StreamKind                   : Audio
StreamKind/String            : Audio
StreamKindID                 : 0
StreamOrder                  : 1
ID                           : 2
ID/String                    : 2
Format                       : AAC
Format/String                : AAC LC
Format/Info                  : Advanced Audio Codec Low Complexity
Format_Commercial            : AAC
Format_AdditionalFeatures    : LC
CodecID                      : mp4a-40-2
Duration                     : 5368704
Duration/String              : 1h 29mn
Duration/String1             : 1h 29mn 28s 704ms
Duration/String2             : 1h 29mn
Duration/String3             : 01:29:28.704
Duration/String5             : 01:29:28.704
Source_Duration              : 5368746
Source_Duration/String       : 1h 29mn
Source_Duration/String1      : 1h 29mn 28s 746ms
Source_Duration/String2      : 1h 29mn
Source_Duration/String3      : 01:29:28.746
Source_Duration/String5      : 01:29:28.746
BitRate_Mode                 : CBR
BitRate_Mode/String          : CBR
BitRate                      : 384000
BitRate/String               : 384 Kbps
Channel(s)                   : 6
Channel(s)/String            : 6 channel
ChannelPositions             : Front: L C R, Side: L R, LFE
ChannelPositions/String2     : 3/2/0.1
ChannelLayout                : C L R Ls Rs LFE
SamplesPerFrame              : 1024
SamplingRate                 : 48000
SamplingRate/String          : 48.0 KHz
SamplingCount                : 257697792
FrameRate                    : 46.875
FrameRate/String             : 46.875 fps (1024 SPF)
FrameCount                   : 251658
Source_FrameCount            : 251660
Compression_Mode             : Lossy
Compression_Mode/String      : Lossy
StreamSize                   : 257697793
StreamSize/String            : 246 MiB (15%)
StreamSize/String1           : 246 MiB
StreamSize/String2           : 246 MiB
StreamSize/String3           : 246 MiB
StreamSize/String4           : 245.8 MiB
StreamSize/String5           : 246 MiB (15%)
StreamSize_Proportion        : 0.14535
Source_StreamSize            : 257699841
Source_StreamSize/String     : 246 MiB (15%)
Source_StreamSize/String1    : 246 MiB
Source_StreamSize/String2    : 246 MiB
Source_StreamSize/String3    : 246 MiB
Source_StreamSize/String4    : 245.8 MiB
Source_StreamSize/String5    : 246 MiB (15%)
Source_StreamSize_Proportion : 0.14535
Language                     : en
Language/String              : en
Language/String1             : en
Language/String2             : en
Language/String3             : eng
Language/String4             : en
Default                      : Yes
Default/String               : Yes
AlternateGroup               : 1
AlternateGroup/String        : 1
Source_Delay                 : -43
Source_Delay_Source          : Container
Done ヾ(@⌒ー⌒@)ノ
User avatar
rednoah
The Source
Posts: 22999
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Sometimes $vc reports AVC rather than x264

Post by rednoah »

:idea: {vc} will indeed yield x264 based on the Encoded_Library_Name property:

Properties: Select all

Encoded_Library_Name             : x264
:idea: If Encoded_Library_Name is missing, then it's not possible to know the file has been encoded with the x264 tools or any other h264 encoder. AVC H264 is standard and x264 is merely one commonly used implementation of that standard:

Properties: Select all

Format                           : AVC


:arrow: You can of course assume that Codec/AVC == Encoder/x264 for your purposes (though technically not necessarily correct) and have FileBot generates file paths accordingly:

Format: Select all

{ vc.replace('AVC':'x264') }
:idea: Please read the FAQ and How to Request Help.
dokuro
Posts: 22
Joined: 01 Sep 2023, 18:45

Re: Sometimes $vc reports AVC rather than x264

Post by dokuro »

Your response has confirmed what I suspected. I think I'll just go with {vcf} over {vc} as that will give me consistent format in the naming of my media and will always find standard used. Thanks again for your help.
Post Reply