FORUMS
Remove All Ads from XDA

Batch Video Converter

229 posts
Thanks Meter: 60
 
By Budius, Senior Member on 30th March 2014, 01:26 PM
Post Reply Email Thread
31st March 2014, 09:55 PM |#11  
OP Senior Member
Thanks Meter: 60
 
More
Smile
Quote:
Originally Posted by nigelhealy

Code:
ffprobe parsing file: /mnt/320gb/TEMP/Downloads/Natural_World_-_2013-2014_Giant_Squid_2._Filming_the_Impossible_-_Natural_World_Special_b0377t15_default.mp4
ffprobe version 2.2.git Copyright (c) 2007-2014 the FFmpeg developers
  built on Mar 31 2014 13:10:45 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --prefix=/home/nigel/ffmpeg_build --extra-cflags=-I/home/nigel/ffmpeg_build/include --extra-ldflags=-L/home/nigel/ffmpeg_build/lib --bindir=/home/nigel/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab
  libavutil      52. 70.100 / 52. 70.100
  libavcodec     55. 55.106 / 55. 55.106
  libavformat    55. 36.100 / 55. 36.100
  libavdevice    55. 11.100 / 55. 11.100
  libavfilter     4.  3.100 /  4.  3.100
  libswscale      2.  5.102 /  2.  5.102
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/mnt/320gb/TEMP/Downloads/Natural_World_-_2013-2014_Giant_Squid_2._Filming_the_Impossible_-_Natural_World_Special_b0377t15_default.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 1970-01-01 00:00:00
    encoder         : Lavf52.111.0
  Duration: 00:44:05.59, start: 0.000000, bitrate: 1501 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv), 832x468 [SAR 117:117 DAR 16:9], 1401 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc (default)
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 94 kb/s (default)
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : SoundHandler
Runtime execution finished with success
Runtime execution finished with success
Starting first pass for file: /mnt/320gb/TEMP/Downloads/Natural_World_-_2013-2014_Giant_Squid_2._Filming_the_Impossible_-_Natural_World_Special_b0377t15_default.mp4
Executing [ffmpeg -i /mnt/320gb/TEMP/Downloads/Natural_World_-_2013-2014_Giant_Squid_2._Filming_the_Impossible_-_Natural_World_Special_b0377t15_default.mp4 -c:v libx264 -profile:v high -level 5 -preset slow -b:v 1401533 -an -pass 1 /mnt/320gb/TEMP/Downloads/Natural_World_-_2013-2014_Giant_Squid_2._Filming_the_Impossible_-_Natural_World_Special_b0377t15_default_1_temp.mp4]
ffmpeg version 2.2.git Copyright (c) 2000-2014 the FFmpeg developers
  built on Mar 31 2014 13:10:45 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --prefix=/home/nigel/ffmpeg_build --extra-cflags=-I/home/nigel/ffmpeg_build/include --extra-ldflags=-L/home/nigel/ffmpeg_build/lib --bindir=/home/nigel/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab
  libavutil      52. 70.100 / 52. 70.100
  libavcodec     55. 55.106 / 55. 55.106
  libavformat    55. 36.100 / 55. 36.100
  libavdevice    55. 11.100 / 55. 11.100
  libavfilter     4.  3.100 /  4.  3.100
  libswscale      2.  5.102 /  2.  5.102
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/mnt/320gb/TEMP/Downloads/Natural_World_-_2013-2014_Giant_Squid_2._Filming_the_Impossible_-_Natural_World_Special_b0377t15_default.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 1970-01-01 00:00:00
    encoder         : Lavf52.111.0
  Duration: 00:44:05.59, start: 0.000000, bitrate: 1501 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv), 832x468 [SAR 117:117 DAR 16:9], 1401 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc (default)
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 94 kb/s (default)
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : SoundHandler
[libx264 @ 0x3ca32e0] using SAR=1/1
[libx264 @ 0x3ca32e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x3ca32e0] profile Main, level 5.0
[libx264 @ 0x3ca32e0] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0 me=dia subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=abr mbtree=1 bitrate=1401 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/mnt/320gb/TEMP/Downloads/Natural_World_-_2013-2014_Giant_Squid_2._Filming_the_Impossible_-_Natural_World_Special_b0377t15_default_1_temp.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.36.100
    Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 832x468 [SAR 117:117 DAR 16:9], q=-1--1, pass 1, 1401 kb/s, 12800 tbn, 25 tbc (default)
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : VideoHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> libx264)
Press [q] to stop, [?] for help
frame=   67 fps=0.0 q=26.0 size=       1kB time=00:00:00.20 bitrate=  50.5kbits/s dup=2 drop=0    
frame=  112 fps=111 q=29.0 size=    1239kB time=00:00:02.00 bitrate=5073.3kbits/s dup=2 drop=0    
frame=  159 fps=105 q=34.0 size=    1555kB time=00:00:03.88 bitrate=3283.6kbits/s dup=2 drop=0    
frame=  216 fps=106 q=35.0 size=    1825kB time=00:00:06.16 bitrate=2427.6kbits/s dup=2 drop=0    
frame=  283 fps=111 q=32.0 size=    1970kB time=00:00:08.84 bitrate=1825.7kbits/s dup=2 drop=0    
frame=  354 fps=116 q=28.0 size=    2142kB time=00:00:11.68 bitrate=1502.1kbits/s dup=2 drop=0    
frame=  422 fps=118 q=26.0 size=    2377kB time=00:00:14.40 bitrate=1352.0kbits/s dup=2 drop=0    
frame=  486 fps=119 q=24.0 size=    2677kB time=00:00:16.96 bitrate=1293.0kbits/s dup=2 drop=0    
frame=  550 fps=120 q=23.0 size=    3020kB time=00:00:19.52 bitrate=1267.3kbits/s dup=2 drop=0    
frame=  625 fps=122 q=21.0 size=    3301kB time=00:00:22.52 bitrate=1200.8kbits/s dup=2 drop=0    
frame=  691 fps=123 q=20.0 size=    3651kB time=00:00:25.16 bitrate=1188.6kbits/s dup=2 drop=0    
frame=  749 fps=123 q=20.0 size=    4082kB time=00:00:27.48 bitrate=1217.0kbits/s dup=2 drop=0    
frame=  804 fps=122 q=19.0 size=    4406kB time=00:00:29.68 bitrate=1216.1kbits/s dup=2 drop=0    
^Cnigel@T420ubuntu:~/Downloads$

First of all, I'm very happy that you got it working . I wish I could just pack FFMPEG with the software so it would be more user friendly, but because it uses the "-non-free" stuff I don't want to get in trouble for helping others.

I don't believe it's improving in any way, but I'll tell your what is happening.
Those are the format officially supported by the Chromecast https://developers.google.com/cast/docs/media

I did noticed that in reality it can run some little variations, for example, your video is h264 Profile: Main avc1 and it works.
Another example, it will cast without issues .MKV files with an appropriate h264 stream.

But for correctness the software converts anything that is not exactly as shown in the official website. I mean, I gotta follow the official stuff.

I just think it's very weird that the log is not showing as it's supposed to show the same thing from your console output.
 
 
31st March 2014, 10:05 PM |#12  
OP Senior Member
Thanks Meter: 60
 
More
regarding raspberry Pi.

I just found the official compilation guide and I'll give it a try.
https://trac.ffmpeg.org/wiki/How%20t...Pi%20(Raspbian)

I'll see how the performance is etc.
It will obviously be worse than in a full PC, but maybe the pre-build bins I used before were not very well done, and if it can achieve a bare minimum it could be a good running as a daemon so every new file added to a certain folder gets auto-converted.

I mean, if 1 off, 2 hous movie takes 5-6 hours to convert, it's ok. I still believe that tera-bytes conversion would be too slow, but as daemon.
31st March 2014, 10:57 PM |#13  
nigelhealy's Avatar
Senior Member
Flag San Francisco
Thanks Meter: 404
 
More
Quote:
Originally Posted by Budius

First of all, I'm very happy that you got it working . ...

But for correctness the software converts anything that is not exactly as shown in the official website. I mean, I gotta follow the official stuff.

.

Well that is your feedback, make it remove re-coding that which actually works on Chromecast, it will save hours of recoding.
The Following User Says Thank You to nigelhealy For This Useful Post: [ View ] Gift nigelhealy Ad-Free
31st March 2014, 11:06 PM |#14  
OP Senior Member
Thanks Meter: 60
 
More
Quote:
Originally Posted by nigelhealy

Well that is your feedback, make it remove re-coding that which actually works on Chromecast, it will save hours of recoding.

it does make sense, but also means I have to go ahead and test a bunch of variations to see what works and what doesn't.
I mean, I agree with you, it's a improvement, and I'll put in the TODO list, it might just take a bit to happen
1st April 2014, 05:58 AM |#15  
bhiga's Avatar
Recognized Contributor
Thanks Meter: 1,017
 
Donate to Me
More
Quote:
Originally Posted by Budius

How do i delete a post ??? This here was an accident.

Report (the triangle) it under General thread/post maintenance and ask mod to delete it.
1st April 2014, 09:52 AM |#16  
paracha3's Avatar
Senior Member
Flag Jeddah
Thanks Meter: 15
 
More
Question
Dear OP,

I tried converting a mkv file using your converter and at the end of conversion it created a mp4 file but message said that it failed. When i played the converted mp4 file on my PC, it plays video but no audio? any idea whey the audio is not playing back? I did not try on chromecast yet but i assume the audio wont play on it either.
Thoughts? Thanks
1st April 2014, 09:59 AM |#17  
OP Senior Member
Thanks Meter: 60
 
More
Quote:
Originally Posted by paracha3

Dear OP,

I tried converting a mkv file using your converter and at the end of conversion it created a mp4 file but message said that it failed. When i played the converted mp4 file on my PC, it plays video but no audio? any idea whey the audio is not playing back? I did not try on chromecast yet but i assume the audio wont play on it either.
Thoughts? Thanks

the conversion uses a two-pass method for best quality.
1st pass is only processing the video and doesn't even look at the audio. On the 2nd pass the audio is added/processed.

The video you got without audio is the result of the 1st pass, and the 2nd pass never executed because it failed.

My guess is that your compilation of FFMPEG does not have libfdk_aac (the audio library used for conversion keeping the best quality possible).
Unfortunately this library is tagged as "-non-free" so you can't just download from somewhere. It's illegal to do so. You have to follow the guide here https://trac.ffmpeg.org/wiki/CompilationGuide to compile the library yourself on your PC..

As I said before, I really wished it would be more user-friendly. But that's out of my control.

Probably in a future version I'll try to detect if this library is available and if it's not use the native one, that renders a not so great quality, but at least works in all cases.
The Following User Says Thank You to Budius For This Useful Post: [ View ] Gift Budius Ad-Free
1st April 2014, 11:04 AM |#18  
paracha3's Avatar
Senior Member
Flag Jeddah
Thanks Meter: 15
 
More
Quote:
Originally Posted by Budius

the conversion uses a two-pass method for best quality.
1st pass is only processing the video and doesn't even look at the audio. On the 2nd pass the audio is added/processed.

The video you got without audio is the result of the 1st pass, and the 2nd pass never executed because it failed.

My guess is that your compilation of FFMPEG does not have libfdk_aac (the audio library used for conversion keeping the best quality possible).
Unfortunately this library is tagged as "-non-free" so you can't just download from somewhere. It's illegal to do so. You have to follow the guide here https://trac.ffmpeg.org/wiki/CompilationGuide to compile the library yourself on your PC..

As I said before, I really wished it would be more user-friendly. But that's out of my control.

Probably in a future version I'll try to detect if this library is available and if it's not use the native one, that renders a not so great quality, but at least works in all cases.

Thanks. Is there a compiled binary for windows 7 available? so i dont have to go through self compilation step?

Update: Just read "License restrictions prohibit distribution of already compiled FFmpeg with libfdk-aac, so if I want to use it I must make my own build of FFmpeg."
1st April 2014, 11:08 AM |#19  
OP Senior Member
Thanks Meter: 60
 
More
Thumbs up
Quote:
Originally Posted by paracha3

Thanks. Is there a compiled binary for windows 7 available? so i dont have to go through self compilation step?

as I said. The libfdk_aac is proprietary (a.k.a.: -non-free), so it's illegal for people to distribute it pre-compiled.
It's probably possible to Google and find it, but the compilation guides are very well explained in my opinion.

Just remember to compile with libfdk_aac and with x264 codecs.
1st April 2014, 11:11 AM |#20  
OP Senior Member
Thanks Meter: 60
 
More
Quote:
Originally Posted by paracha3

Update: Just read "License restrictions prohibit distribution of already compiled FFmpeg with libfdk-aac, so if I want to use it I must make my own build of FFmpeg."

Although it seems to be working very reliably, the software is still a bit rough around the edges. I'll try in a future version to check for what is available, for example, if libfdk_aac is not there I can use MP3 instead.
1st April 2014, 01:41 PM |#21  
paracha3's Avatar
Senior Member
Flag Jeddah
Thanks Meter: 15
 
More
Thumbs up
Quote:
Originally Posted by Budius

Although it seems to be working very reliably, the software is still a bit rough around the edges. I'll try in a future version to check for what is available, for example, if libfdk_aac is not there I can use MP3 instead.

That would be sweet.

---------- Post added at 02:42 PM ---------- Previous post was at 02:05 PM ----------

Quote:
Originally Posted by Budius

Although it seems to be working very reliably, the software is still a bit rough around the edges. I'll try in a future version to check for what is available, for example, if libfdk_aac is not there I can use MP3 instead.

wish i would get the compiled ffmpeg.exe with libfdk_acc. I do not want to install a lot of "bloatware" (if i may) to compile one exe.

Just a side note, i don't get the logic behind documenting the compile instructions and asking people to compile with fdkaac_lib but make it illegal to distribute compiled exe? Its beyond me......????

---------- Post added at 03:41 PM ---------- Previous post was at 02:42 PM ----------

Quote:
Originally Posted by Budius

the conversion uses a two-pass method for best quality.
1st pass is only processing the video and doesn't even look at the audio. On the 2nd pass the audio is added/processed.

The video you got without audio is the result of the 1st pass, and the 2nd pass never executed because it failed.

My guess is that your compilation of FFMPEG does not have libfdk_aac (the audio library used for conversion keeping the best quality possible).
Unfortunately this library is tagged as "-non-free" so you can't just download from somewhere. It's illegal to do so. You have to follow the guide here https://trac.ffmpeg.org/wiki/CompilationGuide to compile the library yourself on your PC..

As I said before, I really wished it would be more user-friendly. But that's out of my control.

Probably in a future version I'll try to detect if this library is available and if it's not use the native one, that renders a not so great quality, but at least works in all cases.

Compiled ffmpeg.exe with libfdk_aac and now the conversion finished successfully and as far as PC, it has video and audio. Yuhooo!!
Will try on chromecast when i get home. Optimistic though.

One suggestion though, on your Chromecast Converter, give an option on UI to "Not delete original" file after conversion. That would be nice.
Thanks
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes