@@ -46,6 +46,7 @@ class ffmpeg
4646 };
4747 void show_encodes ()
4848 {
49+ std::cout<<" Which video encoding do you prefer: " <<std::endl;
4950 for (int i = 0 ; i < encodes.size (); i++)
5051 {
5152 std::cout << (i + 1 ) << " . " << encodes[i] << std::endl;
@@ -62,13 +63,17 @@ class ffmpeg
6263 // ENCODERS ACTIONS
6364 void select_crf ()
6465 {
66+ clear_screen ();
6567 int choice;
6668 crf.push_back (20 );
6769 crf.push_back (24 );
6870 crf.push_back (26 );
6971 crf.push_back (28 );
7072
7173 // showing the crf
74+ std::cout<<" Note: Higher the CRF value more the compression" ;
75+ std::cout<<std::endl;
76+ std::cout<<" Select CRF value: " <<std::endl;
7277 for (int i = 0 ; i < crf.size (); i++)
7378 {
7479 std::cout << (i + 1 ) << " . " << crf[i] << std::endl;
@@ -191,6 +196,7 @@ class ffmpeg
191196 }
192197 void select_videoBitrate ()
193198 {
199+ clear_screen ();
194200 /* Type Video Bitrate, Standard Frame Rate
195201 (24, 25, 30)
196202 Video Bitrate, High Frame Rate
@@ -228,6 +234,8 @@ class ffmpeg
228234 cout << " Your choice: " ;
229235 cin >> choice;
230236
237+ std::cout<<" Select the appropriate video bitrate (default is 8 MBPS): " ;
238+ std::cout<<std::endl;
231239 if (choice == 1 )
232240 {
233241 is_vb_selected = true ;
@@ -272,13 +280,13 @@ class ffmpeg
272280 std::cout << " Going without -vb option" ;
273281 std::cout << std::endl;
274282 }
275-
283+ clear_screen ();
276284 }
277285
278286 void h264 ()
279287 {
280288 // Taking the video name input
281- std::cout << " Please input the video file name: " ;
289+ std::cout << " Please input the video file name without file extension : " ;
282290 // getline(std::cin, video_name);
283291 std::cin >> video_name;
284292 clear_screen ();
@@ -291,6 +299,9 @@ class ffmpeg
291299 // preparing the prefix and suffix code for ffmpeg convertion
292300 std::cout << std::endl;
293301 std::cout << std::endl;
302+ std::cout<<" Generated code to run in your CLI in the specified video file Directory: " ;
303+ std::cout<<std::endl;
304+
294305 if (is_ab_selected = true )
295306 {
296307 std::cout << " ffmpeg -i " << video_name << " .mp4 -vcodec h264 -acodec aac -ab " << selected_audioBitrate << " k "
@@ -317,7 +328,7 @@ class ffmpeg
317328 case 1 : // h264
318329 {
319330 select_crf ();
320- select_audioBitrate ();
331+ // select_audioBitrate();
321332 select_videoBitrate ();
322333 do
323334 {
@@ -394,6 +405,15 @@ void homepage()
394405 {
395406 about ();
396407 }
408+ else if (choice == 3 )
409+ {
410+ std::cout<<" Exiting the program..............." <<std::endl;
411+ exit (0 );
412+ }
413+ else
414+ {
415+ exit (0 );
416+ }
397417}
398418
399419int main ()
0 commit comments