Skip to content

Commit 5633b19

Browse files
committed
Merge pull request #148 from cchampet/ressource_addPresetsh264
Add presets h264 low quality/high quality
2 parents 152dd48 + 77d8f64 commit 5633b19

File tree

4 files changed

+21
-7
lines changed

4 files changed

+21
-7
lines changed

ressource/v_h264.prf

Lines changed: 0 additions & 5 deletions
This file was deleted.

ressource/v_h264_hq.prf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
avProfileName=h264-hq
2+
avProfileLongName=H.264 High Quality
3+
avProfileType=avProfileTypeVideo
4+
codec=h264
5+
pix_fmt=yuv422p
6+
profile=high422
7+
preset=slow
8+
tune=fastdecode,zerolatency
9+
level=5

ressource/v_h264_lq.prf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
avProfileName=h264-lq
2+
avProfileLongName=H.264 Low Quality
3+
avProfileType=avProfileTypeVideo
4+
codec=h264
5+
pix_fmt=yuv420p
6+
profile=baseline
7+
preset=ultrafast
8+
tune=fastdecode,zerolatency
9+
level=3

src/AvTranscoder/profile/util.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ int getFilesInDir( const std::string& dir, std::vector< std::string >& files )
5959
{
6060
const std::string filename( findData.cFileName );
6161
bool isdir = ( findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ) != 0;
62-
if( ! isdir )
62+
if( ! isdir && filename.find(".prf") != std::string::npos )
6363
files.push_back( filename );
6464

6565
int rval = FindNextFile( findHandle, &findData );
@@ -81,7 +81,8 @@ int getFilesInDir( const std::string& dir, std::vector< std::string >& files )
8181
const std::string filename( dirp->d_name );
8282
if( filename == "." || filename == ".." )
8383
continue;
84-
files.push_back( filename );
84+
if( filename.find(".prf") != std::string::npos )
85+
files.push_back( filename );
8586
}
8687
closedir( dp );
8788
#endif

0 commit comments

Comments
 (0)