Title: request Please !
Last modified: October 14, 2017

---

# request Please !

 *  Resolved [momkin](https://wordpress.org/support/users/momkin/)
 * (@momkin)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/request-please/)
 * Hello , first of all i wanna thank you very much for this good plugin ,
    and 
   i really need your help with original file name ,
 * after the FFMPEG encode finished i got 3 files
    test.mp4 ( original ) test-360.
   mp4 test-custom.mp4
 * what i need is adding 720 to the original file name like test.mp4 to something
   like test-720.mp4
 * is it possible ? if yes can you please tell me what i change ?
    -  This topic was modified 8 years, 8 months ago by [momkin](https://wordpress.org/support/users/momkin/).

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/request-please/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/request-please/page/2/?output_format=md)

 *  Plugin Author [Kyle Gilman](https://wordpress.org/support/users/kylegilman/)
 * (@kylegilman)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/request-please/#post-9591480)
 * I think this would be more complicated than it sounds. Unfortunately a lot of
   the fundamental processes of the plugin rely on the naming structure rather than
   metadata because when I started writing this plugin in 2010 I didn’t use the 
   database to keep track of the additional encoded files. So changing the name 
   of the original file to test-720.mp4 will send the plugin off looking for test-
   720-360.mp4 and test-720-custom.mp4. Are you using the plugin for playback on
   the front end or just for encoding videos?
 *  Thread Starter [momkin](https://wordpress.org/support/users/momkin/)
 * (@momkin)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/request-please/#post-9592103)
 * Hi Kyle Gilman
    thanks for your time and you reply i think you didn’t understand
   me I’m only using the plugin for encoding the videos i don’t use it for playback
   or anything else
 * my problem is I’m using nginx hls streaming so the files must ends with word 
   like this
 * big_buck_bunny-720.mp4 (original)
    big_buck_bunny-360.mp4 big_buck_bunny-custom.
   mp4
 * now lets me make it more clear for you , the only thing i need to touch is the
   original file name i want to add a word before .mp4 extension like this
 * before
    big_buck_bunny.mp4
 * after
    big_buck_bunny-720.mp4
 * i don’t want to touch the 360 and custom files 🙂
 * i have noticed that when the original file encoding it added -fullres to the 
   new file but after the encoding process finished the name changes back to the
   original file name which i don’t want to
 * can i change something to let him keep -fullres.mp4 even after the encoding finished??
    -  This reply was modified 8 years, 7 months ago by [momkin](https://wordpress.org/support/users/momkin/).
    -  This reply was modified 8 years, 7 months ago by [momkin](https://wordpress.org/support/users/momkin/).
 *  Plugin Author [Kyle Gilman](https://wordpress.org/support/users/kylegilman/)
 * (@kylegilman)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/request-please/#post-9592140)
 * That’s why I asked if you were using the plugin for playback on the frontend.
   It’s a much simpler issue now that I know you’re not. I know you don’t want to
   touch the 360 and custom files, but my plugin’s video player would have been 
   confused if you changed the name of the original file.
 * Will the original video file always be 720?
 *  Thread Starter [momkin](https://wordpress.org/support/users/momkin/)
 * (@momkin)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/request-please/#post-9592167)
 * Hi
    yes it must always added -720 to the original file name and keep it, so the
   nginx hls streaming can recognize the biterates automatically because it needs
   to be like this
 * [http://wordpress.to/hls/big_buck_bunny,-custom,-360,-720](http://wordpress.to/hls/big_buck_bunny,-custom,-360,-720),.
   mp4.urlset/master.m3u8
    -  This reply was modified 8 years, 7 months ago by [momkin](https://wordpress.org/support/users/momkin/).
 *  Plugin Author [Kyle Gilman](https://wordpress.org/support/users/kylegilman/)
 * (@kylegilman)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/request-please/#post-9592189)
 * Right, but will you ever be in a situation where your original video file is 
   1080 or 360 or 2160 or something other than 720?
 *  Thread Starter [momkin](https://wordpress.org/support/users/momkin/)
 * (@momkin)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/request-please/#post-9592205)
 * Hi
    the name doesn’t really matter it can be anything i just want to add in order
   for nginx to recognize the biterates by names
 * if the original name doesn’t have ending like -720 it won’t be loaded it will
   only load the -360 + -custom version
 * so that’s why i need the original file name to have unique word at the end like-
   720 or -1080 or anything
 *  Plugin Author [Kyle Gilman](https://wordpress.org/support/users/kylegilman/)
 * (@kylegilman)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/request-please/#post-9592231)
 * I think this will accomplish what you need. I’m not sure of the consequences 
   for other functions in the plugin. On line 7837 in video-embed-thumbnail-generator.
   php, find this code
 * `$new_filename = str_replace("-fullres", "", $encoded_filename);`
 * What that does is replace “-fullres” with nothing. If you just want to keep the“-
   fullres” in the file name, change it to
 * `$new_filename = $encoded_filename;`
 * Or if you want to change it to “-720” or any other arbitrary text
 * `$new_filename = str_replace("-fullres", "-720", $encoded_filename);`
    -  This reply was modified 8 years, 7 months ago by [Kyle Gilman](https://wordpress.org/support/users/kylegilman/).
 *  Thread Starter [momkin](https://wordpress.org/support/users/momkin/)
 * (@momkin)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/request-please/#post-9592255)
 * Hi
    i think it didn’t works after the encoding completed the file restored the
   original file name
 * big_buck_bunny.mp4
 *  Plugin Author [Kyle Gilman](https://wordpress.org/support/users/kylegilman/)
 * (@kylegilman)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/request-please/#post-9592381)
 * Oh, I see. That part of the code only applies when you’re changing formats (from
   webm to mp4 for example).
 * Try this instead. Line 7854
 * `$new_filename = $original_filename;`
 * Change to
 * `$new_filename = $encoded_filename;`
 * And change the next line
 * `$new_url = $video_encode_queue[$video_key]['movieurl'];`
 * to
 * `$new_url = str_replace('.mp4', '-fullres.mp4', $video_encode_queue[$video_key]['
   movieurl']);`
 *  Thread Starter [momkin](https://wordpress.org/support/users/momkin/)
 * (@momkin)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/request-please/#post-9592457)
 * Very good , it worked now
    thank you very much 🙂
 * just one last question
 * is there an easy way to make the encoding priority like this
 * first : -360
    second : -custom finally : -fullres
 * because right now it starts with -fullres
 * thanks again !
 *  Plugin Author [Kyle Gilman](https://wordpress.org/support/users/kylegilman/)
 * (@kylegilman)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/request-please/#post-9592536)
 * I think if you rearrange the sections of the $video_formats array that should
   sort things out.
 * Right before line 521
 * `if ( !$return_replace && $options['replace_format'] != 'fullres' ) { unset($
   video_formats[$options['replace_format']]); }`
 * Add this
 *     ```
       $new_video_format_keys_order = array(
           '1080', 
           '720', 
           'mobile', 
           'custom_h264', 
           'webm', 
           'vp9', 
           'ogg', 
           'fullres'
       );
       foreach ($new_video_format_keys_order as $key) {
           $new_video_formats[$key] = $video_formats[$key];
       }
       $video_formats = $new_video_formats;
       ```
   
    -  This reply was modified 8 years, 7 months ago by [Kyle Gilman](https://wordpress.org/support/users/kylegilman/).
 *  Thread Starter [momkin](https://wordpress.org/support/users/momkin/)
 * (@momkin)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/request-please/#post-9592552)
 * What do you mean by rearrange ?
 * i did what you asked me to do and i got this error at the top
 * Warning: array_key_exists() expects parameter 2 to be array, null given in /home/
   user/public_html/wp-content/plugins/video-embed-thumbnail-generator/video-embed-
   thumbnail-generator.php on line 1149
 *  Thread Starter [momkin](https://wordpress.org/support/users/momkin/)
 * (@momkin)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/request-please/#post-9592577)
 * By the way after i encoded 3 more videos , the -fullres files just got disappeared
 * only -360 and -custom are exists 🙁
 *  Thread Starter [momkin](https://wordpress.org/support/users/momkin/)
 * (@momkin)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/request-please/#post-9598657)
 * Hi
    can you please fix this issue with rearrange
 * Warning: array_key_exists() expects parameter 2 to be array, null given in /home/
   user/public_html/wp-content/plugins/video-embed-thumbnail-generator/video-embed-
   thumbnail-generator.php on line 1149 ??
 *  Plugin Author [Kyle Gilman](https://wordpress.org/support/users/kylegilman/)
 * (@kylegilman)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/request-please/#post-9598682)
 * Yes, please be patient. I wrote those free customizations for you without testing
   them and I need to find some spare time to test and debug them.

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/request-please/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/request-please/page/2/?output_format=md)

The topic ‘request Please !’ is closed to new replies.

 * ![](https://ps.w.org/video-embed-thumbnail-generator/assets/icon.svg?rev=2965979)
 * [Videopack](https://wordpress.org/plugins/video-embed-thumbnail-generator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/video-embed-thumbnail-generator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/video-embed-thumbnail-generator/)
 * [Active Topics](https://wordpress.org/support/plugin/video-embed-thumbnail-generator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/video-embed-thumbnail-generator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/video-embed-thumbnail-generator/reviews/)

 * 18 replies
 * 2 participants
 * Last reply from: [momkin](https://wordpress.org/support/users/momkin/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/request-please/page/2/#post-9613564)
 * Status: resolved