Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timebase inconsistent between /cls and /media endpoints #87

Open
Bohoaush opened this issue Dec 6, 2024 · 0 comments
Open

Timebase inconsistent between /cls and /media endpoints #87

Bohoaush opened this issue Dec 6, 2024 · 0 comments

Comments

@Bohoaush
Copy link

Bohoaush commented Dec 6, 2024

It appears according to the source code that the timebase for cinf, and therefore cls is counted from framerate (returning 1/25 in the example below). In the media endpoint it is taken directly from ffprobe (returning 1/90000 in the example below).

/cls example
"VIDEO/0VYPLNE/J_CPS0001_CENTRUMPROVAZENISPOT_20S_FHD" MOVIE 97611780 20200316173530 500 1/25

/media example
{"name":"VIDEO/0VYPLNE/J_CPS0001_CENTRUMPROVAZENISPOT_20S_FHD","path":"/mnt/video/0vyplne/J_CPS0001_CentrumProvazeniSpot_20s_FHD.mpg","size":97611780,"time":1584376530000,"field_order":"unknown","streams":[{"codec":{"long_name":"MPEG-2 video","type":"video","tag_string":"[0][0][0][0]"},"width":1920,"height":1080,"sample_aspect_ratio":"1:1","display_aspect_ratio":"16:9","pix_fmt":"yuv422p","time_base":"1/90000","start_time":"1.120000","bit_rate":"35000000"},{"codec":{"long_name":"PCM signed 20|24-bit big-endian","type":"audio","tag_string":"[0][0][0][0]"},"bits_per_raw_sample":"16","sample_fmt":"s16","sample_rate":"48000","channels":2,"channel_layout":"stereo","bits_per_sample":0,"time_base":"1/90000","start_time":"1.040000","duration_ts":1800030,"duration":"20.000333","bit_rate":"1536000"}],"format":{"name":"mpeg","long_name":"MPEG-PS (MPEG-2 Program Stream)","start_time":"1.040000","duration":"20.000333","bit_rate":"39044061"},"mediaSize":97611780,"mediaTime":1584376530000}

I personally only need the timebase to know the framerate, would PR with mapping video framerate to the mediainfo json be accepted?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant