Opened 17 years ago

Closed 17 years ago

#3933 closed defect (worksforme)

Wrong video bitrate parameter name for ffmpeg in nuvexport's MP4.pm export module

Reported by: anonymous Owned by: xris
Priority: major Milestone: unknown
Component: perl / nuvexport Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

In http://svn.mythtv.org/trac/browser/trunk/mythextras/nuvexport/export/ffmpeg/MP4.pm line 216 reads:

.$self->param('bit_rate', $self->{'v_bitrate'})

It should read:

.$self->param('b', $self->{'v_bitrate'})

man ffmpeg states that -b is the command line parameter for the video bitrate desired.

Because this parameter name is wrong, the interactive query for video bitrate is useless and the default value is always used.

Here is an example of what is currently produced: tlunde@mythbox:~$ nuvexport --debug

Loading MythTV recording info. 89%

Using ffmpeg for exporting. What would you like to do?

  1. Export to XviD
  2. Export to SVCD
  3. Export to VCD
  4. Export to DVCD (VCD with 48kHz audio for making DVDs)
  5. Export to DVD
  6. Export to DivX
  7. Export to ASF
  8. Export to MP3
  9. Export to PSP
  1. Export to MP4 (iPod)
  2. Export to .nuv and .sql
  1. Quit

Choose a function: 10

You have recorded the following shows:

  1. 11_1 (PBS KDINHD) (1 episode)
  2. ABC5 News Midday (1 episode)
  3. Maury (1 episode)
  4. Roseanne (1 episode)
  5. The Ellen DeGeneres? Show (1 episode)
  6. The View (1 episode)
  7. The Young and the Restless (1 episode)
  8. This Old House (1 episode)
  9. Word World (1 episode)
  1. Quit

Choose a show: 2

You have chosen to export 1 episode:

  1. ABC5 News Midday: (8/10, 11:28 AM) 1280x720 MPEG2 (16:9) No Description
  • Separate multiple episodes with spaces, or ranges with '-'
  1. Continue
  2. Choose another show
  3. Quit

Choose a function, or episode(s) to remove: c Where would you like to export the files to? . /tmp Enable Myth cutlist? [Yes] No Enable noise reduction (slower, but better results)? [Yes] No Enable deinterlacing? [Yes] No Crop broadcast overscan border (0-5%) ? [2] 0 Audio bitrate? [64] 128 Enable iPod compatibility? [No] Yes Video codec (mpeg4 or h264)? [mpeg4] h264 Variable bitrate video? [No] Yes Multi-pass (slower, but better quality)? [No] VBR quality/quantisation (1-31)? 16 Video bitrate? [384] 555 Default resolution based on requested dimensions. Width? [320] 480 Height? [272]


To encode: ABC5 News Midday: Untitled Use the following commands: Use of uninitialized value in pattern match (m) at /usr/local/share/nuvexport/export/ffmpeg/MP4.pm line 197, <STDIN> line 17. Use of uninitialized value in pattern match (m) at /usr/local/share/nuvexport/export/ffmpeg/MP4.pm line 197, <STDIN> line 17.

system call: mkdir -m 0755 /tmp/fifodir_12237/

forking: /usr/bin/nice -n19 /usr/bin/mythtranscode --showprogress -p 28 -c 1051 -s 2007-08-10-11-28-00 -f "/tmp/fifodir_12237/" 2>&1

forking: /usr/bin/nice -n19 ffmpeg -y -f s16le -ar 48000 -ac 2 -i /tmp/fifodir_12237/audout -f rawvideo -pix_fmt yuv420p -s 1280x720 -aspect 1.77777777777778 -r 59.940 -i /tmp/fifodir_12237/vidout -aspect 1.77777777777778 -r 29.97 -s 480x272 -vcodec h264 -b '555' -title 'ABC5 News Midday' -level 30 -loop 1 -g 250 -keyint_min 25 -sc_threshold 40 -rc_eq 'blurCplx(1-qComp)' -bit_rate_tolerance '555' -rc_max_rate '768' -rc_buffer_size '244' -i_quant_factor '0.71428572' -b_quant_factor '0.76923078' -max_b_frames '0' -qcompress '0.6' -qmax '51' -max_qdiff '4' -qmin 16 -refs 2 -subq 7 -partitions parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -flags2 +bpyramid+wpred+mixed_refs+8x8dct+brdo -me_range 21 -trellis 2 -chroma 1 -slice 2 -cmp 1 -deblockalpha 0 -deblockbeta 0 -acodec aac -ar 48000 -async 1 -ab '128' '/tmp/ABC5 News Midday.mp4' 2>&1

Cleaning up temp files. tlunde@mythbox:~$

Change History (3)

comment:1 Changed 17 years ago by tlunde@…

Trac didn't take my email address ... orobably PBCAK. tlunde -- at -- gmail.com

comment:2 Changed 17 years ago by Thomas <tlunde@…>

Aargh. Pardon my ineptness tonight: I clearly need more sleep.

The above example shows the results of my locally patched copy of MP4.pm instead of HEAD. The above exmaple works; the output of HEAD is the same, except for the line below which causes the results described above:

/usr/bin/nice -n19 ffmpeg -y -f s16le -ar 48000 -ac 2 -i /tmp/fifodir_12237/audout -f rawvideo -pix_fmt yuv420p -s 1280x720 -aspect 1.77777777777778 -r 59.940 -i /tmp/fifodir_12237/vidout -aspect 1.77777777777778 -r 29.97 -s 480x272 -vcodec h264 -bit_rate '555' -title 'ABC5 News Midday' -level 30 -loop 1 -g 250 -keyint_min 25 -sc_threshold 40 -rc_eq 'blurCplx(1-qComp)' -bit_rate_tolerance '555' -rc_max_rate '768' -rc_buffer_size '244' -i_quant_factor '0.71428572' -b_quant_factor '0.76923078' -max_b_frames '0' -qcompress '0.6' -qmax '51' -max_qdiff '4' -qmin 16 -refs 2 -subq 7 -partitions parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -flags2 +bpyramid+wpred+mixed_refs+8x8dct+brdo -me_range 21 -trellis 2 -chroma 1 -slice 2 -cmp 1 -deblockalpha 0 -deblockbeta 0 -acodec aac -ar 48000 -async 1 -ab '128' '/tmp/ABC5 News Midday.mp4' 2>&1

comment:3 Changed 17 years ago by xris

Resolution: worksforme
Status: newclosed

Not sure what you mean about any of this. The bitrate parameter is handled correctly via the param() method (which sets the correct bit_rate/b usage based on the version of ffmpeg being used). Sounds to me like there is an incorrect setting in the version string returned by the copy of ffmpeg that you're using.

If this is still an issue, please reopen this ticket with the output from:

ffmpeg -version 2>&1 | grep -i version
Note: See TracTickets for help on using tickets.