Jump to content


Photo
- - - - -

Video conversion tip


  • Please log in to reply
6 replies to this topic

#1 dargre

dargre

    Senior Member

  • Members
  • PipPipPipPipPip
  • 988 posts

Posted 28 December 2016 - 12:16 AM

I have noticed that many uploaded or grabbed h264/mp4 videos have General CodecID = 'isom'.

Unfortunately AVS script does not detect such codec id and always reconverts HD video, what is absolutely not necessary and takes most of conversion time.

For example every video grabbed from Pornub has General CodecId = "isom". Every Pornhub video is reconverted, including HD conversion. This is just waste of conversion time and resources, such HD video could be only copied as it's ready to use. Same concerns HD videos from many other sources.

 

You can extend detection of codec ID for "isom" type and your script will not reconvert HD video, just copy original mp4 file an save a lot of conversion time. Only video for mobile will be converted.

 

To do that you need to edit 2 files.

 

1. in file "/scripts/convert_videos.php" or "/scripts/convert_videos_ffmpeg.php"  find:

&& $vinfo['General_CodecID'] == "M4V"

Replace it to:

&& ($vinfo['General_CodecID'] == "M4V" || $vinfo['General_CodecID'] == "isom")

2. in file "/include/function_conversions,php" or "/include/function_conversions_ffmpeg,php" find :

&& $vinfo['General_CodecID'] == "M4V"

Replace it by:

&& ($vinfo['General_CodecID'] == "M4V" || $vinfo['General_CodecID'] == "isom")

This should save a lot of conversion time for many mp4 vidoes and avoid re-encoding HD video already fine for web streaming. Additionally if you look closer at some mp4 HD videos, eg. from Pornhub, they are reeally well compressed. If re-encoded the filesize is much bigger. But with tip above it stays original size.


Edited by dargre, 29 January 2017 - 12:44 AM.

  • Damien likes this

VIDEO.JS - best HTML5 player in the world for AVS script

NUEVOPLAYER 8 - best flash+html5 player for video scripts
Mods, custom code by NuevoLab (Search Suggest, Multiple image upload, Seo mods,and much more)


#2 maK

maK

    Member

  • Members
  • PipPip
  • 39 posts
  • LocationBrazil

Posted 06 January 2017 - 01:04 AM

Worked


logo2.png


#3 dargre

dargre

    Senior Member

  • Members
  • PipPipPipPipPip
  • 988 posts

Posted 07 January 2017 - 02:03 AM

Good for you.

Seems rest is not interested in saving about 70% of time required for single conversion.


VIDEO.JS - best HTML5 player in the world for AVS script

NUEVOPLAYER 8 - best flash+html5 player for video scripts
Mods, custom code by NuevoLab (Search Suggest, Multiple image upload, Seo mods,and much more)


#4 theone

theone

    Senior Member

  • Members
  • PipPipPipPip
  • 368 posts

Posted 08 January 2017 - 04:20 PM

Basic SD/HD conversion is quite antiquated. Adaptive Media Streaming like HLS is far more efficient and can deliver selective quality streams based on users bandwidth capabilities.

 

I’ve been developing a blazing fast video sharing application that offers a more modern and efficient solution to video streaming which will leave AVS choking on a cloud of dust.

 

AVS has failed to evolve with the progression of web technologies and conversion software over the years and it is simply not the most efficient way to run a video streaming site anymore.



#5 dargre

dargre

    Senior Member

  • Members
  • PipPipPipPipPip
  • 988 posts

Posted 15 January 2017 - 06:06 AM

As I wrote, most people here have no clue about video conversion, don't care to improve it or go for more advanced solutions.Since you mentioned about HLS streaming I wonder what is your experience in this area. Would be nice if you share it on forum.

 

Personally I've been playing with adaptive HLS lately a lot and found tons of issues or things I have doubts or not understand to the end. Starting from encoding for HLS segments, generating main m3u8 manifest, playback issues on Android, HTTPS issues on Android, option to switch between bitrates.

 

I've been using videojs player with my plugins container and HLS plugin.

I did succeeded with many streams, including several I generated myself and few from other sources.

I couldn't get to work bitrate switch plugin available on Github. Additionally such plugin requires further coding for bitreate menu display. So I decided to write such code myself and included it into my own plugin. Now there's no need to load quality picker script separately and code is 10 times smaller.

I decided to show multiple HLS streaming examples on my Nuevolab site dedicated to video js player with my plugin and theme.

 

https://www.nuevolab...js/examples/hls

 

Basically all streams are playing fine. I verified it to work on desktop Chrome, Firefox, IE, Opera. Also on iPad, iPhone, Android on my LG3. I found that manual bitrates switcher doesn't work on mobiles. but this concerns every other HTML5 player with such option. Also found bitrate switcher not working (not showing) on IE though I didn't elaborate it deeper yet. Found also issues with streaming on Anrdoid via HTTPS protocol. Will have to look at it deeper.

I even tested HLS live TV stream playback that surprisingly worked on every device/modern browser.

 

http://tests.nuevola...s/examples/live

 

All it looks promising but as every relatively new thing I guess it's still missing better support in all modern browsers and devices.

Most issues concerns Android playback and that's nothing new since HLS was initially developed by Apple for apple devices. So if you find HLS examples on other w2bsites, other players you may find it's not working on Android, though on Nuevolab site this should work fine.

 

Whatever, I have no doubts, HLS streaming is not something that many here (if any)  would be interested in.


Edited by dargre, 16 January 2017 - 01:58 AM.

VIDEO.JS - best HTML5 player in the world for AVS script

NUEVOPLAYER 8 - best flash+html5 player for video scripts
Mods, custom code by NuevoLab (Search Suggest, Multiple image upload, Seo mods,and much more)


#6 theone

theone

    Senior Member

  • Members
  • PipPipPipPip
  • 368 posts

Posted 15 January 2017 - 12:44 PM

 

Whatever, I have no doubts, HLS streaming is not something that many here (if any)  would be interested in.

 

That may be the case but adaptive streaming is the way of the future and if anyone intends to be in this business for the long haul they ought to embrace these new technologies (which are not limited to HLS ie. DASH). Bandwidth monitoring is an integral (and often overlooked) part of streaming video efficiently to large audiences on the internet.



#7 apple82

apple82

    Member

  • Members
  • PipPipPipPip
  • 293 posts
  • LocationSpain

Posted 20 January 2017 - 04:33 PM

I have put the code in my avs script and it seems that the mp4 works much faster and without problems.