Issues with partial encoding, but results are successful.

Discussion of the HandBrake command line interface (CLI)
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
sonyrules
Posts: 2
Joined: Sun May 29, 2016 3:57 am

Issues with partial encoding, but results are successful.

Post by sonyrules »

I have created a bash script that works with PHP to automate video encoding from mobile devices. Everything appears to be working correctly, but it appears the videos do not encode all the way. I have changed many settings, but no matter what i do, it stops playing somewhere in the video. It usually stops at the same spot everytime i encode it. The original does not have any problems. The problem is duplicated on a mobile device and my desktop. This only happens from the CLI version. I have a MAC and if i encode it on that, I do not experience any issues (gui)

- I am using Ubuntu Server 14.04
- I believe it is the current version (installed about 2 weeks ago)
- Command : HandBrakeCLI -i /var/www/html/video_process/temp/original-$filename -o /var/www/html/video_process/temp/$filename -e x264 -r 30 -q 24 -O -w 1280
- below is the code from the process running.

Sample Video can be viewed at http://www.udsgroup.net/lilly/04748c40c ... 7a8b21.mp4

Code: Select all

 HandBrake 0.10.5 (2016021100) - Linux x86_64 - https://handbrake.fr
1 CPU detected
Opening /var/www/html/video_process/temp/original-9c427f45f55baf24f83d0f02176d0e5c3ba3f6e4.mp4...
[23:40:24] CPU: Intel(R) Core(TM) i3-2100 CPU @ 3.10GHz
[23:40:24]  - Intel microarchitecture Sandy Bridge
[23:40:24]  - logical processor count: 1
[23:40:24] OpenCL: library not available
[23:40:24] hb_scan: path=/var/www/html/video_process/temp/original-9c427f45f55baf24f83d0f02176d0e5c3ba3f6e4.mp4, title_index=1
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /var/www/html/video_process/temp/original-9c427f45f55baf24f83d0f02176d0e5c3ba3f6e4.mp4/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /var/www/html/video_process/temp/original-9c427f45f55baf24f83d0f02176d0e5c3ba3f6e4.mp4/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(/var/www/html/video_process/temp/original-9c427f45f55baf24f83d0f02176d0e5c3ba3f6e4.mp4) failed
[23:40:24] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[23:40:24] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/html/video_process/temp/original-9c427f45f55baf24f83d0f02176d0e5c3ba3f6e4.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2016-05-13 00:23:56
  Duration: 00:00:24.21, start: 0.000000, bitrate: 17053 kb/s
    Stream #0.0(eng): Video: h264 (Baseline), yuv420p, 1920x1080, 16990 kb/s, PAR 65536:65536 DAR 16:9, 29.92 fps, 90k tbn (default)
    Metadata:
      creation_time   : 2016-05-13 00:23:56
    Stream #0.1(eng): Audio: aac, 48000 Hz, mono, fltp, 96 kb/s (default)
    Metadata:
      creation_time   : 2016-05-13 00:23:56
[23:40:24] scan: decoding previews for title 1
[23:40:25] scan: audio 0x1: aac, rate=48000Hz, bitrate=96051 English (AAC) (1.0 ch)
Scanning title 1 of 1, preview 6, 60.00 %[23:40:25] scan: 10 previews, 1920x1080, 29.905 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 65536:65536
[23:40:25] libhb: scan thread found 1 valid title(s)
+ title 1:
  + stream: /var/www/html/video_process/temp/original-9c427f45f55baf24f83d0f02176d0e5c3ba3f6e4.mp4
  + duration: 00:00:24
  + size: 1920x1080, pixel aspect: 65536/65536, display aspect: 1.78, 29.905 fps
  + autocrop: 0/0/0/0
  + support opencl: no
  + support hwd: not built-in
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 00:00:24
  + audio tracks:
    + 1, English (AAC) (1.0 ch) (iso639-2: eng)
  + subtitle tracks:
[23:40:25] 1 job(s) to process
[23:40:25] starting job
[23:40:25] work: mixdown not specified, track 1 setting mixdown Mono
[23:40:25] work: bitrate not specified, track 1 setting bitrate 80 Kbps
[23:40:25] sync: expecting 724 video frames
[23:40:25] job configuration:
[23:40:25]  * source
[23:40:25]    + /var/www/html/video_process/temp/original-9c427f45f55baf24f83d0f02176d0e5c3ba3f6e4.mp4
[23:40:25]    + title 1, chapter(s) 1 to 1
[23:40:25]    + container: mov,mp4,m4a,3gp,3g2,mj2
[23:40:25]    + data rate: 17053 kbps
[23:40:25]  * destination
[23:40:25]    + /var/www/html/video_process/temp/9c427f45f55baf24f83d0f02176d0e5c3ba3f6e4.mp4
[23:40:25]    + container: MPEG-4 (libavformat)
[23:40:25]      + optimized for HTTP streaming (fast start)
[23:40:25]  * video track
[23:40:25]    + decoder: h264
[23:40:25]      + bitrate 16990 kbps
[23:40:25]    + filters
[23:40:25]      + Framerate Shaper (1:27000000:900000)
[23:40:25]        + frame rate: 29.905 fps -> constant 30.000 fps
[23:40:25]      + Crop and Scale (1280:720:0:0:0:0)
[23:40:25]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1280 * 720
[23:40:25]    + dimensions: 1280 * 720, mod 0
[23:40:25]    + encoder: H.264 (libx264)
[23:40:25]      + quality: 24.00 (RF)
[23:40:25]  * audio track 1
[23:40:25]    + decoder: English (AAC) (1.0 ch) (track 1, id 0x1)
[23:40:25]      + bitrate: 96 kbps, samplerate: 48000 Hz
[23:40:25]    + mixdown: Mono
[23:40:25]    + encoder: AAC (libavcodec)
[23:40:25]      + bitrate: 80 kbps, samplerate: 48000 Hz
[23:40:25] encx264: min-keyint: 30, keyint: 300
[23:40:25] encx264: encoding at constant RF 24.000000
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: [23:40:25] reader: first SCR 0 id 0x1 DTS 0
profile High, level 3.1
Encoding: task 1 of 1, 91.02 % (6.99 fps, avg 9.32 fps, ETA 00h00m07s)[23:41:37] reader: done. 1 scr changes
Encoding: task 1 of 1, 98.90 % (9.98 fps, avg 9.32 fps, ETA 00h00m01s)[23:41:48] work: average encoding speed for job is 9.319335 fps
Encoding: task 1 of 1, 98.90 % (9.98 fps, avg 9.32 fps, ETA 00h00m01s)[23:41:49] sync: got 717 frames, 724 expected
[23:41:49] render: 719 frames output, 0 dropped and 2 duped for CFR/PFR
[23:41:49] render: lost time: 0 (0 frames)
[23:41:49] render: gained time: 0 (0 frames) (0 not accounted for)
[23:41:49] h264-decoder done: 717 frames, 0 decoder errors, 0 drops
x264 [info]: frame I:4     Avg QP:25.26  size: 72970
x264 [info]: frame P:385   Avg QP:26.98  size: 29796
x264 [info]: frame B:330   Avg QP:30.12  size:  3978
x264 [info]: consecutive B-frames:  8.2% 91.8%  0.0%  0.0%
x264 [info]: mb I  I16..4:  3.1% 82.2% 14.7%
x264 [info]: mb P  I16..4:  0.3%  5.2%  0.9%  P16..4: 47.5% 19.8% 14.2%  0.0%  0.0%    skip:12.1%
x264 [info]: mb B  I16..4:  0.0%  0.2%  0.0%  B16..8: 42.6%  2.9%  0.6%  direct: 1.4%  skip:52.4%  L0:34.3% L1:58.2% BI: 7.6%
x264 [info]: 8x8 transform intra:81.7% inter:65.7%
x264 [info]: coded y,uvDC,uvAC intra: 82.0% 37.3% 5.7% inter: 28.8% 8.7% 0.0%
x264 [info]: i16 v,h,dc,p: 13% 28% 13% 47%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 14% 16%  6% 12%  9% 17%  7% 10%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 16% 13%  7% 14% 10% 15%  6%  7%
x264 [info]: i8c dc,h,v,p: 69% 15% 11%  6%
x264 [info]: Weighted P-Frames: Y:7.0% UV:1.3%
x264 [info]: ref P L0: 66.5% 18.7%  8.7%  5.8%  0.3%
x264 [info]: ref B L0: 95.0%  5.0%
x264 [info]: kb/s:4364.79
[23:41:49] aac-decoder done: 0 frames, 0 decoder errors, 0 drops
[23:41:49] mux: track 0, 719 frames, 13076026 bytes, 4328.62 kbps, fifo 1024
[23:41:49] mux: track 1, 1134 frames, 245120 bytes, 81.14 kbps, fifo 2048
[23:41:49] libhb: work result = 0

Encode done!

HandBrake has exited.
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: Issues with partial encoding, but results are successful.

Post by mduell »

Try the nightly.
sonyrules
Posts: 2
Joined: Sun May 29, 2016 3:57 am

Re: Issues with partial encoding, but results are successful.

Post by sonyrules »

I tried the nightly, and there was no difference, The output screen look quite a bit different, and it looks like most of my options didnt work. But, i notice this time it acknowledged where it stopped.

Encoding: task 1 of 1, 74.14 % (4.98 fps, avg 6.56 fps, ETA 00h00m10s)[18:05:02] reader: done. 1 scr changes
Encoding: task 1 of 1, 80.99 % (4.68 fps, avg 6.27 fps, ETA 00h00m07s)[18:05:25] work: average encoding speed for job is 6.274857 fps
Encoding: task 1 of 1, 80.99 % (4.68 fps, avg 6.27 fps, ETA 00h00m07s)[18:05:25] comb detect: heavy 0 | light 0 | uncombed 254 | total 254
[18:05:25] decomb: deinterlaced 0 | blended 0 | unfiltered 254 | total 254
[18:05:25] render: 254 frames output, 0 dropped and 0 duped for CFR/PFR
[18:05:25] render: lost time: 0 (0 frames)
[18:05:25] render: gained time: 0 (0 frames) (0 not accounted for)
[18:05:25] aac-decoder done: 414 frames, 0 decoder errors
[18:05:25] h264-decoder done: 254 frames, 0 decoder errors
[18:05:25] sync: got 254 frames, 263 expected
Post Reply