M4V video files exported from Final Cut Pro are not playing

Weird. I exported some edited videos from FCP using “Apple devices 1080p” settings, that essentially create m4v file. The video got indexed by PhotoStructure, but when I attempt to play it in any browser on MacOS (Safari, Brave, FF) or iOS Safari - it does not. FireFox tells me: No video with supported format and MIME type found.

Shall I re-encode all my videos (there are not too many) to mov or mp4 (which are working) or is there a flag in PS I can flip to make it work?

Thanks.

Maybe! Here’s a list of the three settings you can tweak to ensure the video gets transcoded:

(In that post I was suggesting he avoid transcoding, but in your case, you want to ensure transcoding).

Thanks. I just checked settings.toml and it seems all options that prevent transcoding are commented out. This makes transcoding happening. Right?

~/Pictures/.photostructure$ cat ~/Pictures/.photostructure/settings.toml | grep 'PS_DO_NOT_TRANSCODE'
# environment: "PS_DO_NOT_TRANSCODE_AUDIO_CODECS"
# environment: "PS_DO_NOT_TRANSCODE_MIMETYPES"
# environment: "PS_DO_NOT_TRANSCODE_VIDEO_CODECS"

I can provide file sample via dropbox, if it helps.

K

Actually, your grep isn’t quite right: you hit the environment variable lines, and you need to pull out any uncommented lines from the toml. Do this:

grep -C4 ~/Pictures/.photostructure/settings.toml doNotTranscode

If everything’s commented (and using defaults), you should expect this:

$ grep -C4 doNotTranscode ~/Pictures/.photostructure/settings.toml 
# ]


# +-----------------------------+
# |  doNotTranscodeAudioCodecs  |
# +-----------------------------+
#
# Videos are transcoded when the "transcodeVideos" is set to true and is not
# one of the following audio codecs. The audio codec is stored in the
# "AudioCodec" tag.
#
# environment: "PS_DO_NOT_TRANSCODE_AUDIO_CODECS"
#
# doNotTranscodeAudioCodecs = [
#   "mp4a",
#   "sowt"
# ]


# +---------------------------+
# |  doNotTranscodeMimetypes  |
# +---------------------------+
#
# Videos are transcoded when the "transcodeVideos" is set to true and is not
# one of the following mimetypes. See
--
# use JSON encoding (like "['video/quicktime','video/mp4']").
#
# environment: "PS_DO_NOT_TRANSCODE_MIMETYPES"
#
# doNotTranscodeMimetypes = [
#   "video/quicktime",
#   "video/mp4",
#   "video/mpv",
#   "video/mp2t"
# ]


# +-----------------------------+
# |  doNotTranscodeVideoCodecs  |
# +-----------------------------+
#
# Videos are transcoded when the "transcodeVideos" is set to true and is not
# one of the following video codecs. The video codec may be stored in the
# "VideoCodec", "CompressorID", or "CompressorName" tags.
#
# environment: "PS_DO_NOT_TRANSCODE_VIDEO_CODECS"
#
# doNotTranscodeVideoCodecs = [
#   "avc1"
# ]

You can see if a video will be transcoded with the info tool:

$ ./photostructure info path/to/movie.mp4 | grep needsTranscoding
    needsTranscoding: false,

And you can see what video codec should be added/removed with exiftool:

$ exiftool -VideoCodec -CompressorID -CompressorName ../../examples/GOPR0333\ #2.MP4 
Compressor ID                   : avc1
Compressor Name                 : .GoPro AVC encoder

Yeah, my greps are “subjective” sometimes… I did proper one and it returned exactly what you suggested - all commented + defaults.

Then I did info tool:

$ ./photostructure info /media/DriveThree/Users/Shared/Family_Videos/2019/2019-06/2019-06-Holland.m4v  | grep needsTranscoding
    needsTranscoding: true,

Then this:

$ exiftool -VideoCodec -CompressorID -CompressorName /media/DriveThree/Users/Shared/Family_Videos/2019/2019-06/2019-06-Holland.m4v
Compressor ID                   : avc1

Maybe PS is ignoring “do not transcode” settings that are commented out? All these “double negatives” are making me judge my sanity a bit…

K

OMG I KNOW

The issue is that there are a lot (like, hundreds) of mimetypes and codecs that are not uncommon, and either Chrome, Safari, or Firefox (or several of them) can’t display them (browsers are pretty picky: that’ll improve with AV1 support, but at least for now, there’s basically one format that they all support). Long story long, it meant I kinda had to do a “these are OK list”.

Is there a better name for “these things are fine, don’t both transcoding them?” I’m happy to change the name of them (PhotoStructure already has the ability to migrate settings from one name to another between versions, because naming is hard).

I don’t have better naming suggestion atm. If it works for you and most, don’t touch it. :slight_smile:

I dropped the problematic m4v file into all of my browsers, it plays fine.

Is there a way for me to check what format/codec PS transcoded the file to? Where does it persist it?

K

The transcoded video sits in /your/library/.photostructure/previews/${asset id, split into subdirectories}video.mp4

You can see the asset id in the URL when you’re viewing an asset. You can also open up the network tab on your browser and look for “video.mp4” getting sent over the wire.

If the video doesn’t need to be transcoded (or the transcoded video isn’t found), the webserver will stream the original video directly to the browser.

Found it. It has dot in front of the file name: .49-video.mp4. I copied it to local storage and I am able to play it with video player apps and within the browser. However, it has saturated colours.

What’s interesting - now I can play some of these troublesome videos within PS, but not all… I have no idea what changed. The transcoded videos have March 11 create date.

K

After I did sync -force on the problematic file it starts playing in PS as well… I should probably stick with .mov and .mp4 formats/codecs and abandon .m4v…