Re: enc.mpg files are at 0 bytes

18 views
Skip to first unread message

Mark Fletcher

unread,
May 19, 2016, 7:25:46 PM5/19/16
to tovid...@googlegroups.com


On Fri, May 20, 2016 at 6:00 AM geek255 <vele...@gmail.com> wrote:

I ran this command below to convert a mp4 file to a ntsc mpg file

tovid mpg -half-dvd -quality 7 -in Raid.mp4 -out raid.enc

All tovid did was create a 0 Byte file called Raid.enc.mpg.

Here is the makempg log file

http://pastebin.com/U04sU1iy

I also did a git pull on the tovid git folder. But it told me it was the latest one.

I appreciate any help.




Greetings fellow tovid lover!

In these situations it's important to look through the log for errors and the first one that occurs is usually the problem.

In this case, your ffmpeg doesn't like the -aspect 4/3 parameter that tovid passed it. It is saying that it has no such filter.

Options include:

1) Bug in tovid causing it to ask ffmpeg for a filter that doesn't exist (unlikely, as it would break for everyone)
2) Your ffmpeg has not been built with support for this particular filter -- are you running this on Linux or something else? If Linux, which distribution?
3) Your ffmpeg is a very old or very new version and the aspect filter has been renamed to something else
4) Your ffmpeg is actually the program avconv (which may be the case if you are running Debian and have not installed ffmpeg from deb-multimedia, for example, I am not sure what other distributions do) and the aspect filter is missing or called something else.
5) bad combination of parameters to tovid causing it to present bad parameters to ffmpeg when trying to do the conversion (I don't immediately see anything wrong with your command)

I am afraid I can't dig deeper right at the moment as I'm travelling and not in front of my Linux machine. But if this doesn't help you find the problem, I can dig deeper if you confirm you are running on Linux when I get home tomorrow. 

By the way, do you really mean half-dvd? Not that there is anything wrong with that, but it's a long while since I've seen anyone use that...

Mark

geek255

unread,
May 20, 2016, 3:02:28 PM5/20/16
to tovid-users
Hi Mark,

Tovid isn't broken as I though. It was a matter of a space in the directory called New Folder.

[makempg]: /usr/share/tovid/makempg -half-dvd -quality 7 -in Raid.mp4 -out raid.enc
[makempg]: Version 0.35.0-89-gd3595a7
[makempg]: Converting /home/david/nonusers/den/videos/hart/New Folder/Raid.mp4 to NTSC Half-DVD format
[makempg]: Encoding quality is 7 of 10 (use -quality to change)
[makempg]: Saving to /home/david/nonusers/den/videos/hart/New Folder/raid.enc.mpg
[makempg]: Storing log and temporary files in /home/david/nonusers/den/videos/hart/New Folder/raid.enc.0
[makempg]: Run 'tail -f "/home/david/nonusers/den/videos/hart/New Folder/raid.enc.0/makempg.log"' in another terminal to monitor the log

When I removed the space in New Folder, tovid worked flawlessly as before.

I'm not sure why, but tovid always has issues if there is a space in a directory path or filename. For tovid to work for me at least, I have to remove any spaces in the directory or filename. It's weird.

Anyway, I'm just happy it wasn't broken and is working great!

Thanks

grepper

unread,
May 20, 2016, 7:18:40 PM5/20/16
to tovid-users
Hi geek256. See below your text for my answer.


On Friday, May 20, 2016 at 3:02:28 PM UTC-4, geek255 wrote:
Hi Mark,

Tovid isn't broken as I though. It was a matter of a space in the directory called New Folder.

[makempg]: /usr/share/tovid/makempg -half-dvd -quality 7 -in Raid.mp4 -out raid.enc
[makempg]: Version 0.35.0-89-gd3595a7
[makempg]: Converting /home/david/nonusers/den/videos/hart/New Folder/Raid.mp4 to NTSC Half-DVD format
[makempg]: Encoding quality is 7 of 10 (use -quality to change)
[makempg]: Saving to /home/david/nonusers/den/videos/hart/New Folder/raid.enc.mpg
[makempg]: Storing log and temporary files in /home/david/nonusers/den/videos/hart/New Folder/raid.enc.0
[makempg]: Run 'tail -f "/home/david/nonusers/den/videos/hart/New Folder/raid.enc.0/makempg.log"' in another terminal to monitor the log

When I removed the space in New Folder, tovid worked flawlessly as before.

I'm not sure why, but tovid always has issues if there is a space in a directory path or filename. For tovid to work for me at least, I have to remove any spaces in the directory or filename. It's weird.

Anyway, I'm just happy it wasn't broken and is working great!

Thanks


Hm, that is strange.  I don't know why you ended up with:
-vf "scale=w=352:h=480,-aspect 4/3,fps=30000/1001"  the first time, that will not work as it mixes the "-aspect" option into the middle of the -vf arguments (video filter).
It should be -vf "scale=w=352:h=480,setdar=4/3,fps=30000/1001" .

Here is my output when encoding a file with spaces located in a directory with spaces:

tovid mpg -half-dvd -quality 7  -in /home/robert/dir\ with\ spaces/tmp/spaced\ .avi -out OUT
Read options from /home/robert/.tovid/tovid.ini:

--------------------------------
tovid mpg
Convert videos to DVD or (S)VCD format
Version 0.35.0-89-gd3595a7
http://tovid.wikia.com
--------------------------------
tovid command-line used:
-half-dvd -quality 7 -in /home/robert/dir with spaces/tmp/spaced .avi -out OUT
Changing to working directory: /home/robert/git/projects/tovid-readonly

Note: the default encoder has been changed to ffmpeg. Though mpeg2enc
is reputed to be more complient to the DVD spec, it is very slow.
To get the old behavior use the -mpeg2enc option.

Resuming
 in 4 seconds...or press <ENTER>
Converting /home/robert/dir with spaces/spaced .avi to NTSC Half-DVD format
Encoding quality is 7 of 10 (use -quality to change)
Saving to /home/robert/git/projects/tovid-readonly/OUT.mpg
Storing log and temporary files in /home/robert/git/projects/tovid-readonly/OUT.0
Run 'tail -f "/home/robert/git/projects/tovid-readonly/OUT.0/makempg.log"' in another terminal to monitor the log
Multiple CPUs detected; mpeg2enc and ffmpeg will use multithreading.

=========================================================

Probing video for information. This may take several minutes...
The encoding process is estimated to require 9 MB of disk space.
You currently have 243367 MB available in this directory.
Analysis of file /home/robert/dir with spaces/spaced .avi:
  416 x 320 pixels, 30.000 fps
  Duration (best guess): 00:00:30 (HH:MM:SS)
  mpeg4 video with mp2 audio
Target format:
  352 x 480 pixels, 29.970 fps
  m2v video with ac3 audio
  4200 kbits/sec video, 224 kbits/sec audio

=========================================================

Using auto-detected aspect ratio 133:100 (override with -aspect)
No letterboxing necessary
Input is not 29.970 fps. Framerate will be adjusted.
Scaling picture to 352 x 480

=========================================================

Using ffmpeg to encode audio and video.
Encoding video and audio with the following command:
nice -n 0 ffmpeg -i "/home/robert/dir with spaces/spaced .avi" -threads 4              -target ntsc-dvd -qmin 4 -qmax 31            -vf "scale=w=352:h=480,setdar=4/3,fps=30000/1001"  -b:v 4200k -b:a 224k -ac 2  -map 0:0  -map 0:1 "/home/robert/git/projects/tovid-readonly/OUT.mpg"

Processing started. Please wait...
    ---  Encoding with ffmpeg: 12 MB written to OUT.mpg


=========================================================

Output files:
12M     /home/robert/git/projects/tovid-readonly/OUT.mpg
12M     total

=========================================================

    ----------------------------------------
    Final statistics
    ----------------
    tovid 0.35.0-89-gd3595a7
    File: /home/robert/git/projects/tovid-readonly/OUT.mpg, 30.000 secs Half-DVD NTSC
    Final size:      11348 kilobytes
    Target bitrate:  4200 kbits/sec
    Average bitrate: 2718 kbits/sec
    Peak bitrate:    3221 kbits/sec
    Took 00:00:08 to encode on Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz 1848.257 MHz

I'm not sure why you are having problems.
cheers,
grepper

Victor Velez

unread,
May 20, 2016, 10:51:55 PM5/20/16
to tovid...@googlegroups.com
Anyway tovid is working as before. It was the space in the directory path that was the culprit. After removing the space. Tovid converted the video to mpg just fine.

Thanks grepper :-)


--
You received this message because you are subscribed to the Google Groups "tovid-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tovid-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

grepper

unread,
May 21, 2016, 12:56:31 AM5/21/16
to tovid-users


On Friday, May 20, 2016 at 10:51:55 PM UTC-4, geek255 wrote:
Anyway tovid is working as before. It was the space in the directory path that was the culprit. After removing the space. Tovid converted the video to mpg just fine.

Thanks grepper :-)

Well, that makes no sense to me as I have no problem with spaces as I showed. Do you have the makempg.log of the encode that worked? What were the -vf arguments ?
( ie. ffmpeg ...  -vf "scale=w=352:h=480,setdar=4/3,fps=30000/1001" ... ) It would help in preventing such problems in the future. The problem with the original encode were the video filter arguments as I mentioned.

cheers,
grepper



Victor Velez

unread,
May 21, 2016, 1:54:35 AM5/21/16
to tovid...@googlegroups.com
Hi grepper

Here is the link to makempg log for a successful video conversion. As you can see from the log file tovid worked successfully when there is no space in the directory path. New Folder is now NewFolder

http://pastebin.com/N5JVeUeR

Below is an excerpt of a successful video conversion.


Final statistics
    ----------------
    tovid 0.35.0-89-gd3595a7
    File: /home/david/nonusers/den/videos/hart/NewFolder/raid.enc.mpg, 2962.760 secs Half-DVD NTSC
    Final size:      857272 kilobytes
    Target bitrate:  4200 kbits/sec
    Average bitrate: 2710 kbits/sec
    Peak bitrate:    3431 kbits/sec
    Took 00:04:25 to encode on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz 1710.199 MHz


Below is link for makempg log for an unsuccessful video conversion. Here I put back the space in New Folder. Tovid displays the ffmpeg code and quits with an empty raid.enc.mpg file.

http://pastebin.com/jAAgBhdh

Here is an excerpt of the output of tovid which failed to encode the file.


Final statistics
    ----------------
tovid 0.35.0-89-gd3595a7
File: /home/david/nonusers/den/videos/hart/New Folder/raid.enc.mpg, 2962.760    secs Half-DVD NTSC
Final size:      0 kilobytes
Target bitrate:  4200 kbits/sec
Average bitrate: 0 kbits/sec
Peak bitrate:    0 kbits/sec
Took 00:00:15 to encode on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz 1618.675 MHz

As you can see 0 kilobytes. This happens only if there is an space in the directory path.

BTW, I am using PClinuxOS 01 2016 edition.

Anyway, tovid works fine as long as I don't have any spaces. It's not a big deal.

I love tovid. It's the best.

grepper

unread,
May 29, 2016, 12:59:53 AM5/29/16
to tovid-users


On Saturday, May 21, 2016 at 1:54:35 AM UTC-4, geek255 wrote:
Hi grepper

Here is the link to makempg log for a successful video conversion. As you can see from the log file tovid worked successfully when there is no space in the directory path. New Folder is now NewFolder

http://pastebin.com/N5JVeUeR

Below is an excerpt of a successful video conversion.

--- snip ----


Thanks so much for your co-operation geek255. I investigated further and can confirm that it was a bug in the makempg script. The fix was simple enough - I have commited it in the latest git revision, with hash beginning with  ebd9e76. Might be nice if you could confirm it works for you.

all the best,
grepper

Victor Velez

unread,
May 29, 2016, 7:33:30 PM5/29/16
to tovid...@googlegroups.com
Hello grepper,

I just upgraded tovid to version 0.35.0-90-gebd9e76

I ran the test with twp spaces. One in the directory i.e New Folder and the other space in the input file i.e Raid test2.mp4.

And, it worked like a charm. The spaces are no longer a problem. :-)

Here is the link for the makempg log

http://pastebin.com/N9R8viSK

Thanks grepper for the time amd help. :-)
  






grepper

unread,
May 29, 2016, 9:12:31 PM5/29/16
to tovid-users


On Sunday, May 29, 2016 at 7:33:30 PM UTC-4, geek255 wrote:
Hello grepper,

I just upgraded tovid to version 0.35.0-90-gebd9e76

I ran the test with twp spaces. One in the directory i.e New Folder and the other space in the input file i.e Raid test2.mp4.

And, it worked like a charm. The spaces are no longer a problem. :-)

Here is the link for the makempg log

http://pastebin.com/N9R8viSK

Thanks grepper for the time amd help. :-)


 Good to know Victor. Thanks for checking, and thanks for reporting this bug!

Robert (alias grepper)
Reply all
Reply to author
Forward
0 new messages