Jump to content


Photo
- - - - -

Conversion Issue For FLV and Mobile Videos


  • Please log in to reply
4 replies to this topic

#1 dreck

dreck

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 22 December 2015 - 02:58 PM

Hey,

 

I am getting a strange problem where my videos do not work in FLV or Mobile. Videos only work with I press HD on the player.

It looks like it has something to do with the mencoder, but I am not too sure.

 

The file size for the videos in the FLV and IPHONE folder are 0.

 

You can see both of my logs posted below. The first is log2 and the second is log.

 

 

log2:

 

 

 

=========================================================
Argv
=========================================================
Parameters:
vdoname: 16.mp4
vid: 16
vdo_path: /home/user/public_html/media/videos/vid/16.mp4


Media Descriptors Commands



Media Info
$vinfo['General_FileExtension'] = 'mp4';
$vinfo['General_Duration'] = '41029';
$vinfo['General_Format'] = 'MPEG-4';
$vinfo['General_Format_Profile'] = 'Base Media / Version 2';
$vinfo['General_CodecID'] = 'mp42';
$vinfo['Video_Format'] = 'AVC';
$vinfo['Video_Format/Info'] = 'Advanced Video Codec';
$vinfo['Video_CodecID'] = 'avc1';
$vinfo['Video_CodecID/Info'] = 'Advanced Video Coding';
$vinfo['Video_Width'] = '640';
$vinfo['Video_Height'] = '360';
$vinfo['Video_PixelAspectRatio'] = '1.000';
$vinfo['Video_DisplayAspectRatio'] = '1.778';
$vinfo['Video_BitRate_Mode'] = '';
$vinfo['Video_BitRate'] = '450000';
$vinfo['Video_BitRate_Minimum'] = '';
$vinfo['Video_BitRate_Maximum'] = '';
$vinfo['Video_FrameRate_Mode'] = 'CFR';
$vinfo['Video_FrameRate'] = '30.000';
$vinfo['Video_FrameRate_Minimum'] = '';
$vinfo['Video_FrameRate_Maximum'] = '';
$vinfo['Video_ScanType'] = 'Progressive';
$vinfo['Video_Title'] = '';

=========================================================
Encoder Details
=========================================================
$video_type = normal
$aspect = 16:9
$vinfo['Original_Width'] = 640
$vinfo['Video_Width'] = 640
$mc =
$lavfopts =
$ofps = -ofps 30.000
$demuxer = -demuxer lavf
$keyint = 240


=========================================================
Array Data:
=========================================================
$e['0'] = 'normal';
$e['video_type'] = 'normal';
$e['aspect'] = 'all';
$e['encode_seq'] = '3';
$e['action'] = 'encode_ipod';
$e['ovc_profile'] = 'standard';
$e['resize_base'] = 'both';
$e['resize_width'] = '768';
$e['resize_height'] = '432';
$e['ref_bitrate'] = '750';
$e['ref_type'] = 'standard';
$e['ref_width'] = '1280';
$e['ref_height'] = '720';
$e['encodepass'] = '2';
$e['blackbars'] = '0';
$e['audio_sampling'] = '44100';
$e['audio_bitrate'] = '128';
$e['nameext'] = '';
$e['fileext'] = 'mp4';

=========================================================
Conversion Config:
=========================================================
encode_seq: 3
action: encode_ipod
resize_base: both
resize_width: 768
resize_height: 432
ref_bitrate: 750
ref_type: standard
ref_width: 1280
ref_height: 720
blackbars: 0
nameext:
encodepass: 2
neroAacEnc: /usr/bin/neroAacEnc
MP4Box: /usr/local/bin/MP4Box


=========================================================
Conversion Parameters:
=========================================================
width_new: 640
height_new: 360
vbitrate: 281
vf: -vf harddup


=========================================================
Command:
=========================================================
/usr/bin/mencoder /home/user/public_html/media/videos/vid/16.mp4 -o /dev/null -passlogfile /home/user/public_html/media/videos/iphone/16.log -ovc x264 -x264encopts turbo=1:bitrate=281:nocabac:vbv_maxrate=1500:vbv_bufsize=2000:level_idc=30:global_header:frameref=2:mixed_refs:me=umh:subq=6:partitions=all:threads=auto:bframes=0:pass=1 -af resample=44100:0:0,volnorm=1:0.25 -oac faac -faacopts mpeg=4:object=2:raw:br=128 -of lavf -lavfopts format=ipod -ofps 30.000 -vf harddup -demuxer lavf 2>&1 ; /usr/bin/mencoder /home/user/public_html/media/videos/vid/16.mp4 -o /home/user/public_html/media/videos/iphone/16.mp4 -passlogfile /home/user/public_html/media/videos/iphone/16.log -ovc x264 -x264encopts bitrate=281:nocabac:vbv_maxrate=1500:vbv_bufsize=2000:level_idc=30:global_header:frameref=2:mixed_refs:me=umh:subq=6:partitions=all:threads=auto:bframes=0:pass=2 -af resample=44100:0:0,volnorm=1:0.25 -oac faac -faacopts mpeg=4:object=2:raw:br=128 -of lavf -lavfopts format=ipod -ofps 30.000 -vf harddup -demuxer lavf 2>&1

Output:
MEncoder SVN-r31628-4.4.6 © 2000-2010 MPlayer Team
get_path("config") problem
Option x264encopts: turbo option is deprecated; use slow_firstpass to disable turbo
success: format: 0 data: 0x0 - 0x2a8336
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1dab670] max_analyze_duration reached
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang eng
VIDEO: [H264] 640x360 24bpp 30.000 fps 457.3 kbps (55.8 kbyte/s)
[V] filefmt:35 fourcc:0x34363248 size:640x360 fps:30.000 ftime:=0.0333
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
AUDIO: 44100 Hz, 2 ch, s16le, 50.2 kbit/3.56% (ratio: 6272->176400)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
** MUXER_LAVF *****************************************************************
REMEMBER: MEncoder's libavformat muxing is presently broken and can generate
INCORRECT files in the presence of B-frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
OK, exit.
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [harddup]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Pos: 0.0s 1f (13%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0]
1 duplicate frame(s)!
VIDEO CODEC ID: 28
AUDIO CODEC ID: 15002, TAG: 0
Writing header...
[ipod @ 0xaa8760]dimensions not set
MEncoder SVN-r31628-4.4.6 © 2000-2010 MPlayer Team
get_path("config") problem
success: format: 0 data: 0x0 - 0x2a8336
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x17146a0] max_analyze_duration reached
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang eng
VIDEO: [H264] 640x360 24bpp 30.000 fps 457.3 kbps (55.8 kbyte/s)
[V] filefmt:35 fourcc:0x34363248 size:640x360 fps:30.000 ftime:=0.0333
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
AUDIO: 44100 Hz, 2 ch, s16le, 50.2 kbit/3.56% (ratio: 6272->176400)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
** MUXER_LAVF *****************************************************************
REMEMBER: MEncoder's libavformat muxing is presently broken and can generate
INCORRECT files in the presence of B-frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
OK, exit.
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [harddup]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Pos: 0.0s 1f (13%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0]
1 duplicate frame(s)!
VIDEO CODEC ID: 28
AUDIO CODEC ID: 15002, TAG: 0
Writing header...
[ipod @ 0xaa8760]dimensions not set



=========================================================
Array Data:
=========================================================
$e['0'] = 'normal';
$e['video_type'] = 'normal';
$e['aspect'] = 'all';
$e['encode_seq'] = '2';
$e['action'] = 'encode_x264';
$e['ovc_profile'] = 'standard';
$e['resize_base'] = 'both';
$e['resize_width'] = '1280';
$e['resize_height'] = '720';
$e['ref_bitrate'] = '1500';
$e['ref_type'] = 'standard';
$e['ref_width'] = '1280';
$e['ref_height'] = '720';
$e['encodepass'] = '2';
$e['blackbars'] = '0';
$e['audio_sampling'] = '44100';
$e['audio_bitrate'] = '256';
$e['nameext'] = '';
$e['fileext'] = 'mp4';

=========================================================
Conversion Config:
=========================================================
encode_seq: 2
action: encode_x264
resize_base: both
resize_width: 1280
resize_height: 720
ref_bitrate: 1500
ref_type: standard
ref_width: 1280
ref_height: 720
blackbars: 0
nameext:
encodepass: 2
neroAacEnc: /usr/bin/neroAacEnc
MP4Box: /usr/local/bin/MP4Box


=========================================================
Conversion Parameters:
=========================================================
width_new: 640
height_new: 360
vbitrate: 563
vf: -vf harddup


=========================================================
SQL:
=========================================================
UPDATE video SET aspect_hd = '16:9', width_hd = '640', height_hd = '360', hd = '1', hd_filename = '16.mp4' WHERE VID = '16'


=========================================================
Array Data:
=========================================================
$e['0'] = 'normal';
$e['video_type'] = 'normal';
$e['aspect'] = 'all';
$e['encode_seq'] = '1';
$e['action'] = 'encode_h263';
$e['ovc_profile'] = 'standard';
$e['resize_base'] = 'both';
$e['resize_width'] = '853';
$e['resize_height'] = '480';
$e['ref_bitrate'] = '800';
$e['ref_type'] = 'fix';
$e['ref_width'] = '640';
$e['ref_height'] = '480';
$e['encodepass'] = '1';
$e['blackbars'] = '0';
$e['audio_sampling'] = '44100';
$e['audio_bitrate'] = '128';
$e['nameext'] = '';
$e['fileext'] = 'flv';

=========================================================
Conversion Config:
=========================================================
encode_seq: 1
action: encode_h263
resize_base: both
resize_width: 853
resize_height: 480
ref_bitrate: 800
ref_type: fix
ref_width: 640
ref_height: 480
blackbars: 0
nameext:
encodepass: 1
neroAacEnc: /usr/bin/neroAacEnc
MP4Box: /usr/local/bin/MP4Box


=========================================================
Conversion Parameters:
=========================================================
width_new: 640
height_new: 360
vbitrate: 800
vf: -vf harddup

HD FILE: /home/user/public_html/media/videos/hd/16.mp4
=========================================================
Command:
=========================================================
/usr/bin/mencoder /home/user/public_html/media/videos/vid/16.mp4 -o /home/user/public_html/media/videos/flv/16_temp.flv -ovc lavc -lavcopts vcodec=flv:vbitrate=800:mbd=2:mv0:trell:v4mv:keyint=240:cbp:last_pred=3:predia=4:dia=4:preme=2:vmax_b_frames=0:vb_strategy=1 -of lavf -oac mp3lame -lameopts abr:br=128 -srate 44100 -ofps 30.000 -vf harddup -demuxer lavf 2>&1

Output:
MEncoder SVN-r31628-4.4.6 © 2000-2010 MPlayer Team
get_path("config") problem
success: format: 0 data: 0x0 - 0x2a8336
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1d1c430] max_analyze_duration reached
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang eng
VIDEO: [H264] 640x360 24bpp 30.000 fps 457.3 kbps (55.8 kbyte/s)
[V] filefmt:35 fourcc:0x34363248 size:640x360 fps:30.000 ftime:=0.0333
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
AUDIO: 44100 Hz, 2 ch, s16le, 50.2 kbit/3.56% (ratio: 6272->176400)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
** MUXER_LAVF *****************************************************************
REMEMBER: MEncoder's libavformat muxing is presently broken and can generate
INCORRECT files in the presence of B-frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
OK, exit.
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [harddup]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
MP3 audio selected.
Pos: 0.0s 1f (13%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0]
1 duplicate frame(s)!
VIDEO CODEC ID: 22
AUDIO CODEC ID: 15001, TAG: 0
Writing header...
[flv @ 0x1d4b740] dimensions not set



=========================================================
Command:
=========================================================
/usr/bin/flvtool2 -Uv /home/user/public_html/media/videos/flv/16_temp.flv /home/user/public_html/media/videos/flv/16.flv 2>&1

Output:
ERROR: undefined method `timestamp' for nil:NilClass
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flv/stream.rb:285:in `lasttimestamp'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flv/stream.rb:274:in `duration'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flvtool2/base.rb:181:in `add_meta_data_tag'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flvtool2/base.rb:137:in `update'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flvtool2/base.rb:47:in `send'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flvtool2/base.rb:47:in `execute!'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flvtool2/base.rb:46:in `each'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flvtool2/base.rb:46:in `execute!'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flvtool2/base.rb:239:in `process_files'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flvtool2/base.rb:225:in `each'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flvtool2/base.rb:225:in `process_files'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flvtool2/base.rb:44:in `execute!'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flvtool2.rb:168:in `execute!'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flvtool2.rb:228
ERROR: /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
ERROR: /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/bin/flvtool2:2
ERROR: /usr/bin/flvtool2:19:in `load'
ERROR: /usr/bin/flvtool2:19
Skipping file /home/user/public_html/media/videos/flv/16_temp.flv


=========================================================
SQL:
=========================================================
UPDATE video SET active = '1' WHERE VID = '16'

 

 

 

 

log:

 

Part 1:

http://pastebin.com/nRf7eMtz

Part 2:

http://pastebin.com/kSbPeteJ

Edited by dreck, 22 December 2015 - 03:10 PM.


#2 dargre

dargre

    Senior Member

  • Members
  • PipPipPipPipPip
  • 988 posts

Posted 22 December 2015 - 09:49 PM

Indeed vf filter (dimensions) is not set for mencoder command. It's only "-vf harddup" without video dimensions (scale)

From what I could see AVS script skip scale values if original video dimensions is same as destination video.

But shuldn't be "-vf" filter skipped then too in mencoder command?

Or maybe better always force dimensions to be included for -vf filter.

 

I guess one of 2 solutions should work.

Unfortunatley I have no time to run multiple time consuming conversion tests.


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)


#3 dreck

dreck

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 27 December 2015 - 07:10 PM

Indeed vf filter (dimensions) is not set for mencoder command. It's only "-vf harddup" without video dimensions (scale)

From what I could see AVS script skip scale values if original video dimensions is same as destination video.

But shuldn't be "-vf" filter skipped then too in mencoder command?

Or maybe better always force dimensions to be included for -vf filter.

 

I guess one of 2 solutions should work.

Unfortunatley I have no time to run multiple time consuming conversion tests.

 

I do not quite understand the 2 solutions you want me to do.

 

Is it my mencoder or do I have to change some code in the AVS script?


Edited by dreck, 27 December 2015 - 07:10 PM.


#4 dargre

dargre

    Senior Member

  • Members
  • PipPipPipPipPip
  • 988 posts

Posted 29 December 2015 - 06:44 PM

My consideration is more to AVS developer.

I know it may be too complicated to understand by regular user, but it's not possible to explain it better.

From other hand what I described is really not so complicated for one with minimum understanding of php code and basic knowledge about script structure and not complicated to apply and test.


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)


#5 Admin99

Admin99

    Administrator

  • Administrators
  • 20 posts

Posted 10 January 2016 - 08:06 PM

Can you upload the same video on our demo ? And let's compare the logs