Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 2nd February 2021, 07:39   #1  |  Link
sinkers
Registered User
 
Join Date: Oct 2012
Posts: 2
P frame only intra refresh

Is it possible with x264 to create a P frame only intra refresh stream/file?

I have a test file from another encoder that is all P frames + recovery points I am trying to recreate with this command:
x264 --input-res 1920x1080 --intra-refresh out.yuv --b-pyramid none --ref 0 -b 0 -o out.264

But I always get an I frame at the start
sinkers is offline   Reply With Quote
Old 2nd February 2021, 10:53   #2  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,988
You sure the other encode wasn't trimmed?
Blue_MiSfit is offline   Reply With Quote
Old 2nd February 2021, 18:06   #3  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Quote:
Originally Posted by Blue_MiSfit View Post
You sure the other encode wasn't trimmed?
Yeah, I can't imagine how else you could get a file like that. Since the first frame can't reference anything else, it has to be all-intra for it to be displayable.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 2nd February 2021, 23:49   #4  |  Link
sinkers
Registered User
 
Join Date: Oct 2012
Posts: 2
Quote:
Originally Posted by Blue_MiSfit View Post
You sure the other encode wasn't trimmed?
Quite likely it was and I'll try trimming to regenerate. It was a capture from a live feed but it could be decoded and played back.
sinkers is offline   Reply With Quote
Old 3rd February 2021, 04:34   #5  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Quote:
Originally Posted by sinkers View Post
Quite likely it was and I'll try trimming to regenerate. It was a capture from a live feed but it could be decoded and played back.
Is the first frame playable by itself?

I think bidirectional prediction could be used to make a non-IDR first frame playable using intra refresh if predicted blocks in the first frame refer to intra blocks later in the GOP. But I'd be surprised someone would bother to make such an esoteric encoder feature. And that would require B-frames as well.

An interesting concept for a "crazy encoder stunt."
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 3rd February 2021, 21:08   #6  |  Link
rwill
Registered User
 
Join Date: Dec 2013
Posts: 343
For streaming SPS and PPS have to be transferred for decode as well. When streaming with RTP or similar these are relayed by the application layer, which gets them from the encoder or from the start of the stream the encoder put out. I dont know if it is possible to insert SPS/PPS at random points at certain P frames with x264 out of the box. So you may need this first I frame for stream headers.

By the way you should use more reference frames than 0, more like 3 or 4.
rwill is offline   Reply With Quote
Old 3rd February 2021, 23:26   #7  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Quote:
Originally Posted by rwill View Post
By the way you should use more reference frames than 0, more like 3 or 4.
Yeah, --ref 0 would be the same as --keyint 1, I'd think. All I-frames. Can't have a Predicted frame without a frame to predict from!
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Reply

Tags
intra_refresh

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 13:18.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.